diff --git a/api/mock/api_mock.go b/api/mock/api_mock.go index af9ea737e94..7a5db429814 100644 --- a/api/mock/api_mock.go +++ b/api/mock/api_mock.go @@ -241,6 +241,26 @@ func (mr *MockAPIClientMockRecorder) DefineSecret(arg0, arg1 interface{}, arg2 . return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefineSecret", reflect.TypeOf((*MockAPIClient)(nil).DefineSecret), varargs...) } +// DeleteSecretDefinition mocks base method. +func (m *MockAPIClient) DeleteSecretDefinition(arg0 context.Context, arg1 *proto0.SecretDefinition, arg2 ...grpc.CallOption) (*emptypb.Empty, error) { + m.ctrl.T.Helper() + varargs := []interface{}{arg0, arg1} + for _, a := range arg2 { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "DeleteSecretDefinition", varargs...) + ret0, _ := ret[0].(*emptypb.Empty) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// DeleteSecretDefinition indicates an expected call of DeleteSecretDefinition. +func (mr *MockAPIClientMockRecorder) DeleteSecretDefinition(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{arg0, arg1}, arg2...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSecretDefinition", reflect.TypeOf((*MockAPIClient)(nil).DeleteSecretDefinition), varargs...) +} + // DeleteSubject mocks base method. func (m *MockAPIClient) DeleteSubject(arg0 context.Context, arg1 *proto0.DataRequest, arg2 ...grpc.CallOption) (*emptypb.Empty, error) { m.ctrl.T.Helper() diff --git a/api/proto/api.pb.go b/api/proto/api.pb.go index 66713146660..ff001f0f7ce 100644 --- a/api/proto/api.pb.go +++ b/api/proto/api.pb.go @@ -664,7 +664,7 @@ var file_api_proto_rawDesc = []byte{ 0x6f, 0x6e, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6a, 0x73, 0x6f, 0x6e, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x72, 0x6f, 0x77, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x72, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x32, 0x9f, 0x3c, 0x0a, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x67, 0x49, 0x64, 0x32, 0x95, 0x3d, 0x0a, 0x03, 0x41, 0x50, 0x49, 0x12, 0x52, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x75, 0x6e, 0x74, 0x12, 0x0b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x75, 0x6e, 0x74, 0x1a, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x46, 0x6c, 0x6f, 0x77, @@ -1081,76 +1081,83 @@ var file_api_proto_rawDesc = []byte{ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x22, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x3a, 0x01, 0x2a, 0x12, 0x71, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x1a, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, - 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x31, 0x2f, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x44, 0x65, 0x66, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x12, 0x0d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x16, 0x22, 0x11, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x41, 0x64, 0x64, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x63, 0x0a, 0x0c, 0x4d, 0x6f, 0x64, 0x69, - 0x66, 0x79, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1f, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x19, 0x22, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x4d, 0x6f, - 0x64, 0x69, 0x66, 0x79, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x44, 0x0a, - 0x09, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x0d, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x1a, 0x0d, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, - 0x12, 0x11, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x56, 0x46, 0x53, 0x47, 0x65, 0x74, 0x42, 0x75, 0x66, - 0x66, 0x65, 0x72, 0x12, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x46, 0x53, 0x46, - 0x69, 0x6c, 0x65, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x1a, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x56, 0x46, 0x53, 0x46, 0x69, 0x6c, 0x65, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x22, - 0x00, 0x12, 0x38, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x17, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x56, 0x51, 0x4c, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x41, - 0x72, 0x67, 0x73, 0x1a, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x51, 0x4c, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x3b, 0x0a, 0x0a, 0x57, - 0x61, 0x74, 0x63, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x3f, 0x0a, 0x0a, 0x50, 0x75, 0x73, 0x68, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, - 0x75, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x0a, 0x57, 0x72, 0x69, - 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x56, 0x51, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x09, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, - 0x65, 0x72, 0x12, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x37, 0x0a, 0x0a, 0x47, 0x65, 0x74, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x3a, 0x01, 0x2a, 0x12, 0x74, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x44, 0x65, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x29, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x44, 0x65, 0x66, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x01, 0x2a, 0x12, 0x71, 0x0a, 0x14, 0x47, 0x65, 0x74, + 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, + 0x74, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x50, 0x0a, 0x09, + 0x41, 0x64, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x0d, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x22, 0x11, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x41, 0x64, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x63, + 0x0a, 0x0c, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x1a, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x53, 0x65, 0x63, + 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x22, 0x14, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x31, 0x2f, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x3a, 0x01, 0x2a, 0x12, 0x44, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x12, 0x0d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x1a, + 0x0d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x19, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, + 0x47, 0x65, 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x56, 0x46, 0x53, + 0x47, 0x65, 0x74, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x12, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x56, 0x46, 0x53, 0x46, 0x69, 0x6c, 0x65, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x1a, + 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x46, 0x53, 0x46, 0x69, 0x6c, 0x65, 0x42, + 0x75, 0x66, 0x66, 0x65, 0x72, 0x22, 0x00, 0x12, 0x38, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x12, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x51, 0x4c, 0x43, 0x6f, 0x6c, 0x6c, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x56, 0x51, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, + 0x01, 0x12, 0x3b, 0x0a, 0x0a, 0x57, 0x61, 0x74, 0x63, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, + 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x3f, + 0x0a, 0x0a, 0x50, 0x75, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x17, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, + 0x3a, 0x0a, 0x0a, 0x57, 0x72, 0x69, 0x74, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x51, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x09, 0x53, + 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x12, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, + 0x37, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x53, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, + 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x3d, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, + 0x12, 0x41, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x12, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x0d, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x12, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x0c, 0x4c, 0x69, - 0x73, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x12, 0x12, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, - 0x72, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3e, 0x0a, - 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x31, 0x5a, - 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x76, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x64, 0x65, 0x78, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x76, 0x65, 0x6c, 0x6f, 0x63, 0x69, - 0x72, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x19, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x42, 0x31, 0x5a, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x76, 0x65, 0x6c, 0x6f, 0x63, + 0x69, 0x64, 0x65, 0x78, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, + 0x76, 0x65, 0x6c, 0x6f, 0x63, 0x69, 0x72, 0x61, 0x70, 0x74, 0x6f, 0x72, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1321,102 +1328,104 @@ var file_api_proto_depIdxs = []int32{ 45, // 62: proto.API.UploadNotebookAttachment:input_type -> proto.NotebookFileUploadRequest 45, // 63: proto.API.RemoveNotebookAttachment:input_type -> proto.NotebookFileUploadRequest 46, // 64: proto.API.DefineSecret:input_type -> proto.SecretDefinition - 19, // 65: proto.API.GetSecretDefinitions:input_type -> google.protobuf.Empty - 47, // 66: proto.API.AddSecret:input_type -> proto.Secret - 48, // 67: proto.API.ModifySecret:input_type -> proto.ModifySecretRequest - 47, // 68: proto.API.GetSecret:input_type -> proto.Secret - 4, // 69: proto.API.VFSGetBuffer:input_type -> proto.VFSFileBuffer - 49, // 70: proto.API.Query:input_type -> proto.VQLCollectorArgs - 6, // 71: proto.API.WatchEvent:input_type -> proto.EventRequest - 8, // 72: proto.API.PushEvents:input_type -> proto.PushEventRequest - 50, // 73: proto.API.WriteEvent:input_type -> proto.VQLResponse - 51, // 74: proto.API.Scheduler:input_type -> proto.ScheduleRequest - 52, // 75: proto.API.GetSubject:input_type -> proto.DataRequest - 52, // 76: proto.API.SetSubject:input_type -> proto.DataRequest - 52, // 77: proto.API.DeleteSubject:input_type -> proto.DataRequest - 52, // 78: proto.API.ListChildren:input_type -> proto.DataRequest - 53, // 79: proto.API.Check:input_type -> proto.HealthCheckRequest - 0, // 80: proto.API.CreateHunt:output_type -> proto.StartFlowResponse - 54, // 81: proto.API.EstimateHunt:output_type -> proto.HuntStats - 55, // 82: proto.API.GetHuntTable:output_type -> proto.GetTableResponse - 56, // 83: proto.API.ListHunts:output_type -> proto.ListHuntsResponse - 9, // 84: proto.API.GetHunt:output_type -> proto.Hunt - 19, // 85: proto.API.ModifyHunt:output_type -> google.protobuf.Empty - 55, // 86: proto.API.GetHuntFlows:output_type -> proto.GetTableResponse - 55, // 87: proto.API.GetHuntResults:output_type -> proto.GetTableResponse - 19, // 88: proto.API.NotifyClients:output_type -> google.protobuf.Empty - 57, // 89: proto.API.LabelClients:output_type -> proto.APIResponse - 58, // 90: proto.API.ListClients:output_type -> proto.SearchClientsResponse - 59, // 91: proto.API.GetClient:output_type -> proto.ApiClient - 60, // 92: proto.API.GetClientMetadata:output_type -> proto.ClientMetadata - 19, // 93: proto.API.SetClientMetadata:output_type -> google.protobuf.Empty - 55, // 94: proto.API.GetClientFlows:output_type -> proto.GetTableResponse - 61, // 95: proto.API.GetUserUITraits:output_type -> proto.ApiUser - 62, // 96: proto.API.SetGUIOptions:output_type -> proto.SetGUIOptionsResponse - 63, // 97: proto.API.GetUsers:output_type -> proto.Users - 63, // 98: proto.API.GetGlobalUsers:output_type -> proto.Users - 22, // 99: proto.API.GetUserRoles:output_type -> proto.UserRoles - 19, // 100: proto.API.SetUserRoles:output_type -> google.protobuf.Empty - 64, // 101: proto.API.GetUser:output_type -> proto.VelociraptorUser - 19, // 102: proto.API.CreateUser:output_type -> google.protobuf.Empty - 65, // 103: proto.API.GetUserFavorites:output_type -> proto.Favorites - 19, // 104: proto.API.SetPassword:output_type -> google.protobuf.Empty - 66, // 105: proto.API.VFSListDirectory:output_type -> proto.VFSListResponse - 55, // 106: proto.API.VFSListDirectoryFiles:output_type -> proto.GetTableResponse - 67, // 107: proto.API.VFSRefreshDirectory:output_type -> proto.ArtifactCollectorResponse - 66, // 108: proto.API.VFSStatDirectory:output_type -> proto.VFSListResponse - 68, // 109: proto.API.VFSStatDownload:output_type -> proto.VFSDownloadInfo - 0, // 110: proto.API.VFSDownloadFile:output_type -> proto.StartFlowResponse - 55, // 111: proto.API.GetTable:output_type -> proto.GetTableResponse - 69, // 112: proto.API.SearchFile:output_type -> proto.SearchFileResponse - 67, // 113: proto.API.CollectArtifact:output_type -> proto.ArtifactCollectorResponse - 0, // 114: proto.API.CancelFlow:output_type -> proto.StartFlowResponse - 70, // 115: proto.API.GetFlowDetails:output_type -> proto.FlowDetails - 71, // 116: proto.API.GetFlowRequests:output_type -> proto.ApiFlowRequestDetails - 72, // 117: proto.API.GetKeywordCompletions:output_type -> proto.KeywordCompletions - 31, // 118: proto.API.ReformatVQL:output_type -> proto.ReformatVQLMessage - 73, // 119: proto.API.GetArtifacts:output_type -> proto.ArtifactDescriptors - 74, // 120: proto.API.GetArtifactFile:output_type -> proto.GetArtifactResponse - 57, // 121: proto.API.SetArtifactFile:output_type -> proto.APIResponse - 75, // 122: proto.API.LoadArtifactPack:output_type -> proto.LoadArtifactPackResponse - 36, // 123: proto.API.GetToolInfo:output_type -> proto.Tool - 36, // 124: proto.API.SetToolInfo:output_type -> proto.Tool - 76, // 125: proto.API.GetReport:output_type -> proto.GetReportResponse - 29, // 126: proto.API.GetServerMonitoringState:output_type -> proto.ArtifactCollectorArgs - 29, // 127: proto.API.SetServerMonitoringState:output_type -> proto.ArtifactCollectorArgs - 39, // 128: proto.API.GetClientMonitoringState:output_type -> proto.ClientEventTable - 19, // 129: proto.API.SetClientMonitoringState:output_type -> google.protobuf.Empty - 77, // 130: proto.API.ListAvailableEventResults:output_type -> proto.ListAvailableEventResultsResponse - 78, // 131: proto.API.CreateDownloadFile:output_type -> proto.CreateDownloadResponse - 79, // 132: proto.API.GetNotebooks:output_type -> proto.Notebooks - 43, // 133: proto.API.NewNotebook:output_type -> proto.NotebookMetadata - 43, // 134: proto.API.UpdateNotebook:output_type -> proto.NotebookMetadata - 43, // 135: proto.API.NewNotebookCell:output_type -> proto.NotebookMetadata - 80, // 136: proto.API.GetNotebookCell:output_type -> proto.NotebookCell - 80, // 137: proto.API.UpdateNotebookCell:output_type -> proto.NotebookCell - 80, // 138: proto.API.RevertNotebookCell:output_type -> proto.NotebookCell - 19, // 139: proto.API.CancelNotebookCell:output_type -> google.protobuf.Empty - 19, // 140: proto.API.CreateNotebookDownloadFile:output_type -> google.protobuf.Empty - 81, // 141: proto.API.UploadNotebookAttachment:output_type -> proto.NotebookFileUploadResponse - 19, // 142: proto.API.RemoveNotebookAttachment:output_type -> google.protobuf.Empty - 19, // 143: proto.API.DefineSecret:output_type -> google.protobuf.Empty - 82, // 144: proto.API.GetSecretDefinitions:output_type -> proto.SecretDefinitionList - 19, // 145: proto.API.AddSecret:output_type -> google.protobuf.Empty - 19, // 146: proto.API.ModifySecret:output_type -> google.protobuf.Empty - 47, // 147: proto.API.GetSecret:output_type -> proto.Secret - 4, // 148: proto.API.VFSGetBuffer:output_type -> proto.VFSFileBuffer - 50, // 149: proto.API.Query:output_type -> proto.VQLResponse - 7, // 150: proto.API.WatchEvent:output_type -> proto.EventResponse - 19, // 151: proto.API.PushEvents:output_type -> google.protobuf.Empty - 19, // 152: proto.API.WriteEvent:output_type -> google.protobuf.Empty - 83, // 153: proto.API.Scheduler:output_type -> proto.ScheduleResponse - 84, // 154: proto.API.GetSubject:output_type -> proto.DataResponse - 84, // 155: proto.API.SetSubject:output_type -> proto.DataResponse - 19, // 156: proto.API.DeleteSubject:output_type -> google.protobuf.Empty - 85, // 157: proto.API.ListChildren:output_type -> proto.ListChildrenResponse - 86, // 158: proto.API.Check:output_type -> proto.HealthCheckResponse - 80, // [80:159] is the sub-list for method output_type - 1, // [1:80] is the sub-list for method input_type + 46, // 65: proto.API.DeleteSecretDefinition:input_type -> proto.SecretDefinition + 19, // 66: proto.API.GetSecretDefinitions:input_type -> google.protobuf.Empty + 47, // 67: proto.API.AddSecret:input_type -> proto.Secret + 48, // 68: proto.API.ModifySecret:input_type -> proto.ModifySecretRequest + 47, // 69: proto.API.GetSecret:input_type -> proto.Secret + 4, // 70: proto.API.VFSGetBuffer:input_type -> proto.VFSFileBuffer + 49, // 71: proto.API.Query:input_type -> proto.VQLCollectorArgs + 6, // 72: proto.API.WatchEvent:input_type -> proto.EventRequest + 8, // 73: proto.API.PushEvents:input_type -> proto.PushEventRequest + 50, // 74: proto.API.WriteEvent:input_type -> proto.VQLResponse + 51, // 75: proto.API.Scheduler:input_type -> proto.ScheduleRequest + 52, // 76: proto.API.GetSubject:input_type -> proto.DataRequest + 52, // 77: proto.API.SetSubject:input_type -> proto.DataRequest + 52, // 78: proto.API.DeleteSubject:input_type -> proto.DataRequest + 52, // 79: proto.API.ListChildren:input_type -> proto.DataRequest + 53, // 80: proto.API.Check:input_type -> proto.HealthCheckRequest + 0, // 81: proto.API.CreateHunt:output_type -> proto.StartFlowResponse + 54, // 82: proto.API.EstimateHunt:output_type -> proto.HuntStats + 55, // 83: proto.API.GetHuntTable:output_type -> proto.GetTableResponse + 56, // 84: proto.API.ListHunts:output_type -> proto.ListHuntsResponse + 9, // 85: proto.API.GetHunt:output_type -> proto.Hunt + 19, // 86: proto.API.ModifyHunt:output_type -> google.protobuf.Empty + 55, // 87: proto.API.GetHuntFlows:output_type -> proto.GetTableResponse + 55, // 88: proto.API.GetHuntResults:output_type -> proto.GetTableResponse + 19, // 89: proto.API.NotifyClients:output_type -> google.protobuf.Empty + 57, // 90: proto.API.LabelClients:output_type -> proto.APIResponse + 58, // 91: proto.API.ListClients:output_type -> proto.SearchClientsResponse + 59, // 92: proto.API.GetClient:output_type -> proto.ApiClient + 60, // 93: proto.API.GetClientMetadata:output_type -> proto.ClientMetadata + 19, // 94: proto.API.SetClientMetadata:output_type -> google.protobuf.Empty + 55, // 95: proto.API.GetClientFlows:output_type -> proto.GetTableResponse + 61, // 96: proto.API.GetUserUITraits:output_type -> proto.ApiUser + 62, // 97: proto.API.SetGUIOptions:output_type -> proto.SetGUIOptionsResponse + 63, // 98: proto.API.GetUsers:output_type -> proto.Users + 63, // 99: proto.API.GetGlobalUsers:output_type -> proto.Users + 22, // 100: proto.API.GetUserRoles:output_type -> proto.UserRoles + 19, // 101: proto.API.SetUserRoles:output_type -> google.protobuf.Empty + 64, // 102: proto.API.GetUser:output_type -> proto.VelociraptorUser + 19, // 103: proto.API.CreateUser:output_type -> google.protobuf.Empty + 65, // 104: proto.API.GetUserFavorites:output_type -> proto.Favorites + 19, // 105: proto.API.SetPassword:output_type -> google.protobuf.Empty + 66, // 106: proto.API.VFSListDirectory:output_type -> proto.VFSListResponse + 55, // 107: proto.API.VFSListDirectoryFiles:output_type -> proto.GetTableResponse + 67, // 108: proto.API.VFSRefreshDirectory:output_type -> proto.ArtifactCollectorResponse + 66, // 109: proto.API.VFSStatDirectory:output_type -> proto.VFSListResponse + 68, // 110: proto.API.VFSStatDownload:output_type -> proto.VFSDownloadInfo + 0, // 111: proto.API.VFSDownloadFile:output_type -> proto.StartFlowResponse + 55, // 112: proto.API.GetTable:output_type -> proto.GetTableResponse + 69, // 113: proto.API.SearchFile:output_type -> proto.SearchFileResponse + 67, // 114: proto.API.CollectArtifact:output_type -> proto.ArtifactCollectorResponse + 0, // 115: proto.API.CancelFlow:output_type -> proto.StartFlowResponse + 70, // 116: proto.API.GetFlowDetails:output_type -> proto.FlowDetails + 71, // 117: proto.API.GetFlowRequests:output_type -> proto.ApiFlowRequestDetails + 72, // 118: proto.API.GetKeywordCompletions:output_type -> proto.KeywordCompletions + 31, // 119: proto.API.ReformatVQL:output_type -> proto.ReformatVQLMessage + 73, // 120: proto.API.GetArtifacts:output_type -> proto.ArtifactDescriptors + 74, // 121: proto.API.GetArtifactFile:output_type -> proto.GetArtifactResponse + 57, // 122: proto.API.SetArtifactFile:output_type -> proto.APIResponse + 75, // 123: proto.API.LoadArtifactPack:output_type -> proto.LoadArtifactPackResponse + 36, // 124: proto.API.GetToolInfo:output_type -> proto.Tool + 36, // 125: proto.API.SetToolInfo:output_type -> proto.Tool + 76, // 126: proto.API.GetReport:output_type -> proto.GetReportResponse + 29, // 127: proto.API.GetServerMonitoringState:output_type -> proto.ArtifactCollectorArgs + 29, // 128: proto.API.SetServerMonitoringState:output_type -> proto.ArtifactCollectorArgs + 39, // 129: proto.API.GetClientMonitoringState:output_type -> proto.ClientEventTable + 19, // 130: proto.API.SetClientMonitoringState:output_type -> google.protobuf.Empty + 77, // 131: proto.API.ListAvailableEventResults:output_type -> proto.ListAvailableEventResultsResponse + 78, // 132: proto.API.CreateDownloadFile:output_type -> proto.CreateDownloadResponse + 79, // 133: proto.API.GetNotebooks:output_type -> proto.Notebooks + 43, // 134: proto.API.NewNotebook:output_type -> proto.NotebookMetadata + 43, // 135: proto.API.UpdateNotebook:output_type -> proto.NotebookMetadata + 43, // 136: proto.API.NewNotebookCell:output_type -> proto.NotebookMetadata + 80, // 137: proto.API.GetNotebookCell:output_type -> proto.NotebookCell + 80, // 138: proto.API.UpdateNotebookCell:output_type -> proto.NotebookCell + 80, // 139: proto.API.RevertNotebookCell:output_type -> proto.NotebookCell + 19, // 140: proto.API.CancelNotebookCell:output_type -> google.protobuf.Empty + 19, // 141: proto.API.CreateNotebookDownloadFile:output_type -> google.protobuf.Empty + 81, // 142: proto.API.UploadNotebookAttachment:output_type -> proto.NotebookFileUploadResponse + 19, // 143: proto.API.RemoveNotebookAttachment:output_type -> google.protobuf.Empty + 19, // 144: proto.API.DefineSecret:output_type -> google.protobuf.Empty + 19, // 145: proto.API.DeleteSecretDefinition:output_type -> google.protobuf.Empty + 82, // 146: proto.API.GetSecretDefinitions:output_type -> proto.SecretDefinitionList + 19, // 147: proto.API.AddSecret:output_type -> google.protobuf.Empty + 19, // 148: proto.API.ModifySecret:output_type -> google.protobuf.Empty + 47, // 149: proto.API.GetSecret:output_type -> proto.Secret + 4, // 150: proto.API.VFSGetBuffer:output_type -> proto.VFSFileBuffer + 50, // 151: proto.API.Query:output_type -> proto.VQLResponse + 7, // 152: proto.API.WatchEvent:output_type -> proto.EventResponse + 19, // 153: proto.API.PushEvents:output_type -> google.protobuf.Empty + 19, // 154: proto.API.WriteEvent:output_type -> google.protobuf.Empty + 83, // 155: proto.API.Scheduler:output_type -> proto.ScheduleResponse + 84, // 156: proto.API.GetSubject:output_type -> proto.DataResponse + 84, // 157: proto.API.SetSubject:output_type -> proto.DataResponse + 19, // 158: proto.API.DeleteSubject:output_type -> google.protobuf.Empty + 85, // 159: proto.API.ListChildren:output_type -> proto.ListChildrenResponse + 86, // 160: proto.API.Check:output_type -> proto.HealthCheckResponse + 81, // [81:161] is the sub-list for method output_type + 1, // [1:81] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name diff --git a/api/proto/api.pb.gw.go b/api/proto/api.pb.gw.go index 888701d4b19..eebfb9e31db 100644 --- a/api/proto/api.pb.gw.go +++ b/api/proto/api.pb.gw.go @@ -22,8 +22,8 @@ import ( "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" "google.golang.org/protobuf/proto" - proto_7 "www.velocidex.com/golang/velociraptor/artifacts/proto" - proto_5 "www.velocidex.com/golang/velociraptor/flows/proto" + proto_6 "www.velocidex.com/golang/velociraptor/artifacts/proto" + proto_2 "www.velocidex.com/golang/velociraptor/flows/proto" ) // Suppress "imported and not used" errors @@ -1279,7 +1279,7 @@ func local_request_API_SearchFile_0(ctx context.Context, marshaler runtime.Marsh } func request_API_CollectArtifact_0(ctx context.Context, marshaler runtime.Marshaler, client APIClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq proto_5.ArtifactCollectorArgs + var protoReq proto_2.ArtifactCollectorArgs var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -1296,7 +1296,7 @@ func request_API_CollectArtifact_0(ctx context.Context, marshaler runtime.Marsha } func local_request_API_CollectArtifact_0(ctx context.Context, marshaler runtime.Marshaler, server APIServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq proto_5.ArtifactCollectorArgs + var protoReq proto_2.ArtifactCollectorArgs var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -1613,7 +1613,7 @@ var ( ) func request_API_GetToolInfo_0(ctx context.Context, marshaler runtime.Marshaler, client APIClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq proto_7.Tool + var protoReq proto_6.Tool var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { @@ -1629,7 +1629,7 @@ func request_API_GetToolInfo_0(ctx context.Context, marshaler runtime.Marshaler, } func local_request_API_GetToolInfo_0(ctx context.Context, marshaler runtime.Marshaler, server APIServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq proto_7.Tool + var protoReq proto_6.Tool var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { @@ -1645,7 +1645,7 @@ func local_request_API_GetToolInfo_0(ctx context.Context, marshaler runtime.Mars } func request_API_SetToolInfo_0(ctx context.Context, marshaler runtime.Marshaler, client APIClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq proto_7.Tool + var protoReq proto_6.Tool var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -1662,7 +1662,7 @@ func request_API_SetToolInfo_0(ctx context.Context, marshaler runtime.Marshaler, } func local_request_API_SetToolInfo_0(ctx context.Context, marshaler runtime.Marshaler, server APIServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq proto_7.Tool + var protoReq proto_6.Tool var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -1731,7 +1731,7 @@ func local_request_API_GetServerMonitoringState_0(ctx context.Context, marshaler } func request_API_SetServerMonitoringState_0(ctx context.Context, marshaler runtime.Marshaler, client APIClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq proto_5.ArtifactCollectorArgs + var protoReq proto_2.ArtifactCollectorArgs var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -1748,7 +1748,7 @@ func request_API_SetServerMonitoringState_0(ctx context.Context, marshaler runti } func local_request_API_SetServerMonitoringState_0(ctx context.Context, marshaler runtime.Marshaler, server APIServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq proto_5.ArtifactCollectorArgs + var protoReq proto_2.ArtifactCollectorArgs var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -1769,7 +1769,7 @@ var ( ) func request_API_GetClientMonitoringState_0(ctx context.Context, marshaler runtime.Marshaler, client APIClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq proto_5.GetClientMonitoringStateRequest + var protoReq proto_2.GetClientMonitoringStateRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { @@ -1785,7 +1785,7 @@ func request_API_GetClientMonitoringState_0(ctx context.Context, marshaler runti } func local_request_API_GetClientMonitoringState_0(ctx context.Context, marshaler runtime.Marshaler, server APIServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq proto_5.GetClientMonitoringStateRequest + var protoReq proto_2.GetClientMonitoringStateRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { @@ -1801,7 +1801,7 @@ func local_request_API_GetClientMonitoringState_0(ctx context.Context, marshaler } func request_API_SetClientMonitoringState_0(ctx context.Context, marshaler runtime.Marshaler, client APIClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq proto_5.ClientEventTable + var protoReq proto_2.ClientEventTable var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -1818,7 +1818,7 @@ func request_API_SetClientMonitoringState_0(ctx context.Context, marshaler runti } func local_request_API_SetClientMonitoringState_0(ctx context.Context, marshaler runtime.Marshaler, server APIServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq proto_5.ClientEventTable + var protoReq proto_2.ClientEventTable var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -2314,6 +2314,40 @@ func local_request_API_DefineSecret_0(ctx context.Context, marshaler runtime.Mar } +func request_API_DeleteSecretDefinition_0(ctx context.Context, marshaler runtime.Marshaler, client APIClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SecretDefinition + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.DeleteSecretDefinition(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_API_DeleteSecretDefinition_0(ctx context.Context, marshaler runtime.Marshaler, server APIServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq SecretDefinition + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.DeleteSecretDefinition(ctx, &protoReq) + return msg, metadata, err + +} + func request_API_GetSecretDefinitions_0(ctx context.Context, marshaler runtime.Marshaler, client APIClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq empty.Empty var metadata runtime.ServerMetadata @@ -3914,6 +3948,29 @@ func RegisterAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux, server }) + mux.Handle("POST", pattern_API_DeleteSecretDefinition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/proto.API/DeleteSecretDefinition", runtime.WithHTTPPathPattern("/api/v1/DeleteSecretDefinition")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_API_DeleteSecretDefinition_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_API_DeleteSecretDefinition_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_API_GetSecretDefinitions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -5327,6 +5384,26 @@ func RegisterAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux, client }) + mux.Handle("POST", pattern_API_DeleteSecretDefinition_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/proto.API/DeleteSecretDefinition", runtime.WithHTTPPathPattern("/api/v1/DeleteSecretDefinition")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_API_DeleteSecretDefinition_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_API_DeleteSecretDefinition_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_API_GetSecretDefinitions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -5539,6 +5616,8 @@ var ( pattern_API_DefineSecret_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "DefineSecret"}, "")) + pattern_API_DeleteSecretDefinition_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "DeleteSecretDefinition"}, "")) + pattern_API_GetSecretDefinitions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "GetSecretDefinitions"}, "")) pattern_API_AddSecret_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "AddSecret"}, "")) @@ -5677,6 +5756,8 @@ var ( forward_API_DefineSecret_0 = runtime.ForwardResponseMessage + forward_API_DeleteSecretDefinition_0 = runtime.ForwardResponseMessage + forward_API_GetSecretDefinitions_0 = runtime.ForwardResponseMessage forward_API_AddSecret_0 = runtime.ForwardResponseMessage diff --git a/api/proto/api.proto b/api/proto/api.proto index 534404e83d3..4e01a547ffe 100644 --- a/api/proto/api.proto +++ b/api/proto/api.proto @@ -551,6 +551,13 @@ service API { }; } + rpc DeleteSecretDefinition(SecretDefinition) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/api/v1/DeleteSecretDefinition", + body: "*", + }; + } + rpc GetSecretDefinitions(google.protobuf.Empty) returns (SecretDefinitionList) { option (google.api.http) = { get: "/api/v1/GetSecretDefinitions", diff --git a/api/proto/api_grpc.pb.go b/api/proto/api_grpc.pb.go index 79637eacbc8..f8c16b49914 100644 --- a/api/proto/api_grpc.pb.go +++ b/api/proto/api_grpc.pb.go @@ -113,6 +113,7 @@ type APIClient interface { RemoveNotebookAttachment(ctx context.Context, in *NotebookFileUploadRequest, opts ...grpc.CallOption) (*empty.Empty, error) // Secret management DefineSecret(ctx context.Context, in *SecretDefinition, opts ...grpc.CallOption) (*empty.Empty, error) + DeleteSecretDefinition(ctx context.Context, in *SecretDefinition, opts ...grpc.CallOption) (*empty.Empty, error) GetSecretDefinitions(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*SecretDefinitionList, error) AddSecret(ctx context.Context, in *Secret, opts ...grpc.CallOption) (*empty.Empty, error) ModifySecret(ctx context.Context, in *ModifySecretRequest, opts ...grpc.CallOption) (*empty.Empty, error) @@ -723,6 +724,15 @@ func (c *aPIClient) DefineSecret(ctx context.Context, in *SecretDefinition, opts return out, nil } +func (c *aPIClient) DeleteSecretDefinition(ctx context.Context, in *SecretDefinition, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/proto.API/DeleteSecretDefinition", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *aPIClient) GetSecretDefinitions(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*SecretDefinitionList, error) { out := new(SecretDefinitionList) err := c.cc.Invoke(ctx, "/proto.API/GetSecretDefinitions", in, out, opts...) @@ -1021,6 +1031,7 @@ type APIServer interface { RemoveNotebookAttachment(context.Context, *NotebookFileUploadRequest) (*empty.Empty, error) // Secret management DefineSecret(context.Context, *SecretDefinition) (*empty.Empty, error) + DeleteSecretDefinition(context.Context, *SecretDefinition) (*empty.Empty, error) GetSecretDefinitions(context.Context, *empty.Empty) (*SecretDefinitionList, error) AddSecret(context.Context, *Secret) (*empty.Empty, error) ModifySecret(context.Context, *ModifySecretRequest) (*empty.Empty, error) @@ -1244,6 +1255,9 @@ func (UnimplementedAPIServer) RemoveNotebookAttachment(context.Context, *Noteboo func (UnimplementedAPIServer) DefineSecret(context.Context, *SecretDefinition) (*empty.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method DefineSecret not implemented") } +func (UnimplementedAPIServer) DeleteSecretDefinition(context.Context, *SecretDefinition) (*empty.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteSecretDefinition not implemented") +} func (UnimplementedAPIServer) GetSecretDefinitions(context.Context, *empty.Empty) (*SecretDefinitionList, error) { return nil, status.Errorf(codes.Unimplemented, "method GetSecretDefinitions not implemented") } @@ -2454,6 +2468,24 @@ func _API_DefineSecret_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _API_DeleteSecretDefinition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SecretDefinition) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(APIServer).DeleteSecretDefinition(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/proto.API/DeleteSecretDefinition", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(APIServer).DeleteSecretDefinition(ctx, req.(*SecretDefinition)) + } + return interceptor(ctx, in, info, handler) +} + func _API_GetSecretDefinitions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(empty.Empty) if err := dec(in); err != nil { @@ -3001,6 +3033,10 @@ var API_ServiceDesc = grpc.ServiceDesc{ MethodName: "DefineSecret", Handler: _API_DefineSecret_Handler, }, + { + MethodName: "DeleteSecretDefinition", + Handler: _API_DeleteSecretDefinition_Handler, + }, { MethodName: "GetSecretDefinitions", Handler: _API_GetSecretDefinitions_Handler, diff --git a/api/secrets.go b/api/secrets.go index fbcb81a33a0..b90d13b5217 100644 --- a/api/secrets.go +++ b/api/secrets.go @@ -74,6 +74,41 @@ func (self *ApiServer) DefineSecret( return &emptypb.Empty{}, Status(self.verbose, err) } +func (self *ApiServer) DeleteSecretDefinition( + ctx context.Context, + in *api_proto.SecretDefinition) (*emptypb.Empty, error) { + + users := services.GetUserManager() + user_record, org_config_obj, err := users.GetUserFromContext(ctx) + if err != nil { + return nil, Status(self.verbose, err) + } + principal := user_record.Name + + permissions := acls.SERVER_ADMIN + perm, err := services.CheckAccess(org_config_obj, principal, permissions) + if !perm || err != nil { + return nil, PermissionDenied(err, + "User is not allowed to manage secrets.") + } + + secrets, err := services.GetSecretsService(org_config_obj) + if err != nil { + return nil, Status(self.verbose, err) + } + + err = secrets.DeleteSecretDefinition(ctx, in) + if err == nil { + services.LogAudit(ctx, + org_config_obj, principal, "User Deleted Secret Type", + ordereddict.NewDict(). + Set("principal", principal). + Set("type", in.TypeName)) + } + + return &emptypb.Empty{}, Status(self.verbose, err) +} + func (self *ApiServer) AddSecret( ctx context.Context, in *api_proto.Secret) (*emptypb.Empty, error) { diff --git a/docs/references/vql.yaml b/docs/references/vql.yaml index b3c6c4e7d71..12443a8ebb9 100644 --- a/docs/references/vql.yaml +++ b/docs/references/vql.yaml @@ -5563,13 +5563,10 @@ metadata: permissions: MACHINE_STATE - name: server_metadata - description: Returns client metadata from the datastore. Client metadata is a set - of free form key/value data + description: | + Returns server metadata from the datastore. Server metadata is a + set of free form key/value data type: Function - args: - - name: client_id - type: string - required: true category: server metadata: permissions: SERVER_ADMIN @@ -7304,4 +7301,3 @@ category: plugin metadata: permissions: FILESYSTEM_READ - diff --git a/gui/velociraptor/package.json b/gui/velociraptor/package.json index 5852dffe054..ef69c1a9541 100644 --- a/gui/velociraptor/package.json +++ b/gui/velociraptor/package.json @@ -1,6 +1,6 @@ { "name": "velociraptor", - "version": "0.7.1", + "version": "0.72", "private": true, "type": "module", "dependencies": { diff --git a/gui/velociraptor/src/components/artifacts/artifacts-upload.jsx b/gui/velociraptor/src/components/artifacts/artifacts-upload.jsx index 3f3e2383077..a8d48dcc85b 100644 --- a/gui/velociraptor/src/components/artifacts/artifacts-upload.jsx +++ b/gui/velociraptor/src/components/artifacts/artifacts-upload.jsx @@ -230,7 +230,7 @@ export default class ArtifactsUpload extends React.Component { {T("Errors")} - +
{_.map(this.state.errors, (msg, idx) => { return diff --git a/gui/velociraptor/src/components/notebooks/notebook-cell-renderer.jsx b/gui/velociraptor/src/components/notebooks/notebook-cell-renderer.jsx index e8df4f4c960..91e3be26aea 100644 --- a/gui/velociraptor/src/components/notebooks/notebook-cell-renderer.jsx +++ b/gui/velociraptor/src/components/notebooks/notebook-cell-renderer.jsx @@ -27,6 +27,7 @@ import ViewCellLogs from "./logs.jsx"; import CopyCellToNotebookDialog from './notebook-copy-cell.jsx'; import FormatTableDialog from './notebook-format-tables.jsx'; import NotebookUploads from '../notebooks/notebook-uploads.jsx'; +import { formatColumns } from "../core/table.jsx"; import {CancelToken} from 'axios'; import api from '../core/api-service.jsx'; @@ -100,19 +101,24 @@ class AddCellFromHunt extends React.PureComponent {
- - { _.isEmpty(this.state.hunts) && -
{T("No hunts exist in the system. You can start a new hunt by clicking the New Hunt button above.")}
} + { _.isEmpty(this.state.hunts) ? +
+ {T("No hunts exist in the system. You can start a new hunt by clicking the New Hunt button above.")} +
+ : + + }
@@ -1068,3 +1074,48 @@ export default class NotebookCellRenderer extends React.Component { ); } }; + +function getHuntColumns() { + return formatColumns([ + { + dataField: "state", text: T("State"), + formatter: (cell, row) => { + let stopped = row.stats && row.stats.stopped; + if (stopped || cell === "STOPPED") { + return
+
; + } + if (cell === "RUNNING") { + return
+
; + } + if (cell === "PAUSED") { + return
+
; + } + return
+
; + } + }, + { dataField: "hunt_id", text: T("Hunt ID") }, + { + dataField: "hunt_description", text: T("Description"), + sort: true, filtered: true, editable: true + }, + { + dataField: "create_time", text: T("Created"), + type: "timestamp", sort: true + }, + { + dataField: "start_time", text: T("Started"), + type: "timestamp", sort: true + }, + { + dataField: "expires", + text: T("Expires"), sort: true, + type: "timestamp" + }, + { dataField: "stats.total_clients_scheduled", text: T("Scheduled") }, + { dataField: "creator", text: T("Creator") }, + ]); +} diff --git a/gui/velociraptor/src/components/secrets/secrets.jsx b/gui/velociraptor/src/components/secrets/secrets.jsx index 9760c0d73b6..b674f4f403e 100644 --- a/gui/velociraptor/src/components/secrets/secrets.jsx +++ b/gui/velociraptor/src/components/secrets/secrets.jsx @@ -17,6 +17,7 @@ import Row from 'react-bootstrap/Row'; import DictEditor from '../forms/dict.jsx'; import UserForm from '../utils/users.jsx'; import Form from 'react-bootstrap/Form'; +import Alert from 'react-bootstrap/Alert'; import "./secrets.css"; @@ -36,22 +37,37 @@ class AddSecretTypeDialog extends Component { } addSecretDefinition = () => { + // Check the template is ok + let template = ""; + try { + template = JSON.parse(this.state.template_json); + } catch(e) { + this.setState({error: "Secret Template: " + e.toString()}); + return; + }; + this.source.cancel(); this.source = CancelToken.source(); api.post("v1/DefineSecret", { type_name: this.state.type_name, verifier: this.state.verifier, + template: template, }, this.source.token).then(response=>{ if (response.cancel) return; this.props.onClose(); + }).catch(e=>{ + this.setState({error: "Secret Template: " + e.response.data.message}); }); } state = { type_name: "", verifier: "", + template_json: "{\"Key\":\"Value\"}", + error: "", + } render() { @@ -76,7 +92,17 @@ class AddSecretTypeDialog extends Component { value={this.state.verifier} setValue={x=>this.setState({verifier:x})} /> + this.setState({template_json:x})} + /> + {this.state.error && + + {this.state.error} + + } + + + + ); + } +} + class AddSecretDialog extends Component { static propTypes = { @@ -427,6 +520,13 @@ export default class SecretManager extends Component { }); } + getItemIcon = item=>{ + if (item.built_in) { + return ; + } + return ; + }; + render() { return ( @@ -469,6 +569,15 @@ export default class SecretManager extends Component { }} /> } + { this.state.showDeleteSecretTypeDialog && + { + this.setState({showDeleteSecretTypeDialog: false}); + this.getSecretDefinitions(); + }} + /> + } @@ -477,6 +586,23 @@ export default class SecretManager extends Component { {T("Secret Types")} + + - { this.state.current_secret.name && <> + { this.state.current_secret && this.state.current_secret.name && <>