Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat: iam for adminExecute (#10350)
p0ny67d999257248
diff --git a/backend/api/v1/acl_config.go b/backend/api/v1/acl_config.goindex 431f4e3f1a..a7e530e29f 100644--- a/backend/api/v1/acl_config.go+++ b/backend/api/v1/acl_config.go@@ -43,6 +43,7 @@ var transferDatabaseMethods = map[string]bool{}var methodPermissionMap = map[string]iam.Permission{+ v1pb.SQLService_AdminExecute_FullMethodName: iam.PermissionInstancesAdminExecute,v1pb.InstanceService_ListInstances_FullMethodName: iam.PermissionInstancesList,v1pb.InstanceService_SearchInstances_FullMethodName: "", // handled in the method; if the user can get the database, then the user can get the instance.v1pb.InstanceService_GetInstance_FullMethodName: iam.PermissionInstancesGet,diff --git a/backend/api/v1/acl_iam.go b/backend/api/v1/acl_iam.goindex d55c30f8df..7bc2fac13a 100644--- a/backend/api/v1/acl_iam.go+++ b/backend/api/v1/acl_iam.go@@ -33,6 +33,7 @@ func (in *ACLInterceptor) checkIAMPermission(ctx context.Context, fullMethod strv1pb.ProjectService_CreateProject_FullMethodName,v1pb.ProjectService_DeleteProject_FullMethodName,v1pb.ProjectService_UndeleteProject_FullMethodName,+ v1pb.SQLService_AdminExecute_FullMethodName,v1pb.InstanceService_ListInstances_FullMethodName,v1pb.InstanceService_GetInstance_FullMethodName,v1pb.InstanceService_CreateInstance_FullMethodName,@@ -45,6 +46,7 @@ func (in *ACLInterceptor) checkIAMPermission(ctx context.Context, fullMethod strv1pb.InstanceService_RemoveDataSource_FullMethodName,v1pb.InstanceService_UpdateDataSource_FullMethodName,v1pb.InstanceService_SyncSlowQueries_FullMethodName,+ v1pb.InstanceRoleService_ListInstanceRoles_FullMethodName,v1pb.InstanceRoleService_GetInstanceRole_FullMethodName,v1pb.InstanceRoleService_CreateInstanceRole_FullMethodName,v1pb.InstanceRoleService_UpdateInstanceRole_FullMethodName,@@ -225,7 +227,6 @@ func isSkippedMethod(fullMethod string) bool {v1pb.LoggingService_ExportLogs_FullMethodName,v1pb.SQLService_Query_FullMethodName,v1pb.SQLService_Export_FullMethodName,- v1pb.SQLService_AdminExecute_FullMethodName,v1pb.SQLService_DifferPreview_FullMethodName,v1pb.SQLService_Check_FullMethodName,v1pb.SQLService_Pretty_FullMethodName,diff --git a/backend/component/iam/acl.yaml b/backend/component/iam/acl.yamlindex 9b82e2735b..5fb02e2d61 100644--- a/backend/component/iam/acl.yaml+++ b/backend/component/iam/acl.yaml@@ -79,6 +79,7 @@ roles:- bb.instanceRoles.list- bb.instanceRoles.undelete- bb.instanceRoles.update+ - bb.instances.adminExecute- bb.instances.create- bb.instances.delete- bb.instances.get