Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: deprecate the bb.sql.export permission and projectExporter role (#17470)

ecmadao94b992612af3
diff --git a/backend/api/v1/sql_service.go b/backend/api/v1/sql_service.go
index 42587cabe9..a80f62a8f6 100644
--- a/backend/api/v1/sql_service.go
+++ b/backend/api/v1/sql_service.go
@@ -271,7 +271,7 @@ func (s *SQLService) Query(ctx context.Context, req *connect.Request[v1pb.QueryR
for _, result := range results {
// AllowExport is a validate only check.
- checkErr := s.accessCheck(ctx, instance, database, user, spans, int(result.RowsCount), request.Explain, true /* isExport */)
+ checkErr := s.accessCheck(ctx, instance, database, user, spans, int(result.RowsCount), request.Explain)
result.AllowExport = checkErr == nil
}
@@ -312,7 +312,7 @@ func getMaximumSQLResultLimit(
return value
}
-type accessCheckFunc func(context.Context, *store.InstanceMessage, *store.DatabaseMessage, *store.UserMessage, []*parserbase.QuerySpan, int, bool /* isExplain */, bool /* isExport */) error
+type accessCheckFunc func(context.Context, *store.InstanceMessage, *store.DatabaseMessage, *store.UserMessage, []*parserbase.QuerySpan, int, bool /* isExplain */) error
func extractSourceTable(comment string) (string, string, string, error) {
pattern := `\((\w+),\s*(\w+)(?:,\s*(\w+))?\)`
@@ -476,7 +476,7 @@ func queryRetry(
}
if optionalAccessCheck != nil {
// Check query access
- if err := optionalAccessCheck(ctx, instance, database, user, spans, queryContext.Limit, queryContext.Explain, false); err != nil {
+ if err := optionalAccessCheck(ctx, instance, database, user, spans, queryContext.Limit, queryContext.Explain); err != nil {
return nil, nil, time.Duration(0), err
}
slog.Debug("optional access check", slog.String("instance", instance.ResourceID), slog.String("database", database.DatabaseName))
@@ -923,7 +923,7 @@ func DoExport(
}
if len(results) == 1 {
if optionalAccessCheck != nil {
- if err := optionalAccessCheck(ctx, instance, database, user, spans, int(results[0].RowsCount), queryContext.Explain, true); err != nil {
+ if err := optionalAccessCheck(ctx, instance, database, user, spans, int(results[0].RowsCount), queryContext.Explain); err != nil {
return nil, duration, err
}
}
@@ -1365,7 +1365,7 @@ func (s *SQLService) accessCheck(
spans []*parserbase.QuerySpan,
limit int,
isExplain bool,
- isExport bool) error {
+) error {
project, err := s.store.GetProjectV2(ctx, &store.FindProjectMessage{ResourceID: &database.ProjectID})
if err != nil {
return err
@@ -1450,7 +1450,7 @@ func (s *SQLService) accessCheck(
return connect.NewError(connect.CodeInternal, errors.New(err.Error()))
}
- ok, err := s.hasDatabaseAccessRights(ctx, user, []*storepb.IamPolicy{workspacePolicy.Policy, projectPolicy.Policy}, attributes, isExport)
+ ok, err := s.hasDatabaseAccessRights(ctx, user, []*storepb.IamPolicy{workspacePolicy.Policy, projectPolicy.Policy}, attributes)
if err != nil {
return connect.NewError(connect.CodeInternal, errors.Errorf("failed to check access control for database: %q, error %v", column.Database, err))
}
@@ -1547,11 +1547,8 @@ func validateQueryRequest(instance *store.InstanceMessage, statement string) err
return nil
}
-func (s *SQLService) hasDatabaseAccessRights(ctx context.Context, user *store.UserMessage, iamPolicies []*storepb.IamPolicy, attributes map[string]any, isExport bool) (bool, error) {
+func (s *SQLService) hasDatabaseAccessRights(ctx context.Context, user *store.UserMessage, iamPolicies []*storepb.IamPolicy, attributes map[string]any) (bool, error) {
wantPermission := iam.PermissionSQLSelect
- if isExport {
- wantPermission = iam.PermissionSQLExport
- }
bindings := utils.GetUserIAMPolicyBindings(ctx, s.store, user, iamPolicies...)
for _, binding := range bindings {
diff --git a/backend/component/iam/acl.yaml b/backend/component/iam/acl.yaml
index 946d91c498..3106b31aa0 100644
--- a/backend/component/iam/acl.yaml
+++ b/backend/component/iam/acl.yaml
@@ -106,7 +106,6 @@ roles:
- bb.sql.explain
- bb.sql.info
- bb.sql.select
- - bb.sql.export
- bb.users.create
- bb.users.delete
- bb.users.get
@@ -216,7 +215,6 @@ roles:
- bb.sql.dml
- bb.sql.explain
- bb.sql.info
- - bb.sql.export
- bb.sql.select
- bb.users.get
- bb.users.list
@@ -311,7 +309,6 @@ roles:
- bb.sql.dml
- bb.sql.explain
- bb.sql.info
- - bb.sql.export
- bb.sql.select
- bb.taskRuns.list
- bb.worksheets.get
@@ -375,18 +372,6 @@ roles:
- bb.sql.info
- bb.sql.select
- bb.worksheets.get
- - name: roles/projectExporter
- title: Project exporter
- permissions:
- - bb.databaseCatalogs.get
- - bb.databases.check
- - bb.databases.get
- - bb.databases.getSchema
- - bb.databases.list
- - bb.projects.get
- - bb.projects.getIamPolicy
- - bb.sql.export
- - bb.worksheets.get
- name: roles/projectReleaser
title: Project releaser
permissions:
diff --git a/backend/component/iam/permission.go b/backend/component/iam/permission.go
index 8d5458971f..f08c70c6ea 100644
--- a/backend/component/iam/permission.go
+++ b/backend/component/iam/permission.go
@@ -99,7 +99,6 @@ const (
PermissionSQLDml Permission = "bb.sql.dml"
PermissionSQLExplain Permission = "bb.sql.explain"
PermissionSQLInfo Permission = "bb.sql.info"
- PermissionSQLExport Permission = "bb.sql.export"
PermissionSQLAdmin Permission = "bb.sql.admin"
PermissionTaskRunsCreate Permission = "bb.taskRuns.create"
PermissionTaskRunsList Permission = "bb.taskRuns.list"
@@ -217,7 +216,6 @@ var allPermissions = []Permission{
PermissionSQLDml,
PermissionSQLExplain,
PermissionSQLInfo,
- PermissionSQLExport,
PermissionSQLAdmin,
PermissionTaskRunsCreate,
PermissionTaskRunsList,
diff --git a/backend/component/iam/permission.yaml b/backend/component/iam/permission.yaml
index ad0f33b0bd..ceaa1fbc5e 100644
--- a/backend/component/iam/permission.yaml
+++ b/backend/component/iam/permission.yaml
@@ -100,7 +100,6 @@ permissions:
- bb.sql.dml
- bb.sql.explain
- bb.sql.info
- - bb.sql.export
- bb.sql.admin
- bb.taskRuns.create
- bb.taskRuns.list
diff --git a/backend/generated-go/v1/iam_policy.pb.go b/backend/generated-go/v1/iam_policy.pb.go
index 8f463e8488..cd90ae45d2 100644
--- a/backend/generated-go/v1/iam_policy.pb.go
+++ b/backend/generated-go/v1/iam_policy.pb.go
@@ -257,11 +257,11 @@ type Binding struct {
// The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
//
// Support variables:
- // resource.database: the database full name in "instances/{instance}/databases/{database}" format, used by the "roles/sqlEditorUser" and "roles/projectExporter" role, support "==" operator.
- // resource.schema: the schema name, used by the "roles/sqlEditorUser" and "roles/projectExporter" role, support "==" operator.
- // resource.table: the table name, used by the "roles/sqlEditorUser" and "roles/projectExporter" role, support "==" operator.
+ // resource.database: the database full name in "instances/{instance}/databases/{database}" format, used by the "roles/sqlEditorUser" role, support "==" operator.
+ // resource.schema: the schema name, used by the "roles/sqlEditorUser" role, support "==" operator.
+ // resource.table: the table name, used by the "roles/sqlEditorUser" role, support "==" operator.
// request.time: the expiration. Only support "<" operation in `request.time < timestamp("{ISO datetime string format}")`.
- // request.row_limit: the maximum export rows, used by the "roles/projectExporter" role. Only support "<=" operation.
+ // request.row_limit: the maximum export rows, used by the "roles/sqlEditorUser" role. Only support "<=" operation.
//
// For example:
// resource.database == "instances/local-pg/databases/postgres" && resource.schema in ["public","another_schema"]
diff --git a/backend/migrator/migration/3.10/0007##remove_exporter_role.sql b/backend/migrator/migration/3.10/0007##remove_exporter_role.sql
new file mode 100644
index 0000000000..fe0846fea0
--- /dev/null
+++ b/backend/migrator/migration/3.10/0007##remove_exporter_role.sql
@@ -0,0 +1,58 @@
+-- Remove projectExporter role and merge row_limit condition into sqlEditorUser role
+WITH exporter_data AS (
+ -- Collect all projectExporter members and their row_limit conditions
+ SELECT
+ p.id,
+ m.member,
+ substring(b.binding->'condition'->>'expression' from 'request\.row_limit\s*<=\s*\d+') as row_limit
+ FROM policy p,
+ jsonb_array_elements(p.payload->'bindings') b(binding),
+ jsonb_array_elements_text(b.binding->'members') m(member)
+ WHERE p.resource_type = 'PROJECT'
+ AND p.type = 'IAM'
+ AND b.binding->>'role' = 'roles/projectExporter'
+ AND b.binding->'condition'->>'expression' ~ 'request\.row_limit\s*<=\s*\d+'
+)
+UPDATE policy p
+SET payload = jsonb_set(
+ p.payload,
+ '{bindings}',
+ (
+ SELECT jsonb_agg(
+ CASE
+ -- Update sqlEditorUser bindings with row_limit if member exists in exporter_data
+ WHEN b.binding->>'role' = 'roles/sqlEditorUser' AND EXISTS (
+ SELECT 1 FROM exporter_data ed
+ WHERE ed.id = p.id
+ AND ed.member IN (SELECT jsonb_array_elements_text(b.binding->'members'))
+ ) THEN
+ jsonb_set(
+ b.binding,
+ '{condition,expression}',
+ to_jsonb(
+ COALESCE(b.binding->'condition'->>'expression', '') ||
+ CASE
+ WHEN b.binding->'condition'->>'expression' IS NOT NULL THEN ' && '
+ ELSE ''
+ END ||
+ (SELECT ed.row_limit FROM exporter_data ed
+ WHERE ed.id = p.id
+ AND ed.member IN (SELECT jsonb_array_elements_text(b.binding->'members'))
+ LIMIT 1)
+ )
+ )
+ -- Keep all other non-projectExporter bindings unchanged
+ ELSE b.binding
+ END
+ )
+ FROM jsonb_array_elements(p.payload->'bindings') b(binding)
+ WHERE b.binding->>'role' != 'roles/projectExporter'
+ )
+)
+WHERE p.resource_type = 'PROJECT'
+ AND p.type = 'IAM'
+ AND EXISTS (
+ SELECT 1
+ FROM jsonb_array_elements(p.payload->'bindings') b(binding)
+ WHERE b.binding->>'role' = 'roles/projectExporter'
+ );
\ No newline at end of file
diff --git a/backend/migrator/migration/3.10/0008##remove_exporter_permission.sql b/backend/migrator/migration/3.10/0008##remove_exporter_permission.sql
new file mode 100644
index 0000000000..a7193619e3
--- /dev/null
+++ b/backend/migrator/migration/3.10/0008##remove_exporter_permission.sql
@@ -0,0 +1,8 @@
+-- Remove bb.sql.export permission from all roles
+UPDATE role
+SET permissions = jsonb_set(
+ permissions,
+ '{permissions}',
+ (SELECT jsonb_agg(p) FROM jsonb_array_elements(permissions->'permissions') p WHERE p::text != '"bb.sql.export"')
+)
+WHERE permissions->'permissions' ? 'bb.sql.export';
\ No newline at end of file
diff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.go
index aacdb2491d..b531056b8c 100644
--- a/backend/migrator/migrator_test.go
+++ b/backend/migrator/migrator_test.go
@@ -12,7 +12,7 @@ import (
func TestLatestVersion(t *testing.T) {
files, err := getSortedVersionedFiles()
require.NoError(t, err)
- require.Equal(t, semver.MustParse("3.10.6"), *files[len(files)-1].version)
+ require.Equal(t, semver.MustParse("3.10.8"), *files[len(files)-1].version)
}
func TestVersionUnique(t *testing.T) {
diff --git a/backend/store/policy.go b/backend/store/policy.go
index 37a87d7516..bf492f651d 100644
--- a/backend/store/policy.go
+++ b/backend/store/policy.go
@@ -119,7 +119,7 @@ func (s *Store) getIamPolicy(ctx context.Context, find *FindPolicyMessage) (*Iam
p := &storepb.IamPolicy{}
if err := common.ProtojsonUnmarshaler.Unmarshal([]byte(policy.Payload), p); err != nil {
- return nil, errors.Wrapf(err, "failed to unmarshal iam policy")
+ return nil, errors.Wrapf(err, "failed to unmarshal iam policy for %v", policy.Resource)
}
return &IamPolicyMessage{
diff --git a/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue b/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue
index 70632568ef..13cdda6d39 100644
--- a/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue
+++ b/frontend/src/components/ProjectMember/AddProjectMember/AddProjectMemberForm.vue
@@ -43,11 +43,7 @@
<div
v-if="
state.role !== PresetRoleType.PROJECT_OWNER &&
- checkRoleContainsAnyPermission(
- state.role,
- 'bb.sql.select',
- 'bb.sql.export'
- )
+ checkRoleContainsAnyPermission(state.role, 'bb.sql.select')
"
class="w-full space-y-2"
>
@@ -172,7 +168,7 @@ watch(
const roleSupportExport = computed(
() =>
state.role !== PresetRoleType.PROJECT_OWNER &&
- checkRoleContainsAnyPermission(state.role, "bb.sql.export")
+ checkRoleContainsAnyPermission(state.role, "bb.sql.select")
);
watch(
diff --git a/frontend/src/components/ProjectMember/ProjectMemberRolePanel/EditProjectRolePanel.vue b/frontend/src/components/ProjectMember/ProjectMemberRolePanel/EditProjectRolePanel.vue
index e7b5eed941..7b3c29518d 100644
--- a/frontend/src/components/ProjectMember/ProjectMemberRolePanel/EditProjectRolePanel.vue
+++ b/frontend/src/components/ProjectMember/ProjectMemberRolePanel/EditProjectRolePanel.vue
@@ -25,11 +25,7 @@
<div
v-if="
binding.role !== PresetRoleType.PROJECT_OWNER &&
- checkRoleContainsAnyPermission(
- binding.role,
- 'bb.sql.select',
- 'bb.sql.export'
- )
+ checkRoleContainsAnyPermission(binding.role, 'bb.sql.select')
"
class="w-full"
>
@@ -49,7 +45,7 @@
<template
v-if="
binding.role !== PresetRoleType.PROJECT_OWNER &&
- checkRoleContainsAnyPermission(binding.role, 'bb.sql.export')
+ checkRoleContainsAnyPermission(binding.role, 'bb.sql.select')
"
>
<div class="w-full flex flex-col justify-start items-start">
diff --git a/frontend/src/components/ProjectMember/ProjectMemberRolePanel/index.vue b/frontend/src/components/ProjectMember/ProjectMemberRolePanel/index.vue
index fdf843a1e5..7ec51c207b 100644
--- a/frontend/src/components/ProjectMember/ProjectMemberRolePanel/index.vue
+++ b/frontend/src/components/ProjectMember/ProjectMemberRolePanel/index.vue
@@ -237,7 +237,7 @@ const allowRevokeMember = computed(() => {
const isRoleShouldShowDatabaseRelatedColumns = (role: string) => {
return (
role !== PresetRoleType.PROJECT_OWNER &&
- checkRoleContainsAnyPermission(role, "bb.sql.select", "bb.sql.export")
+ checkRoleContainsAnyPermission(role, "bb.sql.select")
);
};
diff --git a/frontend/src/types/iam/permission.ts b/frontend/src/types/iam/permission.ts
index 393bf53800..91cf0b047b 100644
--- a/frontend/src/types/iam/permission.ts
+++ b/frontend/src/types/iam/permission.ts
@@ -102,7 +102,6 @@ export type Permission =
| "bb.sql.dml"
| "bb.sql.explain"
| "bb.sql.info"
- | "bb.sql.export"
| "bb.sql.admin"
| "bb.taskRuns.create"
| "bb.taskRuns.list"
diff --git a/frontend/src/types/proto-es/v1/iam_policy_pb.d.ts b/frontend/src/types/proto-es/v1/iam_policy_pb.d.ts
index 14c708b471..340d31bab7 100644
--- a/frontend/src/types/proto-es/v1/iam_policy_pb.d.ts
+++ b/frontend/src/types/proto-es/v1/iam_policy_pb.d.ts
@@ -120,11 +120,11 @@ export declare type Binding = Message<"bytebase.v1.Binding"> & {
* The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
*
* Support variables:
- * resource.database: the database full name in "instances/{instance}/databases/{database}" format, used by the "roles/sqlEditorUser" and "roles/projectExporter" role, support "==" operator.
- * resource.schema: the schema name, used by the "roles/sqlEditorUser" and "roles/projectExporter" role, support "==" operator.
- * resource.table: the table name, used by the "roles/sqlEditorUser" and "roles/projectExporter" role, support "==" operator.
+ * resource.database: the database full name in "instances/{instance}/databases/{database}" format, used by the "roles/sqlEditorUser" role, support "==" operator.
+ * resource.schema: the schema name, used by the "roles/sqlEditorUser" role, support "==" operator.
+ * resource.table: the table name, used by the "roles/sqlEditorUser" role, support "==" operator.
* request.time: the expiration. Only support "<" operation in `request.time < timestamp("{ISO datetime string format}")`.
- * request.row_limit: the maximum export rows, used by the "roles/projectExporter" role. Only support "<=" operation.
+ * request.row_limit: the maximum export rows, used by the "roles/sqlEditorUser" role. Only support "<=" operation.
*
* For example:
* resource.database == "instances/local-pg/databases/postgres" && resource.schema in ["public","another_schema"]
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index edae2f8c9d..685cc08707 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -8903,11 +8903,11 @@ components:
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Support variables:
- resource.database: the database full name in "instances/{instance}/databases/{database}" format, used by the "roles/sqlEditorUser" and "roles/projectExporter" role, support "==" operator.
- resource.schema: the schema name, used by the "roles/sqlEditorUser" and "roles/projectExporter" role, support "==" operator.
- resource.table: the table name, used by the "roles/sqlEditorUser" and "roles/projectExporter" role, support "==" operator.
+ resource.database: the database full name in "instances/{instance}/databases/{database}" format, used by the "roles/sqlEditorUser" role, support "==" operator.
+ resource.schema: the schema name, used by the "roles/sqlEditorUser" role, support "==" operator.
+ resource.table: the table name, used by the "roles/sqlEditorUser" role, support "==" operator.
request.time: the expiration. Only support "<" operation in `request.time < timestamp("{ISO datetime string format}")`.
- request.row_limit: the maximum export rows, used by the "roles/projectExporter" role. Only support "<=" operation.
+ request.row_limit: the maximum export rows, used by the "roles/sqlEditorUser" role. Only support "<=" operation.
For example:
resource.database == "instances/local-pg/databases/postgres" && resource.schema in ["public","another_schema"]
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index e87e53865d..601943c4f2 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -5250,7 +5250,7 @@ The theme resources.
| members | [string](#string) | repeated | Specifies the principals requesting access for a Bytebase resource. For users, the member should be: user:{email} For groups, the member should be: group:{email} |
| condition | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this binding, only used in the project IAM policy. If the condition evaluates to true, then this binding applies to the current request. If the condition evaluates to false, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
-Support variables: resource.database: the database full name in &#34;instances/{instance}/databases/{database}&#34; format, used by the &#34;roles/sqlEditorUser&#34; and &#34;roles/projectExporter&#34; role, support &#34;==&#34; operator. resource.schema: the schema name, used by the &#34;roles/sqlEditorUser&#34; and &#34;roles/projectExporter&#34; role, support &#34;==&#34; operator. resource.table: the table name, used by the &#34;roles/sqlEditorUser&#34; and &#34;roles/projectExporter&#34; role, support &#34;==&#34; operator. request.time: the expiration. Only support &#34;&lt;&#34; operation in `request.time &lt; timestamp(&#34;{ISO datetime string format}&#34;)`. request.row_limit: the maximum export rows, used by the &#34;roles/projectExporter&#34; role. Only support &#34;&lt;=&#34; operation.
+Support variables: resource.database: the database full name in &#34;instances/{instance}/databases/{database}&#34; format, used by the &#34;roles/sqlEditorUser&#34; role, support &#34;==&#34; operator. resource.schema: the schema name, used by the &#34;roles/sqlEditorUser&#34; role, support &#34;==&#34; operator. resource.table: the table name, used by the &#34;roles/sqlEditorUser&#34; role, support &#34;==&#34; operator. request.time: the expiration. Only support &#34;&lt;&#34; operation in `request.time &lt; timestamp(&#34;{ISO datetime string format}&#34;)`. request.row_limit: the maximum export rows, used by the &#34;roles/sqlEditorUser&#34; role. Only support &#34;&lt;=&#34; operation.
For example: resource.database == &#34;instances/local-pg/databases/postgres&#34; &amp;&amp; resource.schema in [&#34;public&#34;,&#34;another_schema&#34;] resource.database == &#34;instances/local-pg/databases/bytebase&#34; &amp;&amp; resource.schema == &#34;public&#34; &amp;&amp; resource.table in [&#34;audit_log&#34;] request.time &lt; timestamp(&#34;2025-04-26T11:24:48.655Z&#34;) &amp;&amp; request.row_limit &lt;= 1000 |
| parsed_expr | [google.api.expr.v1alpha1.Expr](#google-api-expr-v1alpha1-Expr) | | The parsed expression of the condition. |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index bd0097995e..4d88999fc1 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -15299,11 +15299,11 @@ If the condition evaluates to false, then this binding does not apply to the cur
The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
Support variables:
-resource.database: the database full name in &#34;instances/{instance}/databases/{database}&#34; format, used by the &#34;roles/sqlEditorUser&#34; and &#34;roles/projectExporter&#34; role, support &#34;==&#34; operator.
-resource.schema: the schema name, used by the &#34;roles/sqlEditorUser&#34; and &#34;roles/projectExporter&#34; role, support &#34;==&#34; operator.
-resource.table: the table name, used by the &#34;roles/sqlEditorUser&#34; and &#34;roles/projectExporter&#34; role, support &#34;==&#34; operator.
+resource.database: the database full name in &#34;instances/{instance}/databases/{database}&#34; format, used by the &#34;roles/sqlEditorUser&#34; role, support &#34;==&#34; operator.
+resource.schema: the schema name, used by the &#34;roles/sqlEditorUser&#34; role, support &#34;==&#34; operator.
+resource.table: the table name, used by the &#34;roles/sqlEditorUser&#34; role, support &#34;==&#34; operator.
request.time: the expiration. Only support &#34;&lt;&#34; operation in `request.time &lt; timestamp(&#34;{ISO datetime string format}&#34;)`.
-request.row_limit: the maximum export rows, used by the &#34;roles/projectExporter&#34; role. Only support &#34;&lt;=&#34; operation.
+request.row_limit: the maximum export rows, used by the &#34;roles/sqlEditorUser&#34; role. Only support &#34;&lt;=&#34; operation.
For example:
resource.database == &#34;instances/local-pg/databases/postgres&#34; &amp;&amp; resource.schema in [&#34;public&#34;,&#34;another_schema&#34;]
diff --git a/proto/v1/v1/iam_policy.proto b/proto/v1/v1/iam_policy.proto
index 85587a43ee..41bc0a8784 100644
--- a/proto/v1/v1/iam_policy.proto
+++ b/proto/v1/v1/iam_policy.proto
@@ -61,11 +61,11 @@ message Binding {
// The syntax and semantics of CEL are documented at https://github.com/google/cel-spec
//
// Support variables:
- // resource.database: the database full name in "instances/{instance}/databases/{database}" format, used by the "roles/sqlEditorUser" and "roles/projectExporter" role, support "==" operator.
- // resource.schema: the schema name, used by the "roles/sqlEditorUser" and "roles/projectExporter" role, support "==" operator.
- // resource.table: the table name, used by the "roles/sqlEditorUser" and "roles/projectExporter" role, support "==" operator.
+ // resource.database: the database full name in "instances/{instance}/databases/{database}" format, used by the "roles/sqlEditorUser" role, support "==" operator.
+ // resource.schema: the schema name, used by the "roles/sqlEditorUser" role, support "==" operator.
+ // resource.table: the table name, used by the "roles/sqlEditorUser" role, support "==" operator.
// request.time: the expiration. Only support "<" operation in `request.time < timestamp("{ISO datetime string format}")`.
- // request.row_limit: the maximum export rows, used by the "roles/projectExporter" role. Only support "<=" operation.
+ // request.row_limit: the maximum export rows, used by the "roles/sqlEditorUser" role. Only support "<=" operation.
//
// For example:
// resource.database == "instances/local-pg/databases/postgres" && resource.schema in ["public","another_schema"]