Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: custom iam for create database group method (#15823)
ecmadao4d1753bc070e
diff --git a/backend/api/v1/database_group_service.go b/backend/api/v1/database_group_service.goindex cbcd298e97..b791208744 100644--- a/backend/api/v1/database_group_service.go+++ b/backend/api/v1/database_group_service.go@@ -82,6 +82,18 @@ func (s *DatabaseGroupService) CreateDatabaseGroup(ctx context.Context, requestreturn s.convertStoreToAPIDatabaseGroupFull(ctx, storeDatabaseGroup, projectResourceID)}+ user, ok := ctx.Value(common.UserContextKey).(*store.UserMessage)+ if !ok {+ return nil, status.Errorf(codes.Internal, "user not found")+ }+ hasPermission, err := s.iamManager.CheckPermission(ctx, iam.PermissionProjectsUpdate, user, project.ResourceID)+ if err != nil {+ return nil, status.Errorf(codes.Internal, "failed to check permission with error: %v", err.Error())+ }+ if !hasPermission {+ return nil, status.Errorf(codes.PermissionDenied, "user does not have permission %q", iam.PermissionProjectsUpdate)+ }+databaseGroup, err := s.store.CreateDatabaseGroup(ctx, storeDatabaseGroup)if err != nil {return nil, status.Error(codes.Internal, err.Error())diff --git a/backend/api/v1/database_service.go b/backend/api/v1/database_service.goindex 1cd000a0c1..29d356ce80 100644--- a/backend/api/v1/database_service.go+++ b/backend/api/v1/database_service.go@@ -315,7 +315,7 @@ func (s *DatabaseService) ListDatabases(ctx context.Context, request *v1pb.ListD}ok, err := s.iamManager.CheckPermission(ctx, iam.PermissionProjectsGet, user, p)if err != nil {- return nil, err+ return nil, status.Errorf(codes.Internal, "failed to check permission with error: %v", err.Error())}if !ok {return nil, status.Errorf(codes.PermissionDenied, "user does not have permission %q", iam.PermissionProjectsGet)@@ -324,7 +324,7 @@ func (s *DatabaseService) ListDatabases(ctx context.Context, request *v1pb.ListDcase strings.HasPrefix(request.Parent, common.WorkspacePrefix):ok, err := s.iamManager.CheckPermission(ctx, iam.PermissionDatabasesList, user)if err != nil {- return nil, err+ return nil, status.Errorf(codes.Internal, "failed to check permission with error: %v", err.Error())}if !ok {return nil, status.Errorf(codes.PermissionDenied, "user does not have permission %q", iam.PermissionDatabasesList)@@ -332,7 +332,7 @@ func (s *DatabaseService) ListDatabases(ctx context.Context, request *v1pb.ListDcase strings.HasPrefix(request.Parent, common.InstanceNamePrefix):ok, err := s.iamManager.CheckPermission(ctx, iam.PermissionInstancesGet, user)if err != nil {- return nil, err+ return nil, status.Errorf(codes.Internal, "failed to check permission with error: %v", err.Error())}if !ok {return nil, status.Errorf(codes.PermissionDenied, "user does not have permission %q", iam.PermissionInstancesGet)diff --git a/backend/api/v1/group_service.go b/backend/api/v1/group_service.goindex 408593c2c1..5034a71603 100644--- a/backend/api/v1/group_service.go+++ b/backend/api/v1/group_service.go@@ -109,7 +109,7 @@ func (s *GroupService) UpdateGroup(ctx context.Context, request *v1pb.UpdateGrouif request.AllowMissing {ok, err := s.iamManager.CheckPermission(ctx, iam.PermissionGroupsCreate, user)if err != nil {- return nil, err+ return nil, status.Errorf(codes.Internal, "failed to check permission with error: %v", err.Error())}if !ok {return nil, status.Errorf(codes.PermissionDenied, "user does not have permission %q", iam.PermissionGroupsCreate)diff --git a/backend/api/v1/rollout_service.go b/backend/api/v1/rollout_service.goindex fb65595df8..c841500258 100644--- a/backend/api/v1/rollout_service.go+++ b/backend/api/v1/rollout_service.go@@ -562,7 +562,7 @@ func (s *RolloutService) BatchRunTasks(ctx context.Context, request *v1pb.BatchR// the user has bb.taskruns.create permission.ok, err = s.iamManager.CheckPermission(ctx, iam.PermissionTaskRunsCreate, user)if err != nil {- return nil, err+ return nil, status.Errorf(codes.Internal, "failed to check permission with error: %v", err.Error())}if !ok {if issueN != nil {diff --git a/backend/api/v1/sql_service.go b/backend/api/v1/sql_service.goindex 1362e07164..70dfbc9da9 100644--- a/backend/api/v1/sql_service.go+++ b/backend/api/v1/sql_service.go@@ -1254,7 +1254,7 @@ func (s *SQLService) accessCheck(if permission != "" {ok, err := s.iamManager.CheckPermission(ctx, permission, user, project.ResourceID)if err != nil {- return err+ return status.Errorf(codes.Internal, "failed to check permission with error: %v", err.Error())}if !ok {return status.Errorf(codes.PermissionDenied, "user %q does not have permission %q on project %q", user.Email, permission, project.ResourceID)diff --git a/backend/api/v1/user_service.go b/backend/api/v1/user_service.goindex e1ec4593cd..db54c5c6b6 100644--- a/backend/api/v1/user_service.go+++ b/backend/api/v1/user_service.go@@ -301,7 +301,7 @@ func (s *UserService) CreateUser(ctx context.Context, request *v1pb.CreateUserRe}ok, err := s.iamManager.CheckPermission(ctx, iam.PermissionUsersCreate, callerUser)if err != nil {- return nil, err+ return nil, status.Errorf(codes.Internal, "failed to check permission with error: %v", err.Error())}if !ok {return nil, status.Errorf(codes.PermissionDenied, "user does not have permission %q", iam.PermissionUsersCreate)@@ -475,7 +475,7 @@ func (s *UserService) UpdateUser(ctx context.Context, request *v1pb.UpdateUserReif callerUser.ID != userID {ok, err := s.iamManager.CheckPermission(ctx, iam.PermissionUsersUpdate, callerUser)if err != nil {- return nil, err+ return nil, status.Errorf(codes.Internal, "failed to check permission with error: %v", err.Error())}if !ok {return nil, status.Errorf(codes.PermissionDenied, "user does not have permission %q", iam.PermissionUsersUpdate)@@ -632,7 +632,7 @@ func (s *UserService) DeleteUser(ctx context.Context, request *v1pb.DeleteUserRe}ok, err := s.iamManager.CheckPermission(ctx, iam.PermissionUsersDelete, callerUser)if err != nil {- return nil, err+ return nil, status.Errorf(codes.Internal, "failed to check permission with error: %v", err.Error())}if !ok {return nil, status.Errorf(codes.PermissionDenied, "user does not have permission %q", iam.PermissionUsersDelete)@@ -730,7 +730,7 @@ func (s *UserService) UndeleteUser(ctx context.Context, request *v1pb.UndeleteUs}ok, err := s.iamManager.CheckPermission(ctx, iam.PermissionUsersUndelete, callerUser)if err != nil {- return nil, err+ return nil, status.Errorf(codes.Internal, "failed to check permission with error: %v", err.Error())}if !ok {return nil, status.Errorf(codes.PermissionDenied, "user does not have permission %q", iam.PermissionUsersUndelete)diff --git a/backend/api/v1/worksheet_service.go b/backend/api/v1/worksheet_service.goindex 1a6b92e09b..1a1a1fa24c 100644--- a/backend/api/v1/worksheet_service.go+++ b/backend/api/v1/worksheet_service.go@@ -458,7 +458,7 @@ func (s *WorksheetService) canWriteWorksheet(ctx context.Context, worksheet *sto}ok, err := s.iamManager.CheckPermission(ctx, iam.PermissionWorksheetsManage, user)if err != nil {- return false, err+ return false, status.Errorf(codes.Internal, "failed to check permission with error: %v", err.Error())}if ok {return true, nil@@ -476,7 +476,7 @@ func (s *WorksheetService) canWriteWorksheet(ctx context.Context, worksheet *sto}ok, err := s.iamManager.CheckPermission(ctx, iam.PermissionWorksheetsGet, user, project.ResourceID)if err != nil {- return false, err+ return false, status.Errorf(codes.Internal, "failed to check permission with error: %v", err.Error())}if ok {return true, nil@@ -503,7 +503,7 @@ func (s *WorksheetService) canReadWorksheet(ctx context.Context, worksheet *stor}ok, err := s.iamManager.CheckPermission(ctx, iam.PermissionWorksheetsManage, user)if err != nil {- return false, err+ return false, status.Errorf(codes.Internal, "failed to check permission with error: %v", err.Error())}if ok {return true, nil@@ -521,7 +521,7 @@ func (s *WorksheetService) canReadWorksheet(ctx context.Context, worksheet *stor}ok, err := s.iamManager.CheckPermission(ctx, iam.PermissionWorksheetsGet, user, project.ResourceID)if err != nil {- return false, err+ return false, status.Errorf(codes.Internal, "failed to check permission with error: %v", err.Error())}if ok {return true, nildiff --git a/frontend/src/types/proto/google/protobuf/descriptor.ts b/frontend/src/types/proto/google/protobuf/descriptor.tsindex 1576d9993b..2fdf22f5e2 100644--- a/frontend/src/types/proto/google/protobuf/descriptor.ts+++ b/frontend/src/types/proto/google/protobuf/descriptor.ts@@ -210,19 +210,11 @@ export interface FileDescriptorProto {* The supported values are "proto2", "proto3", and "editions".** If `edition` is present, this value must be "editions".- * WARNING: This field should only be used by protobuf plugins or special- * cases like the proto compiler. Other uses are discouraged and- * developers should rely on the protoreflect APIs for their client language.*/syntax?:| string| undefined;- /**- * The edition of the proto file.- * WARNING: This field should only be used by protobuf plugins or special- * cases like the proto compiler. Other uses are discouraged and- * developers should rely on the protoreflect APIs for their client language.- */+ /** The edition of the proto file. */edition?: Edition | undefined;}@@ -939,12 +931,7 @@ export interface FileOptions {rubyPackage?:| string| undefined;- /**- * Any features defined in the specific edition.- * WARNING: This field should only be used by protobuf plugins or special- * cases like the proto compiler. Other uses are discouraged and- * developers should rely on the protoreflect APIs for their client language.- */+ /** Any features defined in the specific edition. */features?:| FeatureSet| undefined;@@ -1096,12 +1083,7 @@ export interface MessageOptions {deprecatedLegacyJsonFieldConflicts?:| boolean| undefined;- /**- * Any features defined in the specific edition.- * WARNING: This field should only be used by protobuf plugins or special- * cases like the proto compiler. Other uses are discouraged and- * developers should rely on the protoreflect APIs for their client language.- */+ /** Any features defined in the specific edition. */features?:| FeatureSet| undefined;@@ -1206,12 +1188,7 @@ export interface FieldOptions {retention?: FieldOptions_OptionRetention | undefined;targets: FieldOptions_OptionTargetType[];editionDefaults: FieldOptions_EditionDefault[];- /**- * Any features defined in the specific edition.- * WARNING: This field should only be used by protobuf plugins or special- * cases like the proto compiler. Other uses are discouraged and- * developers should rely on the protoreflect APIs for their client language.- */+ /** Any features defined in the specific edition. */features?: FeatureSet | undefined;featureSupport?:| FieldOptions_FeatureSupport@@ -1547,12 +1524,7 @@ export interface FieldOptions_FeatureSupport {}export interface OneofOptions {- /**- * Any features defined in the specific edition.- * WARNING: This field should only be used by protobuf plugins or special- * cases like the proto compiler. Other uses are discouraged and- * developers should rely on the protoreflect APIs for their client language.- */+ /** Any features defined in the specific edition. */features?:| FeatureSet| undefined;@@ -1590,12 +1562,7 @@ export interface EnumOptions {deprecatedLegacyJsonFieldConflicts?:| boolean| undefined;- /**- * Any features defined in the specific edition.- * WARNING: This field should only be used by protobuf plugins or special- * cases like the proto compiler. Other uses are discouraged and- * developers should rely on the protoreflect APIs for their client language.- */+ /** Any features defined in the specific edition. */features?:| FeatureSet| undefined;@@ -1613,12 +1580,7 @@ export interface EnumValueOptions {deprecated?:| boolean| undefined;- /**- * Any features defined in the specific edition.- * WARNING: This field should only be used by protobuf plugins or special- * cases like the proto compiler. Other uses are discouraged and- * developers should rely on the protoreflect APIs for their client language.- */+ /** Any features defined in the specific edition. */features?:| FeatureSet| undefined;@@ -1639,12 +1601,7 @@ export interface EnumValueOptions {}export interface ServiceOptions {- /**- * Any features defined in the specific edition.- * WARNING: This field should only be used by protobuf plugins or special- * cases like the proto compiler. Other uses are discouraged and- * developers should rely on the protoreflect APIs for their client language.- */+ /** Any features defined in the specific edition. */features?:| FeatureSet| undefined;@@ -1672,12 +1629,7 @@ export interface MethodOptions {idempotencyLevel?:| MethodOptions_IdempotencyLevel| undefined;- /**- * Any features defined in the specific edition.- * WARNING: This field should only be used by protobuf plugins or special- * cases like the proto compiler. Other uses are discouraged and- * developers should rely on the protoreflect APIs for their client language.- */+ /** Any features defined in the specific edition. */features?:| FeatureSet| undefined;@@ -1794,7 +1746,6 @@ export interface FeatureSet {utf8Validation?: FeatureSet_Utf8Validation | undefined;messageEncoding?: FeatureSet_MessageEncoding | undefined;jsonFormat?: FeatureSet_JsonFormat | undefined;- enforceNamingStyle?: FeatureSet_EnforceNamingStyle | undefined;}export enum FeatureSet_FieldPresence {@@ -2123,59 +2074,6 @@ export function featureSet_JsonFormatToNumber(object: FeatureSet_JsonFormat): nu}}-export enum FeatureSet_EnforceNamingStyle {- ENFORCE_NAMING_STYLE_UNKNOWN = "ENFORCE_NAMING_STYLE_UNKNOWN",- STYLE2024 = "STYLE2024",- STYLE_LEGACY = "STYLE_LEGACY",- UNRECOGNIZED = "UNRECOGNIZED",-}--export function featureSet_EnforceNamingStyleFromJSON(object: any): FeatureSet_EnforceNamingStyle {- switch (object) {- case 0:- case "ENFORCE_NAMING_STYLE_UNKNOWN":- return FeatureSet_EnforceNamingStyle.ENFORCE_NAMING_STYLE_UNKNOWN;- case 1:- case "STYLE2024":- return FeatureSet_EnforceNamingStyle.STYLE2024;- case 2:- case "STYLE_LEGACY":- return FeatureSet_EnforceNamingStyle.STYLE_LEGACY;- case -1:- case "UNRECOGNIZED":- default:- return FeatureSet_EnforceNamingStyle.UNRECOGNIZED;- }-}--export function featureSet_EnforceNamingStyleToJSON(object: FeatureSet_EnforceNamingStyle): string {- switch (object) {- case FeatureSet_EnforceNamingStyle.ENFORCE_NAMING_STYLE_UNKNOWN:- return "ENFORCE_NAMING_STYLE_UNKNOWN";- case FeatureSet_EnforceNamingStyle.STYLE2024:- return "STYLE2024";- case FeatureSet_EnforceNamingStyle.STYLE_LEGACY:- return "STYLE_LEGACY";- case FeatureSet_EnforceNamingStyle.UNRECOGNIZED:- default:- return "UNRECOGNIZED";- }-}--export function featureSet_EnforceNamingStyleToNumber(object: FeatureSet_EnforceNamingStyle): number {- switch (object) {- case FeatureSet_EnforceNamingStyle.ENFORCE_NAMING_STYLE_UNKNOWN:- return 0;- case FeatureSet_EnforceNamingStyle.STYLE2024:- return 1;- case FeatureSet_EnforceNamingStyle.STYLE_LEGACY:- return 2;- case FeatureSet_EnforceNamingStyle.UNRECOGNIZED:- default:- return -1;- }-}-/*** A compiled specification for the defaults of a set of features. These* messages are generated from FeatureSet extensions and can be used to seed@@ -6262,7 +6160,6 @@ function createBaseFeatureSet(): FeatureSet {utf8Validation: FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN,messageEncoding: FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN,jsonFormat: FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN,- enforceNamingStyle: FeatureSet_EnforceNamingStyle.ENFORCE_NAMING_STYLE_UNKNOWN,};}@@ -6297,12 +6194,6 @@ export const FeatureSet: MessageFns<FeatureSet> = {if (message.jsonFormat !== undefined && message.jsonFormat !== FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN) {writer.uint32(48).int32(featureSet_JsonFormatToNumber(message.jsonFormat));}- if (- message.enforceNamingStyle !== undefined &&- message.enforceNamingStyle !== FeatureSet_EnforceNamingStyle.ENFORCE_NAMING_STYLE_UNKNOWN- ) {- writer.uint32(56).int32(featureSet_EnforceNamingStyleToNumber(message.enforceNamingStyle));- }return writer;},@@ -6361,14 +6252,6 @@ export const FeatureSet: MessageFns<FeatureSet> = {message.jsonFormat = featureSet_JsonFormatFromJSON(reader.int32());continue;}- case 7: {- if (tag !== 56) {- break;- }-- message.enforceNamingStyle = featureSet_EnforceNamingStyleFromJSON(reader.int32());- continue;- }}if ((tag & 7) === 4 || tag === 0) {break;@@ -6398,9 +6281,6 @@ export const FeatureSet: MessageFns<FeatureSet> = {jsonFormat: isSet(object.jsonFormat)? featureSet_JsonFormatFromJSON(object.jsonFormat): FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN,- enforceNamingStyle: isSet(object.enforceNamingStyle)- ? featureSet_EnforceNamingStyleFromJSON(object.enforceNamingStyle)- : FeatureSet_EnforceNamingStyle.ENFORCE_NAMING_STYLE_UNKNOWN,};},@@ -6435,12 +6315,6 @@ export const FeatureSet: MessageFns<FeatureSet> = {if (message.jsonFormat !== undefined && message.jsonFormat !== FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN) {obj.jsonFormat = featureSet_JsonFormatToJSON(message.jsonFormat);}- if (- message.enforceNamingStyle !== undefined &&- message.enforceNamingStyle !== FeatureSet_EnforceNamingStyle.ENFORCE_NAMING_STYLE_UNKNOWN- ) {- obj.enforceNamingStyle = featureSet_EnforceNamingStyleToJSON(message.enforceNamingStyle);- }return obj;},@@ -6456,8 +6330,6 @@ export const FeatureSet: MessageFns<FeatureSet> = {message.utf8Validation = object.utf8Validation ?? FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN;message.messageEncoding = object.messageEncoding ?? FeatureSet_MessageEncoding.MESSAGE_ENCODING_UNKNOWN;message.jsonFormat = object.jsonFormat ?? FeatureSet_JsonFormat.JSON_FORMAT_UNKNOWN;- message.enforceNamingStyle = object.enforceNamingStyle ??- FeatureSet_EnforceNamingStyle.ENFORCE_NAMING_STYLE_UNKNOWN;return message;},};diff --git a/frontend/src/types/proto/google/protobuf/wrappers.ts b/frontend/src/types/proto/google/protobuf/wrappers.tsindex bb730b69e5..07224c0f85 100644--- a/frontend/src/types/proto/google/protobuf/wrappers.ts+++ b/frontend/src/types/proto/google/protobuf/wrappers.ts@@ -14,9 +14,6 @@ export const protobufPackage = "google.protobuf";* Wrapper message for `double`.** The JSON representation for `DoubleValue` is JSON number.- *- * Not recommended for use in new APIs, but still useful for legacy APIs and- * has no plan to be removed.*/export interface DoubleValue {/** The double value. */@@ -27,9 +24,6 @@ export interface DoubleValue {* Wrapper message for `float`.** The JSON representation for `FloatValue` is JSON number.- *- * Not recommended for use in new APIs, but still useful for legacy APIs and- * has no plan to be removed.*/export interface FloatValue {/** The float value. */@@ -40,9 +34,6 @@ export interface FloatValue {* Wrapper message for `int64`.** The JSON representation for `Int64Value` is JSON string.- *- * Not recommended for use in new APIs, but still useful for legacy APIs and- * has no plan to be removed.*/export interface Int64Value {/** The int64 value. */@@ -53,9 +44,6 @@ export interface Int64Value {* Wrapper message for `uint64`.** The JSON representation for `UInt64Value` is JSON string.- *- * Not recommended for use in new APIs, but still useful for legacy APIs and- * has no plan to be removed.*/export interface UInt64Value {/** The uint64 value. */@@ -66,9 +54,6 @@ export interface UInt64Value {* Wrapper message for `int32`.** The JSON representation for `Int32Value` is JSON number.- *- * Not recommended for use in new APIs, but still useful for legacy APIs and- * has no plan to be removed.*/export interface Int32Value {/** The int32 value. */@@ -79,9 +64,6 @@ export interface Int32Value {* Wrapper message for `uint32`.** The JSON representation for `UInt32Value` is JSON number.- *- * Not recommended for use in new APIs, but still useful for legacy APIs and- * has no plan to be removed.*/export interface UInt32Value {/** The uint32 value. */@@ -92,9 +74,6 @@ export interface UInt32Value {* Wrapper message for `bool`.** The JSON representation for `BoolValue` is JSON `true` and `false`.- *- * Not recommended for use in new APIs, but still useful for legacy APIs and- * has no plan to be removed.*/export interface BoolValue {/** The bool value. */@@ -105,9 +84,6 @@ export interface BoolValue {* Wrapper message for `string`.** The JSON representation for `StringValue` is JSON string.- *- * Not recommended for use in new APIs, but still useful for legacy APIs and- * has no plan to be removed.*/export interface StringValue {/** The string value. */@@ -118,9 +94,6 @@ export interface StringValue {* Wrapper message for `bytes`.** The JSON representation for `BytesValue` is JSON string.- *- * Not recommended for use in new APIs, but still useful for legacy APIs and- * has no plan to be removed.*/export interface BytesValue {/** The bytes value. */diff --git a/frontend/src/types/proto/v1/database_group_service.ts b/frontend/src/types/proto/v1/database_group_service.tsindex e35df7aa70..90b64c3b81 100644--- a/frontend/src/types/proto/v1/database_group_service.ts+++ b/frontend/src/types/proto/v1/database_group_service.ts@@ -1031,7 +1031,7 @@ export const DatabaseGroupServiceDefinition = {800010: [new Uint8Array([18, 98, 98, 46, 112, 114, 111, 106, 101, 99, 116, 115, 46, 117, 112, 100, 97, 116, 101]),],- 800016: [new Uint8Array([1])],+ 800016: [new Uint8Array([2])],800024: [new Uint8Array([1])],578365826: [new Uint8Array([diff --git a/frontend/src/types/proto/v1/instance_service.ts b/frontend/src/types/proto/v1/instance_service.tsindex 0c29642f25..4fc406f47f 100644--- a/frontend/src/types/proto/v1/instance_service.ts+++ b/frontend/src/types/proto/v1/instance_service.ts@@ -104,7 +104,7 @@ export interface ListInstancesRequest {/** Show deleted instances if specified. */showDeleted: boolean;/**- * Filter the project.+ * Filter the instance.* Supported filters:* - name* - resource_iddiff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex b5db39ab5c..23ae2ddca1 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -919,7 +919,7 @@ paths:- name: filterin: querydescription: |-- Filter the project.+ Filter the instance.Supported filters:- name- resource_iddiff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 1e4278fc78..dda28b05ed 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -1556,7 +1556,7 @@ This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |When paginating, all other parameters provided to `ListInstances` must match the call that provided the page token. || show_deleted | [bool](#bool) | | Show deleted instances if specified. |-| filter | [string](#string) | | Filter the project. Supported filters: - name - resource_id - environment - state - engine - host - port - project+| filter | [string](#string) | | Filter the instance. Supported filters: - name - resource_id - environment - state - engine - host - port - projectFor example: name == "sample instance" name.matches("sample") resource_id = "sample-instance" resource_id.matches("sample") state == "DELETED" environment == "environments/test" engine == "MYSQL" engine in ["MYSQL", "POSTGRES"] !(engine in ["MYSQL", "POSTGRES"]) host == "127.0.0.1" port == "54321" project == "projects/sample-project" You can combine filter conditions like: name.matches("sample") && environment == "environments/test" host == "127.0.0.1" && port == "54321" |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex c42304ef67..6c36f6d2d9 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -5070,7 +5070,7 @@ the call that provided the page token. </p></td><td>filter</td><td><a href="#string">string</a></td><td></td>- <td><p>Filter the project.+ <td><p>Filter the instance.Supported filters:- name- resource_iddiff --git a/proto/generated-go/v1/database_group_service.pb.go b/proto/generated-go/v1/database_group_service.pb.goindex 29f7a4defd..06cd2413f6 100644--- a/proto/generated-go/v1/database_group_service.pb.go+++ b/proto/generated-go/v1/database_group_service.pb.go@@ -617,7 +617,7 @@ const file_v1_database_group_service_proto_rawDesc = "" +"\x14DatabaseGroupService\x12\xb5\x01\n" +"\x12ListDatabaseGroups\x12&.bytebase.v1.ListDatabaseGroupsRequest\x1a'.bytebase.v1.ListDatabaseGroupsResponse\"N\xdaA\x06parent\x8a\xea0\x0fbb.projects.get\x90\xea0\x01\x82\xd3\xe4\x93\x02(\x12&/v1/{parent=projects/*}/databaseGroups\x12\xa2\x01\n" +"\x10GetDatabaseGroup\x12$.bytebase.v1.GetDatabaseGroupRequest\x1a\x1a.bytebase.v1.DatabaseGroup\"L\xdaA\x04name\x8a\xea0\x0fbb.projects.get\x90\xea0\x01\x82\xd3\xe4\x93\x02(\x12&/v1/{name=projects/*/databaseGroups/*}\x12\xcf\x01\n" +- "\x13CreateDatabaseGroup\x12'.bytebase.v1.CreateDatabaseGroupRequest\x1a\x1a.bytebase.v1.DatabaseGroup\"s\xdaA\x14parent,databaseGroup\x8a\xea0\x12bb.projects.update\x90\xea0\x01\x98\xea0\x01\x82\xd3\xe4\x93\x028:\x0edatabase_group\"&/v1/{parent=projects/*}/databaseGroups\x12\xe5\x01\n" ++ "\x13CreateDatabaseGroup\x12'.bytebase.v1.CreateDatabaseGroupRequest\x1a\x1a.bytebase.v1.DatabaseGroup\"s\xdaA\x14parent,databaseGroup\x8a\xea0\x12bb.projects.update\x90\xea0\x02\x98\xea0\x01\x82\xd3\xe4\x93\x028:\x0edatabase_group\"&/v1/{parent=projects/*}/databaseGroups\x12\xe5\x01\n" +"\x13UpdateDatabaseGroup\x12'.bytebase.v1.UpdateDatabaseGroupRequest\x1a\x1a.bytebase.v1.DatabaseGroup\"\x88\x01\xdaA\x1adatabase_group,update_mask\x8a\xea0\x12bb.projects.update\x90\xea0\x01\x98\xea0\x01\x82\xd3\xe4\x93\x02G:\x0edatabase_group25/v1/{database_group.name=projects/*/databaseGroups/*}\x12\xab\x01\n" +"\x13DeleteDatabaseGroup\x12'.bytebase.v1.DeleteDatabaseGroupRequest\x1a\x16.google.protobuf.Empty\"S\xdaA\x04name\x8a\xea0\x12bb.projects.update\x90\xea0\x01\x98\xea0\x01\x82\xd3\xe4\x93\x02(*&/v1/{name=projects/*/databaseGroups/*}B\x11Z\x0fgenerated-go/v1b\x06proto3"diff --git a/proto/generated-go/v1/instance_service.pb.go b/proto/generated-go/v1/instance_service.pb.goindex f31354952f..a28d9ca0dc 100644--- a/proto/generated-go/v1/instance_service.pb.go+++ b/proto/generated-go/v1/instance_service.pb.go@@ -397,7 +397,7 @@ type ListInstancesRequest struct {PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`// Show deleted instances if specified.ShowDeleted bool `protobuf:"varint,3,opt,name=show_deleted,json=showDeleted,proto3" json:"show_deleted,omitempty"`- // Filter the project.+ // Filter the instance.// Supported filters:// - name// - resource_iddiff --git a/proto/v1/database_group_service.proto b/proto/v1/database_group_service.protoindex c67e76fe55..0ee0b5eb5b 100644--- a/proto/v1/database_group_service.proto+++ b/proto/v1/database_group_service.proto@@ -35,7 +35,7 @@ service DatabaseGroupService {};option (google.api.method_signature) = "parent,databaseGroup";option (bytebase.v1.permission) = "bb.projects.update";- option (bytebase.v1.auth_method) = IAM;+ option (bytebase.v1.auth_method) = CUSTOM;option (bytebase.v1.audit) = true;}diff --git a/proto/v1/instance_service.proto b/proto/v1/instance_service.protoindex 9ad205bce9..325187bca5 100644--- a/proto/v1/instance_service.proto+++ b/proto/v1/instance_service.proto@@ -154,7 +154,7 @@ message ListInstancesRequest {// Show deleted instances if specified.bool show_deleted = 3;- // Filter the project.+ // Filter the instance.// Supported filters:// - name// - resource_id