Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: migrate sql editor related permissions and roles (#14453)
Liu Jif11ad74d4cd3
diff --git a/README.md b/README.mdindex bfed143ed5..ea4651709e 100644--- a/README.md+++ b/README.md@@ -208,7 +208,7 @@ More details in [Roles and Permissions Doc](https://www.bytebase.com/docs/concepBytebase employs RBAC (role based access control) and provides two role sets at the workspace and project level:- Workspace roles: `Admin`, `DBA`, `Member`. The workspace role maps to the role in an organization.-- Project roles: `Owner`, `Developer`, `Releaser`, `Querier`, `Exporter`, `Viewer`. The project level role maps to the role in a specific team or project.+- Project roles: `Owner`, `Developer`, `Releaser`, `SQL Editor User`, `Exporter`, `Viewer`. The project level role maps to the role in a specific team or project.Every user is assigned a workspace role, and if a particular user is involved in a particular project, then she will also be assigned a project role accordingly.diff --git a/backend/api/v1/project_service.go b/backend/api/v1/project_service.goindex 72ce046305..755c3edc7c 100644--- a/backend/api/v1/project_service.go+++ b/backend/api/v1/project_service.go@@ -1513,8 +1513,8 @@ func (*ProjectService) validateBindings(bindings []*v1pb.Binding, roles []*v1pb.return err}- // Only validate when maximumRoleExpiration is set and the role is ProjectQuerier or ProjectExporter.- rolesToValidate := []string{fmt.Sprintf("roles/%s", api.ProjectQuerier), fmt.Sprintf("roles/%s", api.ProjectExporter)}+ // Only validate when maximumRoleExpiration is set and the role is SQLEditorUser or ProjectExporter.+ rolesToValidate := []string{fmt.Sprintf("roles/%s", api.SQLEditorUser), fmt.Sprintf("roles/%s", api.ProjectExporter)}if maximumRoleExpiration != nil && binding.Condition != nil && binding.Condition.Expression != "" && slices.Contains(rolesToValidate, binding.Role) {if err := validateIAMPolicyExpression(binding.Condition.Expression, maximumRoleExpiration); err != nil {return errdiff --git a/backend/api/v1/project_service_test.go b/backend/api/v1/project_service_test.goindex 99121288d5..6aa26a9cb4 100644--- a/backend/api/v1/project_service_test.go+++ b/backend/api/v1/project_service_test.go@@ -416,14 +416,14 @@ func TestFindIamPolicyDeltas(t *testing.T) {oldPolicy: &storepb.IamPolicy{Bindings: []*storepb.Binding{{- Role: "roles/projectQuerier",+ Role: "roles/sqlEditorUser",Members: []string{"usr103",},Condition: &expr.Expr{},},{- Role: "roles/projectQuerier",+ Role: "roles/sqlEditorUser",Members: []string{"usr103",},@@ -434,7 +434,7 @@ func TestFindIamPolicyDeltas(t *testing.T) {newIamPolicy: &storepb.IamPolicy{Bindings: []*storepb.Binding{{- Role: "roles/projectQuerier",+ Role: "roles/sqlEditorUser",Members: []string{"usr103",},@@ -449,7 +449,7 @@ func TestFindIamPolicyDeltas(t *testing.T) {oldPolicy: &storepb.IamPolicy{Bindings: []*storepb.Binding{{- Role: "roles/projectQuerier",+ Role: "roles/sqlEditorUser",Members: []string{"usr103",},@@ -462,7 +462,7 @@ func TestFindIamPolicyDeltas(t *testing.T) {newIamPolicy: &storepb.IamPolicy{Bindings: []*storepb.Binding{{- Role: "roles/projectQuerier",+ Role: "roles/sqlEditorUser",Members: []string{"usr103",},@@ -484,7 +484,7 @@ func TestFindIamPolicyDeltas(t *testing.T) {{Action: v1pb.BindingDelta_ADD,Member: "usr103",- Role: "roles/projectQuerier",+ Role: "roles/sqlEditorUser",Condition: &expr.Expr{Expression: "time > 1000",},@@ -504,7 +504,7 @@ func TestFindIamPolicyDeltas(t *testing.T) {{Action: v1pb.BindingDelta_REMOVE,Member: "usr103",- Role: "roles/projectQuerier",+ Role: "roles/sqlEditorUser",Condition: &expr.Expr{Expression: "time > 500",},diff --git a/backend/api/v1/sql_service.go b/backend/api/v1/sql_service.goindex 94f26e3b50..d25af2d809 100644--- a/backend/api/v1/sql_service.go+++ b/backend/api/v1/sql_service.go@@ -1004,18 +1004,18 @@ func (s *SQLService) accessCheck(case base.QueryTypeUnknown:return status.Error(codes.PermissionDenied, "disallowed query type")case base.DDL:- permission = iam.PermissionDatabasesQueryDDL+ permission = iam.PermissionSQLDdlcase base.DML:- permission = iam.PermissionDatabasesQueryDML+ permission = iam.PermissionSQLDmlcase base.Explain:- permission = iam.PermissionDatabasesQueryExplain+ permission = iam.PermissionSQLExplaincase base.SelectInfoSchema:- permission = iam.PermissionDatabasesQueryInfo+ permission = iam.PermissionSQLInfocase base.Select:// Conditional permission check below.}if isExplain {- permission = iam.PermissionDatabasesQueryExplain+ permission = iam.PermissionSQLExplain}if span.Type == base.DDL || span.Type == base.DML {if err := checkDataSourceQueryPolicy(ctx, s.store, database, span.Type); err != nil {@@ -1173,7 +1173,7 @@ func validateQueryRequest(instance *store.InstanceMessage, statement string) err}func (s *SQLService) hasDatabaseAccessRights(ctx context.Context, user *store.UserMessage, iamPolicies []*storepb.IamPolicy, attributes map[string]any, isExport bool) (bool, error) {- wantPermission := iam.PermissionDatabasesQuery+ wantPermission := iam.PermissionSQLSelectif isExport {wantPermission = iam.PermissionDatabasesExport}diff --git a/backend/component/iam/acl.yaml b/backend/component/iam/acl.yamlindex 41814c62a2..30b513f431 100644--- a/backend/component/iam/acl.yaml+++ b/backend/component/iam/acl.yaml@@ -27,11 +27,6 @@ roles:- bb.databases.get- bb.databases.getSchema- bb.databases.list- - bb.databases.query- - bb.databases.queryDDL- - bb.databases.queryDML- - bb.databases.queryExplain- - bb.databases.queryInfo- bb.databases.sync- bb.databases.update- bb.environments.create@@ -45,7 +40,6 @@ roles:- bb.identityProviders.get- bb.identityProviders.undelete- bb.identityProviders.update- - bb.instances.adminExecute- bb.instances.create- bb.instances.delete- bb.instances.get@@ -110,6 +104,12 @@ roles:- bb.groups.get- bb.groups.list- bb.groups.update+ - bb.sql.admin+ - bb.sql.ddl+ - bb.sql.dml+ - bb.sql.explain+ - bb.sql.info+ - bb.sql.select- bb.users.create- bb.users.delete- bb.users.undelete@@ -156,11 +156,6 @@ roles:- bb.databases.get- bb.databases.getSchema- bb.databases.list- - bb.databases.query- - bb.databases.queryDDL- - bb.databases.queryDML- - bb.databases.queryExplain- - bb.databases.queryInfo- bb.databases.sync- bb.databases.update- bb.environments.create@@ -174,7 +169,6 @@ roles:- bb.identityProviders.get- bb.identityProviders.undelete- bb.identityProviders.update- - bb.instances.adminExecute- bb.instances.create- bb.instances.delete- bb.instances.get@@ -232,6 +226,12 @@ roles:- bb.sheets.get- bb.sheets.update- bb.slowQueries.list+ - bb.sql.admin+ - bb.sql.ddl+ - bb.sql.dml+ - bb.sql.explain+ - bb.sql.info+ - bb.sql.select- bb.taskRuns.create- bb.taskRuns.list- bb.groups.get@@ -297,11 +297,6 @@ roles:- bb.databases.get- bb.databases.getSchema- bb.databases.list- - bb.databases.query- - bb.databases.queryDDL- - bb.databases.queryDML- - bb.databases.queryExplain- - bb.databases.queryInfo- bb.databases.sync- bb.databases.update- bb.issueComments.create@@ -329,6 +324,11 @@ roles:- bb.sheets.get- bb.sheets.update- bb.slowQueries.list+ - bb.sql.ddl+ - bb.sql.dml+ - bb.sql.explain+ - bb.sql.info+ - bb.sql.select- bb.taskRuns.list- bb.vcsConnectors.create- bb.vcsConnectors.delete@@ -381,20 +381,20 @@ roles:- bb.taskRuns.list- bb.vcsConnectors.get- bb.vcsConnectors.list- - name: roles/projectQuerier- title: Project querier+ - name: roles/sqlEditorUser+ title: SQL Editor Userpermissions:- bb.databases.check- bb.databases.get- bb.databases.getSchema- bb.databases.list- - bb.databases.query- - bb.databases.queryDDL- - bb.databases.queryDML- - bb.databases.queryExplain- - bb.databases.queryInfo- bb.projects.get- bb.projects.getIamPolicy+ - bb.sql.ddl+ - bb.sql.dml+ - bb.sql.explain+ - bb.sql.info+ - bb.sql.select- bb.worksheets.get- name: roles/projectExportertitle: Project exporterdiff --git a/backend/component/iam/permission.go b/backend/component/iam/permission.goindex 8fd4960894..c4b1ada8e9 100644--- a/backend/component/iam/permission.go+++ b/backend/component/iam/permission.go@@ -28,11 +28,12 @@ const (PermissionDatabasesGet Permission = "bb.databases.get"PermissionDatabasesGetSchema Permission = "bb.databases.getSchema"PermissionDatabasesList Permission = "bb.databases.list"- PermissionDatabasesQuery Permission = "bb.databases.query"- PermissionDatabasesQueryDDL Permission = "bb.databases.queryDDL"- PermissionDatabasesQueryDML Permission = "bb.databases.queryDML"- PermissionDatabasesQueryExplain Permission = "bb.databases.queryExplain"- PermissionDatabasesQueryInfo Permission = "bb.databases.queryInfo"+ PermissionSQLSelect Permission = "bb.sql.select"+ PermissionSQLDdl Permission = "bb.sql.ddl"+ PermissionSQLDml Permission = "bb.sql.dml"+ PermissionSQLExplain Permission = "bb.sql.explain"+ PermissionSQLInfo Permission = "bb.sql.info"+ PermissionSQLAdmin Permission = "bb.sql.admin"PermissionDatabasesSync Permission = "bb.databases.sync"PermissionDatabasesUpdate Permission = "bb.databases.update"PermissionEnvironmentsCreate Permission = "bb.environments.create"@@ -46,7 +47,6 @@ const (PermissionIdentityProvidersGet Permission = "bb.identityProviders.get"PermissionIdentityProvidersUndelete Permission = "bb.identityProviders.undelete"PermissionIdentityProvidersUpdate Permission = "bb.identityProviders.update"- PermissionInstancesAdminExecute Permission = "bb.instances.adminExecute"PermissionInstancesCreate Permission = "bb.instances.create"PermissionInstancesDelete Permission = "bb.instances.delete"PermissionInstancesGet Permission = "bb.instances.get"@@ -157,11 +157,12 @@ var allPermissions = []Permission{PermissionDatabasesGet,PermissionDatabasesGetSchema,PermissionDatabasesList,- PermissionDatabasesQuery,- PermissionDatabasesQueryDDL,- PermissionDatabasesQueryDML,- PermissionDatabasesQueryExplain,- PermissionDatabasesQueryInfo,+ PermissionSQLSelect,+ PermissionSQLDdl,+ PermissionSQLDml,+ PermissionSQLExplain,+ PermissionSQLInfo,+ PermissionSQLAdmin,PermissionDatabasesSync,PermissionDatabasesUpdate,PermissionEnvironmentsCreate,@@ -175,7 +176,6 @@ var allPermissions = []Permission{PermissionIdentityProvidersGet,PermissionIdentityProvidersUndelete,PermissionIdentityProvidersUpdate,- PermissionInstancesAdminExecute,PermissionInstancesCreate,PermissionInstancesDelete,PermissionInstancesGet,diff --git a/backend/component/iam/permission.yaml b/backend/component/iam/permission.yamlindex 1e094016ee..72390b223a 100644--- a/backend/component/iam/permission.yaml+++ b/backend/component/iam/permission.yaml@@ -24,11 +24,11 @@ permissions:- bb.databases.get- bb.databases.getSchema- bb.databases.list- - bb.databases.query- - bb.databases.queryDDL- - bb.databases.queryDML- - bb.databases.queryExplain- - bb.databases.queryInfo+ - bb.sql.select+ - bb.sql.ddl+ - bb.sql.dml+ - bb.sql.explain+ - bb.sql.info- bb.databases.sync- bb.databases.update- bb.environments.create@@ -47,7 +47,7 @@ permissions:- bb.identityProviders.get- bb.identityProviders.undelete- bb.identityProviders.update- - bb.instances.adminExecute+ - bb.sql.admin- bb.instances.create- bb.instances.delete- bb.instances.getdiff --git a/backend/legacyapi/member.go b/backend/legacyapi/member.goindex 15d4f5fa36..c2239c2599 100644--- a/backend/legacyapi/member.go+++ b/backend/legacyapi/member.go@@ -21,10 +21,10 @@ const (WorkspaceMember Role = "workspaceMember"ProjectOwner Role = "projectOwner"ProjectDeveloper Role = "projectDeveloper"- ProjectQuerier Role = "projectQuerier"ProjectExporter Role = "projectExporter"ProjectReleaser Role = "projectReleaser"ProjectViewer Role = "projectViewer"+ SQLEditorUser Role = "sqlEditorUser"UnknownRole Role = "UNKNOWN")diff --git a/backend/migrator/migration/prod/3.1/0002##rename_project_querier.sql b/backend/migrator/migration/prod/3.1/0002##rename_project_querier.sqlnew file mode 100644index 0000000000..546a1b9c61--- /dev/null+++ b/backend/migrator/migration/prod/3.1/0002##rename_project_querier.sql@@ -0,0 +1,42 @@+UPDATE policy+SET payload = replace(+ payload::text,+ 'roles/projectQuerier',+ 'roles/sqlEditorUser'+)::jsonb+WHERE type = 'bb.policy.iam';++UPDATE issue+SET payload = replace(+ payload::text,+ 'roles/projectQuerier',+ 'roles/sqlEditorUser'+)::jsonb+WHERE type = 'bb.issue.grant.request';++UPDATE role+SET permissions = replace(+ replace(+ replace(+ replace(+ replace(+ replace(+ permissions::text,+ 'bb.databases.queryDDL',+ 'bb.sql.ddl'+ ),+ 'bb.databases.queryDML',+ 'bb.sql.dml'+ ),+ 'bb.databases.queryInfo',+ 'bb.sql.info'+ ),+ 'bb.databases.queryExplain',+ 'bb.sql.explain'+ ),+ 'bb.databases.query',+ 'bb.sql.select'+ ),+ 'bb.instances.admin',+ 'bb.sql.admin'+)::jsonb;\ No newline at end of filediff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.goindex 612323fe09..57c0db102f 100644--- a/backend/migrator/migrator_test.go+++ b/backend/migrator/migrator_test.go@@ -231,5 +231,5 @@ func TestMigrationCompatibility(t *testing.T) {func TestGetCutoffVersion(t *testing.T) {releaseVersion, err := getProdCutoffVersion()require.NoError(t, err)- require.Equal(t, semver.MustParse("3.1.1"), releaseVersion)+ require.Equal(t, semver.MustParse("3.1.2"), releaseVersion)}diff --git a/backend/runner/approval/runner.go b/backend/runner/approval/runner.goindex f1c6023322..a4836b867d 100644--- a/backend/runner/approval/runner.go+++ b/backend/runner/approval/runner.go@@ -694,7 +694,7 @@ func (r *Runner) getGrantRequestIssueRisk(ctx context.Context, issue *store.Issuswitch payload.GrantRequest.Role {case common.FormatRole(api.ProjectExporter.String()):riskSource = store.RiskRequestExport- case common.FormatRole(api.ProjectQuerier.String()):+ case common.FormatRole(api.SQLEditorUser.String()):riskSource = store.RiskRequestQuerydefault:return 0, store.RiskSourceUnknown, false, errors.Errorf("unknown grant request role %v", payload.GrantRequest.Role)diff --git a/frontend/src/components/DatabaseDetail/SQLEditorButtonV1.vue b/frontend/src/components/DatabaseDetail/SQLEditorButtonV1.vueindex 087cdcb3c4..0e14ba5219 100644--- a/frontend/src/components/DatabaseDetail/SQLEditorButtonV1.vue+++ b/frontend/src/components/DatabaseDetail/SQLEditorButtonV1.vue@@ -83,7 +83,7 @@ const gotoSQLEditor = () => {const database = props.database as ComposedDatabase;if (database.project === DEFAULT_PROJECT_NAME) {- if (!hasProjectPermissionV2(defaultProject(), "bb.databases.query")) {+ if (!hasProjectPermissionV2(defaultProject(), "bb.sql.select")) {// For unassigned databases, only high-privileged users// are accessible via SQL Editor.emit("failed", database);diff --git a/frontend/src/components/ExternalTableDetailDrawer.vue b/frontend/src/components/ExternalTableDetailDrawer.vueindex fd62284deb..9316879f0b 100644--- a/frontend/src/components/ExternalTableDetailDrawer.vue+++ b/frontend/src/components/ExternalTableDetailDrawer.vue@@ -199,7 +199,7 @@ const instanceEngine = computed(() => {const allowQuery = computed(() => {if (database.value.project === DEFAULT_PROJECT_NAME) {- return hasProjectPermissionV2(defaultProject(), "bb.databases.query");+ return hasProjectPermissionV2(defaultProject(), "bb.sql.select");}return isDatabaseV1Queryable(database.value);});diff --git a/frontend/src/components/GrantRequestPanel/GrantRequestPanel.vue b/frontend/src/components/GrantRequestPanel/GrantRequestPanel.vueindex ce6a2f06ea..9d8c871e62 100644--- a/frontend/src/components/GrantRequestPanel/GrantRequestPanel.vue+++ b/frontend/src/components/GrantRequestPanel/GrantRequestPanel.vue@@ -7,7 +7,7 @@><DrawerContent:title="- props.role === PresetRoleType.PROJECT_QUERIER+ props.role === PresetRoleType.SQL_EDITOR_USER? $t('custom-approval.risk-rule.risk.namespace.request_query'): $t('custom-approval.risk-rule.risk.namespace.request_export')"@@ -112,7 +112,7 @@ interface LocalState {const props = withDefaults(defineProps<{projectName: string;- role: PresetRoleType.PROJECT_QUERIER | PresetRoleType.PROJECT_EXPORTER;+ role: PresetRoleType.SQL_EDITOR_USER | PresetRoleType.PROJECT_EXPORTER;databaseResource?: DatabaseResource;placement?: "left" | "right";}>(),@@ -176,7 +176,7 @@ const doCreateIssue = async () => {const newIssue = Issue.fromPartial({title: generateIssueTitle(- props.role === PresetRoleType.PROJECT_QUERIER+ props.role === PresetRoleType.SQL_EDITOR_USER? "bb.issue.grant.request.querier": "bb.issue.grant.request.exporter",state.databaseResources?.map(diff --git a/frontend/src/components/IssueV1/GrantRequestIssueDetailPage.vue b/frontend/src/components/IssueV1/GrantRequestIssueDetailPage.vueindex bd23dfc01f..eeba1e91e9 100644--- a/frontend/src/components/IssueV1/GrantRequestIssueDetailPage.vue+++ b/frontend/src/components/IssueV1/GrantRequestIssueDetailPage.vue@@ -15,7 +15,7 @@v-if="requestRole === PresetRoleType.PROJECT_EXPORTER"/><GrantRequestQuerierForm- v-if="requestRole === PresetRoleType.PROJECT_QUERIER"+ v-if="requestRole === PresetRoleType.SQL_EDITOR_USER"/></div>diff --git a/frontend/src/components/IssueV1/components/GrantRequest/GrantRequestQuerierForm.vue b/frontend/src/components/IssueV1/components/GrantRequest/GrantRequestQuerierForm.vueindex fefec0bb6d..4f35bf6f23 100644--- a/frontend/src/components/IssueV1/components/GrantRequest/GrantRequestQuerierForm.vue+++ b/frontend/src/components/IssueV1/components/GrantRequest/GrantRequestQuerierForm.vue@@ -61,7 +61,7 @@ const state = reactive<LocalState>({onMounted(async () => {const grantRequest = issue.value.grantRequest!;- if (grantRequest.role !== PresetRoleType.PROJECT_QUERIER) {+ if (grantRequest.role !== PresetRoleType.SQL_EDITOR_USER) {throw "Only support QUERIER role";}diff --git a/frontend/src/components/IssueV1/components/HeaderSection/Actions/Actions.vue b/frontend/src/components/IssueV1/components/HeaderSection/Actions/Actions.vueindex 7078ff0e4b..0e79360864 100644--- a/frontend/src/components/IssueV1/components/HeaderSection/Actions/Actions.vue+++ b/frontend/src/components/IssueV1/components/HeaderSection/Actions/Actions.vue@@ -45,7 +45,7 @@ const actionType = asyncComputed(async (): Promise<ActionType | undefined> => {if (isGrantRequestIssue(issue.value)) {if (isFinishedGrantRequestIssueByCurrentUser.value) {const role = issue.value.grantRequest?.role;- if (role === PresetRoleType.PROJECT_QUERIER) {+ if (role === PresetRoleType.SQL_EDITOR_USER) {return "SQL-EDITOR";}}diff --git a/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue b/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vueindex d6b31b520d..7c4f33530b 100644--- a/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue+++ b/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue@@ -34,7 +34,7 @@</div><divv-if="- state.role === PresetRoleType.PROJECT_QUERIER ||+ state.role === PresetRoleType.SQL_EDITOR_USER ||state.role === PresetRoleType.PROJECT_EXPORTER"class="w-full"@@ -163,7 +163,7 @@ watch(expression.push(`request.time < timestamp("${expiresAt.toISOString()}")`);}if (- state.role === PresetRoleType.PROJECT_QUERIER ||+ state.role === PresetRoleType.SQL_EDITOR_USER ||state.role === PresetRoleType.PROJECT_EXPORTER) {if (state.databaseResources) {@@ -193,7 +193,7 @@ const generateConditionTitle = () => {const title = [displayRoleTitle(state.role)];if (- state.role === PresetRoleType.PROJECT_QUERIER ||+ state.role === PresetRoleType.SQL_EDITOR_USER ||state.role === PresetRoleType.PROJECT_EXPORTER) {let conditionSuffix = "";diff --git a/frontend/src/components/ProjectMember/ProjectMemberRolePanel/EditProjectRolePanel.vue b/frontend/src/components/ProjectMember/ProjectMemberRolePanel/EditProjectRolePanel.vueindex 87463feb6a..76261f6a00 100644--- a/frontend/src/components/ProjectMember/ProjectMemberRolePanel/EditProjectRolePanel.vue+++ b/frontend/src/components/ProjectMember/ProjectMemberRolePanel/EditProjectRolePanel.vue@@ -24,7 +24,7 @@<template v-if="!isLoading"><divv-if="- binding.role === PresetRoleType.PROJECT_QUERIER ||+ binding.role === PresetRoleType.SQL_EDITOR_USER ||binding.role === PresetRoleType.PROJECT_EXPORTER"class="w-full"@@ -263,7 +263,7 @@ const handleUpdateRole = async () => {);}if (- props.binding.role === PresetRoleType.PROJECT_QUERIER ||+ props.binding.role === PresetRoleType.SQL_EDITOR_USER ||props.binding.role === PresetRoleType.PROJECT_EXPORTER) {if (state.databaseResources) {diff --git a/frontend/src/components/ProjectMember/ProjectMemberRolePanel/index.vue b/frontend/src/components/ProjectMember/ProjectMemberRolePanel/index.vueindex c9372a6698..8d3419bbf7 100644--- a/frontend/src/components/ProjectMember/ProjectMemberRolePanel/index.vue+++ b/frontend/src/components/ProjectMember/ProjectMemberRolePanel/index.vue@@ -305,7 +305,7 @@ const allowRevokeMember = computed(() => {const isRoleShouldShowDatabaseRelatedColumns = (role: string) => {return (- role === PresetRoleType.PROJECT_QUERIER ||+ role === PresetRoleType.SQL_EDITOR_USER ||role === PresetRoleType.PROJECT_EXPORTER);};diff --git a/frontend/src/components/ProvideSQLEditorContext.vue b/frontend/src/components/ProvideSQLEditorContext.vueindex 5ae2e0bab9..6105dd2ee0 100644--- a/frontend/src/components/ProvideSQLEditorContext.vue+++ b/frontend/src/components/ProvideSQLEditorContext.vue@@ -224,7 +224,7 @@ const prepareSheetLegacy = async () => {try {const project = await projectStore.getOrFetchProjectByName(projectName);- if (!hasProjectPermissionV2(project, "bb.databases.query")) {+ if (!hasProjectPermissionV2(project, "bb.sql.select")) {return false;}} catch {@@ -292,7 +292,7 @@ const prepareSheet = async () => {const sheetName = `worksheets/${sheetId}`;const project = await projectStore.getOrFetchProjectByName(projectName);- if (!hasProjectPermissionV2(project, "bb.databases.query")) {+ if (!hasProjectPermissionV2(project, "bb.sql.select")) {return false;}await maybeSwitchProject(projectName);diff --git a/frontend/src/components/Quickstart.vue b/frontend/src/components/Quickstart.vueindex cc6afd0c11..18e9db83b7 100644--- a/frontend/src/components/Quickstart.vue+++ b/frontend/src/components/Quickstart.vue@@ -209,7 +209,7 @@ const introList = computed(() => {done: computed(() => uiStateStore.getIntroStateByKey("data.query")),hide:!sampleProject.value ||- !hasProjectPermissionV2(sampleProject.value, "bb.databases.query"),+ !hasProjectPermissionV2(sampleProject.value, "bb.sql.select"),},{name: computed(() => t("quick-start.visit-project")),diff --git a/frontend/src/components/TableDetailDrawer.vue b/frontend/src/components/TableDetailDrawer.vueindex 829255e879..ecadb276de 100644--- a/frontend/src/components/TableDetailDrawer.vue+++ b/frontend/src/components/TableDetailDrawer.vue@@ -335,7 +335,7 @@ const instanceEngine = computed(() => {const allowQuery = computed(() => {if (database.value.project === DEFAULT_PROJECT_NAME) {- return hasProjectPermissionV2(defaultProject(), "bb.databases.query");+ return hasProjectPermissionV2(defaultProject(), "bb.sql.select");}return isDatabaseV1Queryable(database.value);});diff --git a/frontend/src/components/v2/Select/ProjectRoleSelect.vue b/frontend/src/components/v2/Select/ProjectRoleSelect.vueindex 5bbe25640a..7029d8b92a 100644--- a/frontend/src/components/v2/Select/ProjectRoleSelect.vue+++ b/frontend/src/components/v2/Select/ProjectRoleSelect.vue@@ -62,7 +62,7 @@ const FREE_ROLE_LIST: string[] = [PresetRoleType.PROJECT_OWNER,PresetRoleType.PROJECT_DEVELOPER,PresetRoleType.PROJECT_RELEASER,- PresetRoleType.PROJECT_QUERIER,+ PresetRoleType.SQL_EDITOR_USER,PresetRoleType.PROJECT_EXPORTER,PresetRoleType.PROJECT_VIEWER,];diff --git a/frontend/src/layouts/ProjectV1Layout.vue b/frontend/src/layouts/ProjectV1Layout.vueindex e3db1c24ea..423b37f225 100644--- a/frontend/src/layouts/ProjectV1Layout.vue+++ b/frontend/src/layouts/ProjectV1Layout.vue@@ -92,7 +92,7 @@ import { hasProjectPermissionV2 } from "@/utils";interface LocalState {requestRole?:- | PresetRoleType.PROJECT_QUERIER+ | PresetRoleType.SQL_EDITOR_USER| PresetRoleType.PROJECT_EXPORTER;}@@ -207,7 +207,7 @@ const quickActionListForDatabase = computed(() => {actions.push({title: t("custom-approval.risk-rule.risk.namespace.request_query"),icon: () => h(FileSearchIcon),- action: () => (state.requestRole = PresetRoleType.PROJECT_QUERIER),+ action: () => (state.requestRole = PresetRoleType.SQL_EDITOR_USER),});if (!exportDataPolicy.value?.exportDataPolicy?.disable) {diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex befdc80095..2c34b415ec 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -3577,6 +3577,10 @@"self": "Project Querier","description": "Permissions for querying database data."},+ "sql-editor-user": {+ "self": "SQL Editor User",+ "description": "Permissions for querying database data."+ },"project-exporter": {"self": "Project Exporter","description": "Permissions for exporting database data."diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex 90d4bf3aeb..f1a8af7fcc 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -3577,6 +3577,10 @@"self": "Consultor del proyecto","description": "El consultor del proyecto tiene todos los permisos dentro del proyecto, excepto la gestión de miembros del proyecto."},+ "sql-editor-user": {+ "self": "Usuario del editor SQL",+ "description": "El consultor del proyecto tiene todos los permisos dentro del proyecto, excepto la gestión de miembros del proyecto."+ },"project-exporter": {"self": "Exportador del proyecto","description": "El exportador del proyecto tiene todos los permisos dentro del proyecto, excepto la gestión de miembros del proyecto."diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex c5a8a4cda4..f2cd068732 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -3577,6 +3577,10 @@"self": "プロジェクトの問い合わせ者","description": "指定した範囲内のデータをクエリできます。"},+ "sql-editor-user": {+ "self": "SQLエディタのユーザー",+ "description": "指定した範囲内のデータをクエリできます。"+ },"project-exporter": {"self": "プロジェクトエクスポーター","description": "指定した範囲のデータをエクスポートできます。"diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex ae584bf249..c05a23af89 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -3577,6 +3577,10 @@"self": "项目查询者","description": "可查询指定范围的数据。"},+ "sql-editor-user": {+ "self": "SQL 编辑器用户",+ "description": "可查询指定范围的数据。"+ },"project-exporter": {"self": "项目导出者","description": "可导出指定范围的数据。"diff --git a/frontend/src/types/iam/permission.ts b/frontend/src/types/iam/permission.tsindex 11182c2a0c..a77d1b6bda 100644--- a/frontend/src/types/iam/permission.ts+++ b/frontend/src/types/iam/permission.ts@@ -30,12 +30,12 @@ export type Permission =| "bb.databases.get"| "bb.databases.getSchema"| "bb.databases.list"- | "bb.databases.query"+ | "bb.sql.select"| "bb.databases.execute"- | "bb.databases.queryInfo"- | "bb.databases.queryExplain"- | "bb.databases.queryDML"- | "bb.databases.queryDDL"+ | "bb.sql.info"+ | "bb.sql.explain"+ | "bb.sql.dml"+ | "bb.sql.ddl"| "bb.databases.sync"| "bb.databases.update"| "bb.issueComments.list"@@ -80,7 +80,7 @@ export type Permission =| "bb.identityProviders.get"| "bb.identityProviders.undelete"| "bb.identityProviders.update"- | "bb.instances.adminExecute"+ | "bb.sql.admin"| "bb.instances.create"| "bb.instances.delete"| "bb.instances.get"@@ -122,22 +122,22 @@ export type Permission =export type QueryPermission = PickLiteral<Permission,- | "bb.databases.query"- | "bb.databases.queryInfo"- | "bb.databases.queryExplain"- | "bb.databases.queryDDL"- | "bb.databases.queryDML"- | "bb.databases.execute"+ | "bb.sql.select"+ | "bb.sql.info"+ | "bb.sql.explain"+ | "bb.sql.ddl"+ | "bb.sql.dml"+ | "bb.sql.admin">;export const QueryPermissionQueryOnly: QueryPermission[] = [- "bb.databases.query",+ "bb.sql.select",];export const QueryPermissionQueryAny: QueryPermission[] = [- "bb.databases.query",- "bb.databases.queryInfo",- "bb.databases.queryExplain",- "bb.databases.queryDDL",- "bb.databases.queryDML",- "bb.databases.execute",+ "bb.sql.select",+ "bb.sql.info",+ "bb.sql.explain",+ "bb.sql.ddl",+ "bb.sql.dml",+ "bb.sql.admin",];diff --git a/frontend/src/types/iam/role.ts b/frontend/src/types/iam/role.tsindex cdb32716f5..31776eac81 100644--- a/frontend/src/types/iam/role.ts+++ b/frontend/src/types/iam/role.ts@@ -6,7 +6,7 @@ export enum PresetRoleType {WORKSPACE_MEMBER = `${roleNamePrefix}workspaceMember`,PROJECT_OWNER = `${roleNamePrefix}projectOwner`,PROJECT_DEVELOPER = `${roleNamePrefix}projectDeveloper`,- PROJECT_QUERIER = `${roleNamePrefix}projectQuerier`,+ SQL_EDITOR_USER = `${roleNamePrefix}sqlEditorUser`,PROJECT_EXPORTER = `${roleNamePrefix}projectExporter`,PROJECT_RELEASER = `${roleNamePrefix}projectReleaser`,PROJECT_VIEWER = `${roleNamePrefix}projectViewer`,@@ -23,7 +23,7 @@ export const PRESET_WORKSPACE_ROLES: string[] = [export const PRESET_PROJECT_ROLES: string[] = [PresetRoleType.PROJECT_OWNER,PresetRoleType.PROJECT_DEVELOPER,- PresetRoleType.PROJECT_QUERIER,+ PresetRoleType.SQL_EDITOR_USER,PresetRoleType.PROJECT_EXPORTER,PresetRoleType.PROJECT_RELEASER,PresetRoleType.PROJECT_VIEWER,diff --git a/frontend/src/types/proto/v1/sql_service.ts b/frontend/src/types/proto/v1/sql_service.tsindex ecf7a1b3b5..6cae70bc0c 100644--- a/frontend/src/types/proto/v1/sql_service.ts+++ b/frontend/src/types/proto/v1/sql_service.ts@@ -3556,36 +3556,7 @@ export const SQLServiceDefinition = {responseStream: true,options: {_unknownFields: {- 800010: [- new Uint8Array([- 25,- 98,- 98,- 46,- 105,- 110,- 115,- 116,- 97,- 110,- 99,- 101,- 115,- 46,- 97,- 100,- 109,- 105,- 110,- 69,- 120,- 101,- 99,- 117,- 116,- 101,- ]),- ],+ 800010: [new Uint8Array([12, 98, 98, 46, 115, 113, 108, 46, 97, 100, 109, 105, 110])],800016: [new Uint8Array([1])],800024: [new Uint8Array([1])],578365826: [diff --git a/frontend/src/utils/role.ts b/frontend/src/utils/role.tsindex 1ac087889f..eaa2ea8ac0 100644--- a/frontend/src/utils/role.ts+++ b/frontend/src/utils/role.ts@@ -10,6 +10,8 @@ export const extractRoleResourceName = (resourceId: string): string => {};export const displayRoleTitle = (role: string): string => {+ t("role.sql-editor-user.self");+if (PRESET_ROLES.includes(role)) {return t(`role.${kebabCase(extractRoleResourceName(role))}.self`);}diff --git a/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/actions.tsx b/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/actions.tsxindex dfa8efd276..966d37c28e 100644--- a/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/actions.tsx+++ b/frontend/src/views/sql-editor/ConnectionPanel/ConnectionPane/actions.tsx@@ -52,7 +52,7 @@ export const useDropdown = () => {const context = ref<TreeNode>();const allowAdmin = computed(() =>- hasWorkspacePermissionV2("bb.instances.adminExecute")+ hasWorkspacePermissionV2("bb.sql.admin"));const options = computed((): DropdownOptionWithTreeNode[] => {diff --git a/frontend/src/views/sql-editor/EditorCommon/AdminModeButton.vue b/frontend/src/views/sql-editor/EditorCommon/AdminModeButton.vueindex 66078ddd9c..57cd612bd4 100644--- a/frontend/src/views/sql-editor/EditorCommon/AdminModeButton.vue+++ b/frontend/src/views/sql-editor/EditorCommon/AdminModeButton.vue@@ -39,7 +39,7 @@ const props = defineProps({});const allowAdmin = computed(() =>- hasWorkspacePermissionV2("bb.instances.adminExecute")+ hasWorkspacePermissionV2("bb.sql.admin"));const tabStore = useSQLEditorTabStore();diff --git a/frontend/src/views/sql-editor/EditorCommon/ExecuteHint.vue b/frontend/src/views/sql-editor/EditorCommon/ExecuteHint.vueindex 43b1c48a4a..130a93fe56 100644--- a/frontend/src/views/sql-editor/EditorCommon/ExecuteHint.vue+++ b/frontend/src/views/sql-editor/EditorCommon/ExecuteHint.vue@@ -121,7 +121,7 @@ const actions = computed(() => {admin: false,issue: false,};- if (hasWorkspacePermissionV2("bb.instances.adminExecute")) {+ if (hasWorkspacePermissionV2("bb.sql.admin")) {actions.admin = true;}if (!disallowNavigateToConsole.value) {diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/RequestQueryButton.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/RequestQueryButton.vueindex 01850c1472..425849c916 100644--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/RequestQueryButton.vue+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/RequestQueryButton.vue@@ -9,7 +9,7 @@:project-name="database.project":database-resource="databaseResource":placement="'right'"- :role="PresetRoleType.PROJECT_QUERIER"+ :role="PresetRoleType.SQL_EDITOR_USER"@close="showPanel = false"/></div>diff --git a/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue b/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vueindex 5873e5a850..a0d1cac259 100644--- a/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue+++ b/frontend/src/views/sql-editor/EditorCommon/ResultView/ResultViewV1.vue@@ -227,7 +227,7 @@ const tabName = (result: QueryResult, index: number) => {};const disallowCopyingData = computed(() => {- if (hasWorkspacePermissionV2("bb.instances.adminExecute")) {+ if (hasWorkspacePermissionV2("bb.sql.admin")) {// `disableCopyDataPolicy` is only applicable to workspace developers.return false;}diff --git a/proto/generated-go/v1/sql_service.pb.go b/proto/generated-go/v1/sql_service.pb.goindex 25d967076d..82807f4b29 100644--- a/proto/generated-go/v1/sql_service.pb.go+++ b/proto/generated-go/v1/sql_service.pb.go@@ -2542,7 +2542,7 @@ var file_v1_sql_service_proto_rawDesc = []byte{0x1a, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65,0x53, 0x51, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73,0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,- 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x32, 0x88, 0x0b, 0x0a, 0x0a, 0x53, 0x51,+ 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x32, 0xfb, 0x0a, 0x0a, 0x0a, 0x53, 0x51,0x4c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xb2, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65,0x72, 0x79, 0x12, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e,@@ -2554,85 +2554,85 @@ var file_v1_sql_service_proto_rawDesc = []byte{0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x71, 0x75,0x65, 0x72, 0x79, 0x22, 0x28, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69,0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62,- 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x96, 0x01,+ 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x89, 0x01,0x0a, 0x0c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x12, 0x20,0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x6d,0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41,0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,- 0x6e, 0x73, 0x65, 0x22, 0x3d, 0x8a, 0xea, 0x30, 0x19, 0x62, 0x62, 0x2e, 0x69, 0x6e, 0x73, 0x74,- 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75,- 0x74, 0x65, 0x90, 0xea, 0x30, 0x01, 0x98, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12,- 0x12, 0x10, 0x2f, 0x76, 0x31, 0x3a, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78, 0x65, 0x63, 0x75,- 0x74, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x95, 0x01, 0x0a, 0x14, 0x53, 0x65, 0x61, 0x72, 0x63,- 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12,- 0x28, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65,+ 0x6e, 0x73, 0x65, 0x22, 0x30, 0x8a, 0xea, 0x30, 0x0c, 0x62, 0x62, 0x2e, 0x73, 0x71, 0x6c, 0x2e,+ 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x90, 0xea, 0x30, 0x01, 0x98, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4,+ 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x31, 0x3a, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x45, 0x78,+ 0x65, 0x63, 0x75, 0x74, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x95, 0x01, 0x0a, 0x14, 0x53, 0x65,0x61, 0x72, 0x63, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69,- 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x62, 0x79, 0x74, 0x65,- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x51, 0x75,- 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70,- 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x90, 0xea, 0x30, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e,- 0x3a, 0x01, 0x2a, 0x22, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x48, 0x69,- 0x73, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0xe4,- 0x01, 0x0a, 0x06, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65,- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65,- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,- 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,- 0x73, 0x65, 0x22, 0xa0, 0x01, 0x8a, 0xea, 0x30, 0x10, 0x62, 0x62, 0x2e, 0x64, 0x61, 0x74, 0x61,- 0x62, 0x61, 0x73, 0x65, 0x73, 0x2e, 0x67, 0x65, 0x74, 0x90, 0xea, 0x30, 0x01, 0x98, 0xea, 0x30,- 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x7e, 0x3a, 0x01, 0x2a, 0x5a, 0x22, 0x3a, 0x01, 0x2a, 0x22,- 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61,- 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x5a, 0x2a,- 0x3a, 0x01, 0x2a, 0x22, 0x25, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70,- 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x73, 0x73, 0x75, 0x65, 0x73,- 0x2f, 0x2a, 0x7d, 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x29, 0x2f, 0x76, 0x31, 0x2f,- 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f,- 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x65,- 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x72, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x19,- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65,- 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65,- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73,- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x8a, 0xea, 0x30, 0x12, 0x62, 0x62, 0x2e, 0x64, 0x61,- 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x90, 0xea, 0x30,- 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x3a, 0x01, 0x2a, 0x22, 0x0d, 0x2f, 0x76, 0x31, 0x2f,- 0x73, 0x71, 0x6c, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x90, 0x01, 0x0a, 0x12, 0x50, 0x61,- 0x72, 0x73, 0x65, 0x4d, 0x79, 0x42, 0x61, 0x74, 0x69, 0x73, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72,- 0x12, 0x26, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50,- 0x61, 0x72, 0x73, 0x65, 0x4d, 0x79, 0x42, 0x61, 0x74, 0x69, 0x73, 0x4d, 0x61, 0x70, 0x70, 0x65,- 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x4d, 0x79, 0x42, 0x61,- 0x74, 0x69, 0x73, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,- 0x65, 0x22, 0x29, 0x80, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a,- 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x71, 0x6c, 0x2f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x4d,- 0x79, 0x42, 0x61, 0x74, 0x69, 0x73, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x60, 0x0a, 0x06,- 0x50, 0x72, 0x65, 0x74, 0x74, 0x79, 0x12, 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x74, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,- 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x50, 0x72, 0x65, 0x74, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,- 0x1d, 0x80, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e,- 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x71, 0x6c, 0x2f, 0x70, 0x72, 0x65, 0x74, 0x74, 0x79, 0x12, 0x95,- 0x01, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x74, 0x61,- 0x64, 0x61, 0x74, 0x61, 0x12, 0x25, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,- 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x74, 0x61,- 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67,- 0x69, 0x66, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f,- 0x6e, 0x73, 0x65, 0x22, 0x31, 0x80, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x3a,- 0x01, 0x2a, 0x22, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x44, 0x65,- 0x73, 0x69, 0x67, 0x6e, 0x3a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x4d, 0x65,- 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xab, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x6e, 0x65, 0x72,- 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x12, 0x26, 0x2e,- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65,- 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x52, 0x65,- 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,- 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x74,- 0x6f, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44,- 0x90, 0xea, 0x30, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x3a, 0x01, 0x2a, 0x22, 0x35, 0x2f,+ 0x65, 0x73, 0x12, 0x28, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,+ 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74,+ 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x62,+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63,+ 0x68, 0x51, 0x75, 0x65, 0x72, 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52,+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x90, 0xea, 0x30, 0x02, 0x82, 0xd3, 0xe4,+ 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72,+ 0x79, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x3a, 0x73, 0x65, 0x61, 0x72, 0x63,+ 0x68, 0x12, 0xe4, 0x01, 0x0a, 0x06, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x2e, 0x62,+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72,+ 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73,+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa0, 0x01, 0x8a, 0xea, 0x30, 0x10, 0x62, 0x62, 0x2e, 0x64,+ 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2e, 0x67, 0x65, 0x74, 0x90, 0xea, 0x30, 0x01,+ 0x98, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x7e, 0x3a, 0x01, 0x2a, 0x5a, 0x22, 0x3a,+ 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e,+ 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72,+ 0x74, 0x5a, 0x2a, 0x3a, 0x01, 0x2a, 0x22, 0x25, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d,+ 0x65, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x69, 0x73, 0x73,+ 0x75, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x29, 0x2f,0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2f, 0x2a,- 0x7d, 0x3a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72,- 0x65, 0x53, 0x51, 0x4c, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,- 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,+ 0x7d, 0x3a, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x72, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63,+ 0x6b, 0x12, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,+ 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x62,+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b,+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x8a, 0xea, 0x30, 0x12, 0x62, 0x62,+ 0x2e, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x73, 0x2e, 0x63, 0x68, 0x65, 0x63, 0x6b,+ 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x3a, 0x01, 0x2a, 0x22, 0x0d, 0x2f,+ 0x76, 0x31, 0x2f, 0x73, 0x71, 0x6c, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x90, 0x01, 0x0a,+ 0x12, 0x50, 0x61, 0x72, 0x73, 0x65, 0x4d, 0x79, 0x42, 0x61, 0x74, 0x69, 0x73, 0x4d, 0x61, 0x70,+ 0x70, 0x65, 0x72, 0x12, 0x26, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,+ 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x4d, 0x79, 0x42, 0x61, 0x74, 0x69, 0x73, 0x4d, 0x61,+ 0x70, 0x70, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x62, 0x79,+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x4d,+ 0x79, 0x42, 0x61, 0x74, 0x69, 0x73, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70,+ 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x80, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f,+ 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x71, 0x6c, 0x2f, 0x70, 0x61, 0x72,+ 0x73, 0x65, 0x4d, 0x79, 0x42, 0x61, 0x74, 0x69, 0x73, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12,+ 0x60, 0x0a, 0x06, 0x50, 0x72, 0x65, 0x74, 0x74, 0x79, 0x12, 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65,+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x74, 0x74, 0x79, 0x52, 0x65,+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x74, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,+ 0x73, 0x65, 0x22, 0x1d, 0x80, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01,+ 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x71, 0x6c, 0x2f, 0x70, 0x72, 0x65, 0x74, 0x74,+ 0x79, 0x12, 0x95, 0x01, 0x0a, 0x11, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x4d,+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x25, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x4d,+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26,+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x72,+ 0x69, 0x6e, 0x67, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65,+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x80, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93,+ 0x02, 0x27, 0x3a, 0x01, 0x2a, 0x22, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d,+ 0x61, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x3a, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x69, 0x66,+ 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0xab, 0x01, 0x0a, 0x12, 0x47, 0x65,+ 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x51, 0x4c,+ 0x12, 0x26, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47,+ 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x51,+ 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52,+ 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,+ 0x65, 0x22, 0x44, 0x90, 0xea, 0x30, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x3a, 0x01, 0x2a,+ 0x22, 0x35, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x6e, 0x73, 0x74,+ 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,+ 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73,+ 0x74, 0x6f, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72,+ 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,+ 0x6f, 0x33,}var (diff --git a/proto/v1/sql_service.proto b/proto/v1/sql_service.protoindex 89edd186d7..faa9473fb6 100644--- a/proto/v1/sql_service.proto+++ b/proto/v1/sql_service.proto@@ -33,7 +33,7 @@ service SQLService {rpc AdminExecute(stream AdminExecuteRequest) returns (stream AdminExecuteResponse) {// GRPC streaming / websocket requires GET method instead of POST.option (google.api.http) = {get: "/v1:adminExecute"};- option (bytebase.v1.permission) = "bb.instances.adminExecute";+ option (bytebase.v1.permission) = "bb.sql.admin";option (bytebase.v1.auth_method) = IAM;option (bytebase.v1.audit) = true;}