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: implement export jit backend (#20487)
ecmadao5f22911ac6c9
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yamlindex cb8529c8f3..7eafae87c5 100644--- a/backend/api/mcp/gen/openapi.yaml+++ b/backend/api/mcp/gen/openapi.yaml@@ -7878,6 +7878,10 @@ components:reason:type: stringtitle: reason+ export:+ type: boolean+ title: export+ description: Whether export the query result.- oneOf:- type: objectproperties:@@ -11392,6 +11396,13 @@ components:title: contentformat: bytedescription: The export file content.+ appliedAccessGrant:+ type: string+ title: applied_access_grant+ description: |-+ The just-in-time access grant applied to this export, if any.+ Format: projects/{project}/accessGrants/{accessGrant}.+ Empty when the user was authorized through normal ACL rather than a grant.title: ExportResponseadditionalProperties: falsebytebase.v1.ExportVCSProviderUsersRequest:@@ -12949,6 +12960,8 @@ components:- create_time: the access creation time in "2006-01-02T15:04:05Z07:00" format, support ">=", ">", "<=" and "<" operator.- query: the access query, support "==" and ".contains(xx)" operator- target: the target database fullname, support "==" operator.+ - unmask: whether the grant allows unmasking sensitive data, support "==" operator with a boolean literal.+ - export: whether the grant allows exporting the query result, support "==" operator with a boolean literal.Examples:- creator == "users/[email protected]"@@ -12958,6 +12971,8 @@ components:- issue == "projects/x/issues/123"- status == "ACTIVE" && expire_time > "2024-02-01T00:00:00Z"- target == "instances/sample/databases/employee"+ - unmask == true+ - export == true && status == "ACTIVE"orderBy:type: stringtitle: order_by@@ -15854,6 +15869,13 @@ components:$ref: '#/components/schemas/bytebase.v1.QueryResult'title: resultsdescription: The query results.+ appliedAccessGrant:+ type: string+ title: applied_access_grant+ description: |-+ The just-in-time access grant applied to this query, if any.+ Format: projects/{project}/accessGrants/{accessGrant}.+ Empty when the user was authorized through normal ACL rather than a grant.title: QueryResponseadditionalProperties: falsebytebase.v1.QueryResult:@@ -20487,7 +20509,7 @@ components:When source is CREATE_DATABASE, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_nameWhen source is EXPORT_DATA, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_nameWhen source is REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role- When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, request.unmask+ When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, request.unmask, request.data_exportFor examples:resource.environment_id == "prod" && statement.affected_rows >= 100diff --git a/backend/api/v1/access_grant_service.go b/backend/api/v1/access_grant_service.goindex 02f1e50fc0..9c455853ed 100644--- a/backend/api/v1/access_grant_service.go+++ b/backend/api/v1/access_grant_service.go@@ -202,6 +202,7 @@ func (s *AccessGrantService) CreateAccessGrant(ctx context.Context, request *conTargets: ag.Targets,Query: ag.Query,Unmask: ag.Unmask,+ Export: ag.Export,Reason: ag.Reason,RequestedDuration: requestedDuration,},@@ -428,6 +429,7 @@ func convertToAccessGrant(msg *store.AccessGrantMessage) *v1pb.AccessGrant {ag.Targets = p.Targetsag.Query = p.Queryag.Unmask = p.Unmask+ ag.Export = p.Exportif p.IssueId != 0 {ag.Issue = common.FormatIssue(msg.ProjectID, p.IssueId)}diff --git a/backend/api/v1/audit.go b/backend/api/v1/audit.goindex ffdcd06eab..6db8dae513 100644--- a/backend/api/v1/audit.go+++ b/backend/api/v1/audit.go@@ -499,7 +499,7 @@ func getResponseString(response any) (string, error) {case *v1pb.AdminExecuteResponse:return redactAdminExecuteResponse(r)case *v1pb.ExportResponse:- return nil+ return redactExportResponse(r)case *v1pb.LoginResponse:return redactLoginResponse(r)case *v1pb.ExchangeTokenResponse:@@ -536,6 +536,17 @@ func redactExportRequest(r *v1pb.ExportRequest) *v1pb.ExportRequest {return r}+// redactExportResponse drops the exported file content but keeps the applied+// access grant so audit logs record which grant authorized the export.+func redactExportResponse(r *v1pb.ExportResponse) *v1pb.ExportResponse {+ if r == nil || r.AppliedAccessGrant == "" {+ return nil+ }+ return &v1pb.ExportResponse{+ AppliedAccessGrant: r.AppliedAccessGrant,+ }+}+func redactLoginRequest(r *v1pb.LoginRequest) *v1pb.LoginRequest {if r == nil {return nil@@ -733,7 +744,8 @@ func redactQueryResponse(r *v1pb.QueryResponse) *v1pb.QueryResponse {return nil}n := &v1pb.QueryResponse{- Results: nil,+ Results: nil,+ AppliedAccessGrant: r.AppliedAccessGrant,}for _, result := range r.Results {n.Results = append(n.Results, &v1pb.QueryResult{diff --git a/backend/api/v1/sql_service.go b/backend/api/v1/sql_service.goindex 07caed4d5d..2e53406a96 100644--- a/backend/api/v1/sql_service.go+++ b/backend/api/v1/sql_service.go@@ -162,10 +162,50 @@ func (s *SQLService) AdminExecute(ctx context.Context, stream *connect.BidiStrea}}-// preCheckAccess finds and returns the best matching active access grant for the query.-// It lists access grants filtered by project, creator, status, statement, target database,-// and expiry, then prefers the grant with unmask=true if available.-func (s *SQLService) preCheckAccess(ctx context.Context, request *v1pb.QueryRequest, instance *store.InstanceMessage, database *store.DatabaseMessage) *store.AccessGrantMessage {+// buildExportQueryContext assembles the db.QueryContext for an export request.+// SkipMasking has to be set here (not only checked around the post-execution+// MaskResults pass) because some drivers mask at query time via SQL rewrites+// — by the time the second pass runs the rows would already be masked, and+// a JIT grant with unmask=true would silently export masked data. See PR+// #20487 review (RainbowDashy).+func buildExportQueryContext(restriction *store.EffectiveQueryDataPolicy, userEmail string, schema *string, skipMasking bool) db.QueryContext {+ qc := db.QueryContext{+ Limit: int(restriction.MaximumResultRows),+ OperatorEmail: userEmail,+ MaximumSQLResultSize: restriction.MaximumResultSize,+ SkipMasking: skipMasking,+ }+ if restriction.MaxQueryTimeoutInSeconds > 0 {+ qc.Timeout = &durationpb.Duration{Seconds: restriction.MaxQueryTimeoutInSeconds}+ }+ if schema != nil {+ qc.Schema = *schema+ }+ return qc+}++// accessOperation distinguishes between Query and Export so preCheckAccess can pick+// a grant whose capabilities actually authorize the operation in question.+type accessOperation int++const (+ accessOperationQuery accessOperation = iota+ accessOperationExport+)++// preCheckAccess finds and returns the best matching active access grant for the+// requested operation. It lists active grants filtered by project, creator,+// statement, target database, and expiry, then narrows and ranks them per+// operation:+//+// - Query: any matching grant confers ACL bypass; among them, prefer Unmask=true+// so SkipMasking can be turned on when the user is entitled to unmasked data.+// - Export: only grants with Export=true authorize the export, so filter to+// those first; among them, prefer Unmask=true to also skip masking.+//+// The returned grant is guaranteed to have a non-nil Payload — callers may+// deref Payload.Unmask / Payload.Export without an additional check.+func (s *SQLService) preCheckAccess(ctx context.Context, statement string, instance *store.InstanceMessage, database *store.DatabaseMessage, operation accessOperation) *store.AccessGrantMessage {project, err := s.store.GetProject(ctx, &store.FindProjectMessage{Workspace: common.GetWorkspaceIDFromContext(ctx),ResourceID: &database.ProjectID,@@ -195,7 +235,7 @@ func (s *SQLService) preCheckAccess(ctx context.Context, request *v1pb.QueryRequ`status == "ACTIVE" && target == %q && expire_time > %q && query == %q`,databaseFullName,now,- strings.TrimSpace(request.Statement),+ strings.TrimSpace(statement),)filterQ, err := store.GetListAccessGrantFilter(filter)if err != nil {@@ -217,7 +257,7 @@ func (s *SQLService) preCheckAccess(ctx context.Context, request *v1pb.QueryRequif len(grants) == 0 {return nil}- readOnly, err := isReadOnlyStatementForAccessGrant(ctx, instance.Metadata.GetEngine(), request.Statement)+ readOnly, err := isReadOnlyStatementForAccessGrant(ctx, instance.Metadata.GetEngine(), statement)if err != nil {slog.Warn("failed to validate access grant query", log.BBError(err))return nil@@ -226,13 +266,35 @@ func (s *SQLService) preCheckAccess(ctx context.Context, request *v1pb.QueryRequslog.Warn("skip access grant for non-read-only query", slog.String("instance", instance.ResourceID), slog.String("database", database.DatabaseName))return nil}- // Pick the best grant (prefer unmask=true).+ // Narrow to grants whose capabilities actually authorize this operation,+ // then prefer Unmask=true so the caller can set SkipMasking when the+ // user is entitled to unmasked data. Filtering keeps Query from ever+ // being "covered" by an export-only grant (which would still bypass the+ // ACL check) when an unmask grant exists in the same set — see the+ // review note that the old combined score conflated the two dimensions.+ var candidates []*store.AccessGrantMessagefor _, grant := range grants {- if grant.Payload != nil && grant.Payload.Unmask {- return grant+ if grant.Payload == nil {+ // Defensive: a nil payload means we can't read Unmask/Export+ // anyway, so it can't authorize anything beyond raw ACL bypass.+ // Skipping here also lets downstream callers deref Payload safely.+ continue+ }+ if operation == accessOperationExport && !grant.Payload.Export {+ continue+ }+ candidates = append(candidates, grant)+ }+ if len(candidates) == 0 {+ return nil+ }+ best := candidates[0]+ for _, grant := range candidates[1:] {+ if !best.Payload.Unmask && grant.Payload.Unmask {+ best = grant}}- return grants[0]+ return best}func (s *SQLService) Query(ctx context.Context, req *connect.Request[v1pb.QueryRequest]) (*connect.Response[v1pb.QueryResponse], error) {@@ -243,7 +305,7 @@ func (s *SQLService) Query(ctx context.Context, req *connect.Request[v1pb.QueryRreturn nil, err}- accessGrant := s.preCheckAccess(ctx, request, instance, database)+ accessGrant := s.preCheckAccess(ctx, request.Statement, instance, database, accessOperationQuery)statement := request.Statement// In Redshift datashare, Rewrite query used for parser.@@ -319,10 +381,12 @@ func (s *SQLService) Query(ctx context.Context, req *connect.Request[v1pb.QueryRqueryContext.Timeout = &durationpb.Duration{Seconds: queryRestriction.MaxQueryTimeoutInSeconds}}- var optionalAccessCheck accessCheckFunc- if accessGrant == nil {- optionalAccessCheck = s.accessCheck- }+ // Span-level ACL still runs even when a JIT grant matched. The grant+ // authorizes only its target databases — any cross-database reference+ // (e.g. `SELECT * FROM db_b.secret` from a grant on `db_a`) still has+ // to clear the regular IAM check on the foreign database. See PR+ // #20487 review for the cross-DB exfiltration scenario this guards.+ optionalAccessCheck := s.accessCheckWithGrant(accessGrant)results, _, duration, queryErr := queryRetryStopOnError(ctx,s.store,@@ -392,6 +456,9 @@ func (s *SQLService) Query(ctx context.Context, req *connect.Request[v1pb.QueryRresponse := &v1pb.QueryResponse{Results: results,}+ if accessGrant != nil {+ response.AppliedAccessGrant = common.FormatAccessGrant(accessGrant.ProjectID, accessGrant.ID)+ }return connect.NewResponse(response), nil}@@ -886,6 +953,12 @@ func (s *SQLService) Export(ctx context.Context, req *connect.Request[v1pb.Exporstatement = strings.ReplaceAll(statement, fmt.Sprintf("%s.", database.DatabaseName), "")}+ // When an active access grant covers this export request, the user is already+ // authorized and we skip the regular ACL check, just like the Query request.+ // `preCheckAccess(..., accessOperationExport)` only returns grants with+ // Export=true, so the presence of a grant here is sufficient to bypass ACL.+ accessGrant := s.preCheckAccess(ctx, request.Statement, instance, database, accessOperationExport)+// Validate the request.// New query ACL experience.if instance.Metadata.GetEngine() != storepb.Engine_MYSQL {@@ -903,7 +976,16 @@ func (s *SQLService) Export(ctx context.Context, req *connect.Request[v1pb.Exporif err != nil {return nil, err}- bytes, duration, exportErr := doExport(ctx, s.store, s.dbFactory, s.licenseService, request, user, instance, database, s.accessCheck, s.schemaSyncer, dataSource)++ // Same cross-database guardrail as Query: the JIT grant authorizes only+ // its target databases, so span-level ACL still runs and only the+ // granted targets are exempted from IAM. See PR #20487 review.+ optionalAccessCheck := s.accessCheckWithGrant(accessGrant)+ skipMasking := false+ if accessGrant != nil {+ skipMasking = accessGrant.Payload.Unmask+ }+ bytes, duration, exportErr := doExport(ctx, s.store, s.dbFactory, s.licenseService, request, user, instance, database, optionalAccessCheck, s.schemaSyncer, dataSource, skipMasking)s.createQueryHistory(database, store.QueryHistoryTypeExport, statement, user.Email, duration, exportErr)@@ -911,9 +993,14 @@ func (s *SQLService) Export(ctx context.Context, req *connect.Request[v1pb.Exporreturn nil, connect.NewError(connect.CodeInternal, errors.New(exportErr.Error()))}- return connect.NewResponse(&v1pb.ExportResponse{+ exportResponse := &v1pb.ExportResponse{Content: bytes,- }), nil+ }+ if accessGrant != nil {+ exportResponse.AppliedAccessGrant = common.FormatAccessGrant(accessGrant.ProjectID, accessGrant.ID)+ }++ return connect.NewResponse(exportResponse), nil}func (s *SQLService) doExportFromIssue(ctx context.Context, requestName string) (*v1pb.ExportResponse, error) {@@ -1043,6 +1130,7 @@ func doExport(optionalAccessCheck accessCheckFunc,schemaSyncer *schemasync.Syncer,dataSource *storepb.DataSource,+ skipMasking bool,) ([]byte, time.Duration, error) {if dataSource == nil {return nil, 0, connect.NewError(connect.CodeNotFound, errors.Errorf("cannot found valid data source"))@@ -1073,17 +1161,7 @@ func doExport(request.Limit,database.ProjectID,)- queryContext := db.QueryContext{- Limit: int(queryRestriction.MaximumResultRows),- OperatorEmail: user.Email,- MaximumSQLResultSize: queryRestriction.MaximumResultSize,- }- if queryRestriction.MaxQueryTimeoutInSeconds > 0 {- queryContext.Timeout = &durationpb.Duration{Seconds: queryRestriction.MaxQueryTimeoutInSeconds}- }- if request.Schema != nil {- queryContext.Schema = *request.Schema- }+ queryContext := buildExportQueryContext(queryRestriction, user.Email, request.Schema, skipMasking)// Split the statement for span analysisstatements, err := parserbase.SplitMultiSQL(instance.Metadata.GetEngine(), request.Statement)@@ -1111,7 +1189,7 @@ func doExport(return nil, duration, queryErr}- if licenseService.IsFeatureEnabledForInstance(ctx, common.GetWorkspaceIDFromContext(ctx), v1pb.PlanFeature_FEATURE_DATA_MASKING, instance) == nil {+ if !skipMasking && licenseService.IsFeatureEnabledForInstance(ctx, common.GetWorkspaceIDFromContext(ctx), v1pb.PlanFeature_FEATURE_DATA_MASKING, instance) == nil {masker := NewQueryResultMasker(stores)if err := masker.MaskResults(ctx, spans, results, instance, user); err != nil {return nil, duration, err@@ -1481,6 +1559,40 @@ func (s *SQLService) accessCheck(user *store.UserMessage,spans []*parserbase.QuerySpan,isExplain bool,+) error {+ return s.accessCheckWithGrantedTargets(ctx, instance, database, user, spans, isExplain, nil)+}++// accessCheckWithGrant returns an accessCheckFunc that exempts the access+// grant's target databases from IAM checks while keeping span-level checks for+// every other source database. This preserves JIT-grant behavior for the+// grant's target (the user is already authorized there) but blocks cross-+// database exfiltration via cross-DB references like `SELECT * FROM db_b.t`+// from a grant targeting `db_a` — see PR #20487 review.+//+// Pass `accessGrant == nil` to skip wrapping; callers in that case should+// reference `s.accessCheck` directly.+func (s *SQLService) accessCheckWithGrant(accessGrant *store.AccessGrantMessage) accessCheckFunc {+ if accessGrant == nil || accessGrant.Payload == nil {+ return s.accessCheck+ }+ grantedTargets := make(map[string]struct{}, len(accessGrant.Payload.Targets))+ for _, t := range accessGrant.Payload.Targets {+ grantedTargets[t] = struct{}{}+ }+ return func(ctx context.Context, instance *store.InstanceMessage, database *store.DatabaseMessage, user *store.UserMessage, spans []*parserbase.QuerySpan, isExplain bool) error {+ return s.accessCheckWithGrantedTargets(ctx, instance, database, user, spans, isExplain, grantedTargets)+ }+}++func (s *SQLService) accessCheckWithGrantedTargets(+ ctx context.Context,+ instance *store.InstanceMessage,+ database *store.DatabaseMessage,+ user *store.UserMessage,+ spans []*parserbase.QuerySpan,+ isExplain bool,+ grantedTargets map[string]struct{},) error {project, err := s.store.GetProject(ctx, &store.FindProjectMessage{Workspace: common.GetWorkspaceIDFromContext(ctx), ResourceID: &database.ProjectID})if err != nil {@@ -1502,6 +1614,9 @@ func (s *SQLService) accessCheck(checkDatabaseAccess := func(perm permission.Permission) error {databaseFullName := common.FormatDatabase(instance.ResourceID, database.DatabaseName)+ if _, granted := grantedTargets[databaseFullName]; granted {+ return nil+ }attributes := map[string]any{common.CELAttributeRequestTime: time.Now(),common.CELAttributeResourceDatabase: databaseFullName,@@ -1585,9 +1700,13 @@ func (s *SQLService) accessCheck(var deniedResources []stringfor column := range span.SourceColumns {+ columnDatabaseFullName := common.FormatDatabase(instance.ResourceID, column.Database)+ if _, granted := grantedTargets[columnDatabaseFullName]; granted {+ continue+ }attributes := map[string]any{common.CELAttributeRequestTime: time.Now(),- common.CELAttributeResourceDatabase: common.FormatDatabase(instance.ResourceID, column.Database),+ common.CELAttributeResourceDatabase: columnDatabaseFullName,common.CELAttributeResourceSchemaName: column.Schema,common.CELAttributeResourceTableName: column.Table,}diff --git a/backend/api/v1/sql_service_test.go b/backend/api/v1/sql_service_test.goindex ab79c7f4e8..e6de5ace43 100644--- a/backend/api/v1/sql_service_test.go+++ b/backend/api/v1/sql_service_test.go@@ -10,6 +10,63 @@ import ("github.com/bytebase/bytebase/backend/store")+// TestBuildExportQueryContextPropagatesSkipMasking pins the bug fix from PR+// #20487: when an export is authorized by a JIT grant with unmask=true,+// SkipMasking must reach db.QueryContext so the driver doesn't mask rows at+// query time. The earlier code only consulted skipMasking around the+// post-execution MaskResults pass — by then drivers like postgres with+// query-time masking rewrites had already returned masked rows.+func TestBuildExportQueryContextPropagatesSkipMasking(t *testing.T) {+ restriction := &store.EffectiveQueryDataPolicy{+ MaximumResultRows: 1000,+ MaximumResultSize: 1 << 20,+ }++ t.Run("grant with unmask=true sets SkipMasking", func(t *testing.T) {+ qc := buildExportQueryContext(restriction, "[email protected]", nil, true)+ require.True(t, qc.SkipMasking, "SkipMasking must propagate so driver-level masking is bypassed")+ })++ t.Run("grant with unmask=false keeps SkipMasking false", func(t *testing.T) {+ qc := buildExportQueryContext(restriction, "[email protected]", nil, false)+ require.False(t, qc.SkipMasking, "SkipMasking must stay false so masking still applies")+ })+}++// TestBuildExportQueryContextPropagatesOtherFields guards against accidental+// drops of the surrounding fields if buildExportQueryContext is edited.+func TestBuildExportQueryContextPropagatesOtherFields(t *testing.T) {+ schema := "public"+ restriction := &store.EffectiveQueryDataPolicy{+ MaximumResultRows: 500,+ MaximumResultSize: 2 << 20,+ MaxQueryTimeoutInSeconds: 30,+ }++ qc := buildExportQueryContext(restriction, "[email protected]", &schema, false)++ require.Equal(t, 500, qc.Limit)+ require.Equal(t, "[email protected]", qc.OperatorEmail)+ require.Equal(t, int64(2<<20), qc.MaximumSQLResultSize)+ require.Equal(t, "public", qc.Schema)+ require.NotNil(t, qc.Timeout)+ require.Equal(t, int64(30), qc.Timeout.Seconds)+}++// TestBuildExportQueryContextOmitsTimeoutWhenZero verifies that an unset+// MaxQueryTimeoutInSeconds doesn't leak a zero-Duration timeout into the+// query context (which the driver layer treats differently from "no timeout").+func TestBuildExportQueryContextOmitsTimeoutWhenZero(t *testing.T) {+ restriction := &store.EffectiveQueryDataPolicy{+ MaximumResultRows: 100,+ MaximumResultSize: 1 << 20,+ }++ qc := buildExportQueryContext(restriction, "[email protected]", nil, false)+ require.Nil(t, qc.Timeout)+ require.Equal(t, "", qc.Schema)+}+func TestResolveDataSourceIDUsesAdminForNonReadOnlyAutomaticQueryWhenAllowed(t *testing.T) {instance := &store.InstanceMessage{Metadata: &storepb.Instance{diff --git a/backend/common/cel.go b/backend/common/cel.goindex fa283a6f49..7faf0136a9 100644--- a/backend/common/cel.go+++ b/backend/common/cel.go@@ -34,6 +34,7 @@ var ApprovalFactors = []cel.EnvOption{cel.Variable(CELAttributeRequestExpirationDays, cel.IntType),cel.Variable(CELAttributeRequestRole, cel.StringType),cel.Variable(CELAttributeRequestUnmask, cel.BoolType),+ cel.Variable(CELAttributeRequestExport, cel.BoolType),// Risk scopecel.Variable(CELAttributeRiskLevel, cel.StringType),// Size limitdiff --git a/backend/common/cel_attributes.go b/backend/common/cel_attributes.goindex 9d18645b1d..2e48741533 100644--- a/backend/common/cel_attributes.go+++ b/backend/common/cel_attributes.go@@ -47,6 +47,8 @@ const (CELAttributeRequestRole = "request.role"// CELAttributeRequestUnmask indicates whether the request includes unmask permission.CELAttributeRequestUnmask = "request.unmask"+ // CELAttributeRequestExport indicates whether the request includes export permission.+ CELAttributeRequestExport = "request.data_export"// CELAttributeRequestTime is the timestamp of the request.CELAttributeRequestTime = "request.time")diff --git a/backend/generated-go/store/access_grant.pb.go b/backend/generated-go/store/access_grant.pb.goindex 5897bf8bad..820ce7ada0 100644--- a/backend/generated-go/store/access_grant.pb.go+++ b/backend/generated-go/store/access_grant.pb.go@@ -126,8 +126,10 @@ type AccessGrantPayload struct {// Stored when the user provides a TTL instead of an absolute expire_time.// The server computes expire_time from this value at activation time.RequestedDuration *durationpb.Duration `protobuf:"bytes,6,opt,name=requested_duration,json=requestedDuration,proto3" json:"requested_duration,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache+ // Whether export the query result.+ Export bool `protobuf:"varint,7,opt,name=export,proto3" json:"export,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache}func (x *AccessGrantPayload) Reset() {@@ -202,6 +204,13 @@ func (x *AccessGrantPayload) GetRequestedDuration() *durationpb.Duration {return nil}+func (x *AccessGrantPayload) GetExport() bool {+ if x != nil {+ return x.Export+ }+ return false+}+var File_store_access_grant_proto protoreflect.FileDescriptorconst file_store_access_grant_proto_rawDesc = "" +@@ -213,14 +222,15 @@ const file_store_access_grant_proto_rawDesc = "" +"\aPENDING\x10\x01\x12\n" +"\n" +"\x06ACTIVE\x10\x02\x12\v\n" +- "\aREVOKED\x10\x03\"\xd9\x01\n" ++ "\aREVOKED\x10\x03\"\xf1\x01\n" +"\x12AccessGrantPayload\x12\x19\n" +"\bissue_id\x18\x01 \x01(\x03R\aissueId\x12\x18\n" +"\atargets\x18\x02 \x03(\tR\atargets\x12\x14\n" +"\x05query\x18\x03 \x01(\tR\x05query\x12\x16\n" +"\x06unmask\x18\x04 \x01(\bR\x06unmask\x12\x16\n" +"\x06reason\x18\x05 \x01(\tR\x06reason\x12H\n" +- "\x12requested_duration\x18\x06 \x01(\v2\x19.google.protobuf.DurationR\x11requestedDurationB\x93\x01\n" ++ "\x12requested_duration\x18\x06 \x01(\v2\x19.google.protobuf.DurationR\x11requestedDuration\x12\x16\n" ++ "\x06export\x18\a \x01(\bR\x06exportB\x93\x01\n" +"\x12com.bytebase.storeB\x10AccessGrantProtoP\x01Z\x12generated-go/store\xa2\x02\x03BSX\xaa\x02\x0eBytebase.Store\xca\x02\x0eBytebase\\Store\xe2\x02\x1aBytebase\\Store\\GPBMetadata\xea\x02\x0fBytebase::Storeb\x06proto3"var (diff --git a/backend/generated-go/store/access_grant_equal.pb.go b/backend/generated-go/store/access_grant_equal.pb.goindex 269b937497..ad6fb5984e 100644--- a/backend/generated-go/store/access_grant_equal.pb.go+++ b/backend/generated-go/store/access_grant_equal.pb.go@@ -43,5 +43,8 @@ func (x *AccessGrantPayload) Equal(y *AccessGrantPayload) bool {if p, q := x.RequestedDuration, y.RequestedDuration; (p == nil && q != nil) || (p != nil && (q == nil || p.Seconds != q.Seconds || p.Nanos != q.Nanos)) {return false}+ if x.Export != y.Export {+ return false+ }return true}diff --git a/backend/generated-go/v1/access_grant_service.pb.go b/backend/generated-go/v1/access_grant_service.pb.goindex ce444879de..ba36ce4004 100644--- a/backend/generated-go/v1/access_grant_service.pb.go+++ b/backend/generated-go/v1/access_grant_service.pb.go@@ -114,10 +114,12 @@ type AccessGrant struct {// The query permission granted.Query string `protobuf:"bytes,7,opt,name=query,proto3" json:"query,omitempty"`// Whether the grant allows unmasking sensitive data.- Unmask bool `protobuf:"varint,8,opt,name=unmask,proto3" json:"unmask,omitempty"`- CreateTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`- UpdateTime *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`- Reason string `protobuf:"bytes,12,opt,name=reason,proto3" json:"reason,omitempty"`+ Unmask bool `protobuf:"varint,8,opt,name=unmask,proto3" json:"unmask,omitempty"`+ CreateTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`+ UpdateTime *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`+ Reason string `protobuf:"bytes,12,opt,name=reason,proto3" json:"reason,omitempty"`+ // Whether export the query result.+ Export bool `protobuf:"varint,13,opt,name=export,proto3" json:"export,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}@@ -247,6 +249,13 @@ func (x *AccessGrant) GetReason() string {return ""}+func (x *AccessGrant) GetExport() bool {+ if x != nil {+ return x.Export+ }+ return false+}+type isAccessGrant_Expiration interface {isAccessGrant_Expiration()}@@ -331,6 +340,8 @@ type ListAccessGrantsRequest struct {// - create_time: the access creation time in "2006-01-02T15:04:05Z07:00" format, support ">=", ">", "<=" and "<" operator.// - query: the access query, support "==" and ".contains(xx)" operator// - target: the target database fullname, support "==" operator.+ // - unmask: whether the grant allows unmasking sensitive data, support "==" operator with a boolean literal.+ // - export: whether the grant allows exporting the query result, support "==" operator with a boolean literal.//// Examples:// - creator == "users/[email protected]"@@ -340,6 +351,8 @@ type ListAccessGrantsRequest struct {// - issue == "projects/x/issues/123"// - status == "ACTIVE" && expire_time > "2024-02-01T00:00:00Z"// - target == "instances/sample/databases/employee"+ // - unmask == true+ // - export == true && status == "ACTIVE"Filter string `protobuf:"bytes,4,opt,name=filter,proto3" json:"filter,omitempty"`// The order by of access grants.// Support creator, expire_time, create_time. The default sorting order is ascending.@@ -760,7 +773,7 @@ var File_v1_access_grant_service_proto protoreflect.FileDescriptorconst file_v1_access_grant_service_proto_rawDesc = "" +"\n" +- "\x1dv1/access_grant_service.proto\x12\vbytebase.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13v1/annotation.proto\"\x9a\x05\n" ++ "\x1dv1/access_grant_service.proto\x12\vbytebase.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13v1/annotation.proto\"\xb2\x05\n" +"\vAccessGrant\x12\x12\n" +"\x04name\x18\x01 \x01(\tR\x04name\x12\x1d\n" +"\acreator\x18\x02 \x01(\tB\x03\xe0A\x02R\acreator\x12<\n" +@@ -777,7 +790,8 @@ const file_v1_access_grant_service_proto_rawDesc = "" +"\vupdate_time\x18\n" +" \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +"updateTime\x12\x16\n" +- "\x06reason\x18\f \x01(\tR\x06reason\"F\n" ++ "\x06reason\x18\f \x01(\tR\x06reason\x12\x16\n" ++ "\x06export\x18\r \x01(\bR\x06export\"F\n" +"\x06Status\x12\x16\n" +"\x12STATUS_UNSPECIFIED\x10\x00\x12\v\n" +"\aPENDING\x10\x01\x12\n" +diff --git a/backend/generated-go/v1/access_grant_service_equal.pb.go b/backend/generated-go/v1/access_grant_service_equal.pb.goindex 35cf69eda0..0e34eba682 100644--- a/backend/generated-go/v1/access_grant_service_equal.pb.go+++ b/backend/generated-go/v1/access_grant_service_equal.pb.go@@ -51,6 +51,9 @@ func (x *AccessGrant) Equal(y *AccessGrant) bool {if x.Reason != y.Reason {return false}+ if x.Export != y.Export {+ return false+ }return true}diff --git a/backend/generated-go/v1/setting_service.pb.go b/backend/generated-go/v1/setting_service.pb.goindex 646379e70b..7b6307741c 100644--- a/backend/generated-go/v1/setting_service.pb.go+++ b/backend/generated-go/v1/setting_service.pb.go@@ -2514,7 +2514,7 @@ type WorkspaceApprovalSetting_Rule struct {// When source is CREATE_DATABASE, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name// When source is EXPORT_DATA, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_name// When source is REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role- // When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, request.unmask+ // When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, request.unmask, request.data_export//// For examples:// resource.environment_id == "prod" && statement.affected_rows >= 100diff --git a/backend/generated-go/v1/sql_service.pb.go b/backend/generated-go/v1/sql_service.pb.goindex 8a04dc1097..4e995a4623 100644--- a/backend/generated-go/v1/sql_service.pb.go+++ b/backend/generated-go/v1/sql_service.pb.go@@ -659,9 +659,13 @@ func (x *QueryRequest) GetContainer() string {type QueryResponse struct {state protoimpl.MessageState `protogen:"open.v1"`// The query results.- Results []*QueryResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache+ Results []*QueryResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`+ // The just-in-time access grant applied to this query, if any.+ // Format: projects/{project}/accessGrants/{accessGrant}.+ // Empty when the user was authorized through normal ACL rather than a grant.+ AppliedAccessGrant string `protobuf:"bytes,2,opt,name=applied_access_grant,json=appliedAccessGrant,proto3" json:"applied_access_grant,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache}func (x *QueryResponse) Reset() {@@ -701,6 +705,13 @@ func (x *QueryResponse) GetResults() []*QueryResult {return nil}+func (x *QueryResponse) GetAppliedAccessGrant() string {+ if x != nil {+ return x.AppliedAccessGrant+ }+ return ""+}+type QueryOption struct {state protoimpl.MessageState `protogen:"open.v1"`RedisRunCommandsOn QueryOption_RedisRunCommandsOn `protobuf:"varint,1,opt,name=redis_run_commands_on,json=redisRunCommandsOn,proto3,enum=bytebase.v1.QueryOption_RedisRunCommandsOn" json:"redis_run_commands_on,omitempty"`@@ -1578,9 +1589,13 @@ func (x *ExportRequest) GetSchema() string {type ExportResponse struct {state protoimpl.MessageState `protogen:"open.v1"`// The export file content.- Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`- unknownFields protoimpl.UnknownFields- sizeCache protoimpl.SizeCache+ Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`+ // The just-in-time access grant applied to this export, if any.+ // Format: projects/{project}/accessGrants/{accessGrant}.+ // Empty when the user was authorized through normal ACL rather than a grant.+ AppliedAccessGrant string `protobuf:"bytes,2,opt,name=applied_access_grant,json=appliedAccessGrant,proto3" json:"applied_access_grant,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache}func (x *ExportResponse) Reset() {@@ -1620,6 +1635,13 @@ func (x *ExportResponse) GetContent() []byte {return nil}+func (x *ExportResponse) GetAppliedAccessGrant() string {+ if x != nil {+ return x.AppliedAccessGrant+ }+ return ""+}+type DiffMetadataRequest struct {state protoimpl.MessageState `protogen:"open.v1"`// The metadata of the source schema.@@ -2723,9 +2745,10 @@ const file_v1_sql_service_proto_rawDesc = "" +"\tcontainer\x18\b \x01(\tH\x01R\tcontainer\x88\x01\x01B\t\n" +"\a_schemaB\f\n" +"\n" +- "_container\"C\n" ++ "_container\"u\n" +"\rQueryResponse\x122\n" +- "\aresults\x18\x01 \x03(\v2\x18.bytebase.v1.QueryResultR\aresults\"\xa1\x03\n" ++ "\aresults\x18\x01 \x03(\v2\x18.bytebase.v1.QueryResultR\aresults\x120\n" ++ "\x14applied_access_grant\x18\x02 \x01(\tR\x12appliedAccessGrant\"\xa1\x03\n" +"\vQueryOption\x12^\n" +"\x15redis_run_commands_on\x18\x01 \x01(\x0e2+.bytebase.v1.QueryOption.RedisRunCommandsOnR\x12redisRunCommandsOn\x12]\n" +"\x14mssql_explain_format\x18\x02 \x01(\x0e2+.bytebase.v1.QueryOption.MSSQLExplainFormatR\x12mssqlExplainFormat\"[\n" +@@ -2866,9 +2889,10 @@ const file_v1_sql_service_proto_rawDesc = "" +"\bpassword\x18\x06 \x01(\tR\bpassword\x12$\n" +"\x0edata_source_id\x18\a \x01(\tR\fdataSourceId\x12\x1b\n" +"\x06schema\x18\b \x01(\tH\x00R\x06schema\x88\x01\x01B\t\n" +- "\a_schema\"*\n" ++ "\a_schema\"\\\n" +"\x0eExportResponse\x12\x18\n" +- "\acontent\x18\x01 \x01(\fR\acontent\"\xdc\x01\n" ++ "\acontent\x18\x01 \x01(\fR\acontent\x120\n" ++ "\x14applied_access_grant\x18\x02 \x01(\tR\x12appliedAccessGrant\"\xdc\x01\n" +"\x13DiffMetadataRequest\x12K\n" +"\x0fsource_metadata\x18\x01 \x01(\v2\x1d.bytebase.v1.DatabaseMetadataB\x03\xe0A\x02R\x0esourceMetadata\x12K\n" +"\x0ftarget_metadata\x18\x02 \x01(\v2\x1d.bytebase.v1.DatabaseMetadataB\x03\xe0A\x02R\x0etargetMetadata\x12+\n" +diff --git a/backend/generated-go/v1/sql_service_equal.pb.go b/backend/generated-go/v1/sql_service_equal.pb.goindex 4935bbd657..029bd3d6ba 100644--- a/backend/generated-go/v1/sql_service_equal.pb.go+++ b/backend/generated-go/v1/sql_service_equal.pb.go@@ -101,6 +101,9 @@ func (x *QueryResponse) Equal(y *QueryResponse) bool {return false}}+ if x.AppliedAccessGrant != y.AppliedAccessGrant {+ return false+ }return true}@@ -510,6 +513,9 @@ func (x *ExportResponse) Equal(y *ExportResponse) bool {if string(x.Content) != string(y.Content) {return false}+ if x.AppliedAccessGrant != y.AppliedAccessGrant {+ return false+ }return true}diff --git a/backend/runner/approval/runner.go b/backend/runner/approval/runner.goindex b98e56b188..e82998734c 100644--- a/backend/runner/approval/runner.go+++ b/backend/runner/approval/runner.go@@ -856,6 +856,7 @@ func buildCELVariablesForAccessGrant(ctx context.Context, stores *store.Store, ibaseVars := map[string]any{common.CELAttributeResourceProjectID: issue.ProjectID,common.CELAttributeRequestUnmask: accessGrant.Payload.Unmask,+ common.CELAttributeRequestExport: accessGrant.Payload.Export,}targets := accessGrant.Payload.Targetsdiff --git a/backend/store/access_grant.go b/backend/store/access_grant.goindex dc3c3ceda0..71d6836291 100644--- a/backend/store/access_grant.go+++ b/backend/store/access_grant.go@@ -402,6 +402,18 @@ func GetListAccessGrantFilter(filter string) (*qb.Query, error) {return nil, errors.Errorf("target value must be a string")}return qb.Q().Space("access_grant.payload->'targets' @> jsonb_build_array(to_jsonb(?::text))", targetStr), nil+ case "unmask":+ boolVal, ok := value.(bool)+ if !ok {+ return nil, errors.Errorf("unmask value must be a boolean")+ }+ return qb.Q().Space("COALESCE((access_grant.payload->>'unmask')::boolean, false) = ?", boolVal), nil+ case "export":+ boolVal, ok := value.(bool)+ if !ok {+ return nil, errors.Errorf("export value must be a boolean")+ }+ return qb.Q().Space("COALESCE((access_grant.payload->>'export')::boolean, false) = ?", boolVal), nildefault:return nil, errors.Errorf("unsupported variable %q", variable)}diff --git a/frontend/src/types/proto-es/v1/access_grant_service_pb.d.ts b/frontend/src/types/proto-es/v1/access_grant_service_pb.d.tsindex 2b902b5617..1e63cc80d3 100644--- a/frontend/src/types/proto-es/v1/access_grant_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/access_grant_service_pb.d.ts@@ -113,6 +113,13 @@ export declare type AccessGrant = Message<"bytebase.v1.AccessGrant"> & {* @generated from field: string reason = 12;*/reason: string;++ /**+ * Whether export the query result.+ *+ * @generated from field: bool export = 13;+ */+ export: boolean;};/**@@ -216,6 +223,8 @@ export declare type ListAccessGrantsRequest = Message<"bytebase.v1.ListAccessGra* - create_time: the access creation time in "2006-01-02T15:04:05Z07:00" format, support ">=", ">", "<=" and "<" operator.* - query: the access query, support "==" and ".contains(xx)" operator* - target: the target database fullname, support "==" operator.+ * - unmask: whether the grant allows unmasking sensitive data, support "==" operator with a boolean literal.+ * - export: whether the grant allows exporting the query result, support "==" operator with a boolean literal.** Examples:* - creator == "users/[email protected]"@@ -225,6 +234,8 @@ export declare type ListAccessGrantsRequest = Message<"bytebase.v1.ListAccessGra* - issue == "projects/x/issues/123"* - status == "ACTIVE" && expire_time > "2024-02-01T00:00:00Z"* - target == "instances/sample/databases/employee"+ * - unmask == true+ * - export == true && status == "ACTIVE"** @generated from field: string filter = 4;*/diff --git a/frontend/src/types/proto-es/v1/access_grant_service_pb.js b/frontend/src/types/proto-es/v1/access_grant_service_pb.jsindex fd46d96f10..755126b1bc 100644--- a/frontend/src/types/proto-es/v1/access_grant_service_pb.js+++ b/frontend/src/types/proto-es/v1/access_grant_service_pb.js@@ -14,7 +14,7 @@ import { file_v1_annotation } from "./annotation_pb";* Describes the file v1/access_grant_service.proto.*/export const file_v1_access_grant_service = /*@__PURE__*/- fileDesc("Ch12MS9hY2Nlc3NfZ3JhbnRfc2VydmljZS5wcm90bxILYnl0ZWJhc2Uudj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QWNjZXNzR3JhbnRzEiguYnl0ZWJhc2UudjEuU2VhcmNoTXlBY2Nlc3NHcmFudHNSZXF1ZXN0GikuYnl0ZWJhc2UudjEuU2VhcmNoTXlBY2Nlc3NHcmFudHNSZXNwb25zZSJTiuowE2JiLmFjY2Vzc0dyYW50cy5nZXSQ6jACgtPkkwIyOgEqIi0vdjEve3BhcmVudD1wcm9qZWN0cy8qfS9hY2Nlc3NHcmFudHM6c2VhcmNoTXlCrQEKD2NvbS5ieXRlYmFzZS52MUIXQWNjZXNzR3JhbnRTZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_timestamp, file_v1_annotation]);+ fileDesc("Ch12MS9hY2Nlc3NfZ3JhbnRfc2VydmljZS5wcm90bxILYnl0ZWJhc2UudjEiwwQKC0FjY2Vzc0dyYW50EgwKBG5hbWUYASABKAkSFAoHY3JlYXRvchgCIAEoCUID4EECEjQKBnN0YXR1cxgDIAEoDjIfLmJ5dGViYXNlLnYxLkFjY2Vzc0dyYW50LlN0YXR1c0ID4EEDEjEKC2V4cGlyZV90aW1lGAQgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEgAEi0KA3R0bBgLIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbkID4EEESAASEgoFaXNzdWUYBSABKAlCA+BBAxIUCgd0YXJnZXRzGAYgAygJQgPgQQISDQoFcXVlcnkYByABKAkSDgoGdW5tYXNrGAggASgIEjQKC2NyZWF0ZV90aW1lGAkgASgLMhouZ29vZ2xlLnByb3RvYnVmLlR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FzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_timestamp, file_v1_annotation]);/*** Describes the message bytebase.v1.AccessGrant.diff --git a/frontend/src/types/proto-es/v1/setting_service_pb.d.ts b/frontend/src/types/proto-es/v1/setting_service_pb.d.tsindex 8fcc02e4a5..9f44a30f5c 100644--- a/frontend/src/types/proto-es/v1/setting_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/setting_service_pb.d.ts@@ -820,7 +820,7 @@ export declare type WorkspaceApprovalSetting_Rule = Message<"bytebase.v1.Workspa* When source is CREATE_DATABASE, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name* When source is EXPORT_DATA, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_name* When source is REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role- * When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, request.unmask+ * When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, request.unmask, request.data_export** For examples:* resource.environment_id == "prod" && statement.affected_rows >= 100diff --git a/frontend/src/types/proto-es/v1/sql_service_pb.d.ts b/frontend/src/types/proto-es/v1/sql_service_pb.d.tsindex 75eb082540..80790a8cf7 100644--- a/frontend/src/types/proto-es/v1/sql_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/sql_service_pb.d.ts@@ -162,6 +162,15 @@ export declare type QueryResponse = Message<"bytebase.v1.QueryResponse"> & {* @generated from field: repeated bytebase.v1.QueryResult results = 1;*/results: QueryResult[];++ /**+ * The just-in-time access grant applied to this query, if any.+ * Format: projects/{project}/accessGrants/{accessGrant}.+ * Empty when the user was authorized through normal ACL rather than a grant.+ *+ * @generated from field: string applied_access_grant = 2;+ */+ appliedAccessGrant: string;};/**@@ -1072,6 +1081,15 @@ export declare type ExportResponse = Message<"bytebase.v1.ExportResponse"> & {* @generated from field: bytes content = 1;*/content: Uint8Array;++ /**+ * The just-in-time access grant applied to this export, if any.+ * Format: projects/{project}/accessGrants/{accessGrant}.+ * Empty when the user was authorized through normal ACL rather than a grant.+ *+ * @generated from field: string applied_access_grant = 2;+ */+ appliedAccessGrant: string;};/**diff --git a/frontend/src/types/proto-es/v1/sql_service_pb.js b/frontend/src/types/proto-es/v1/sql_service_pb.jsindex d0f41b5b63..26a8c721f0 100644--- a/frontend/src/types/proto-es/v1/sql_service_pb.js+++ b/frontend/src/types/proto-es/v1/sql_service_pb.js@@ -15,7 +15,7 @@ import { file_v1_database_service } from "./database_service_pb";* Describes the file v1/sql_service.proto.*/export const file_v1_sql_service = /*@__PURE__*/- fileDesc("ChR2MS9zcWxfc2VydmljZS5wcm90bxILYnl0ZWJhc2UudjEiqgEKE0FkbWluRXhlY3V0ZVJlcXVlc3QSKwoEbmFtZRgBIAEoCUId4EEC+kEXChVieXRlYmFzZS5jb20vRGF0YWJhc2USEQoJc3RhdGVtZW50GAIgASgJEg0KBWxpbWl0GAMgASgFEhMKBnNjaGVtYRgEIAEoCUgAiAEBEhYKCWNvbnRhaW5lchgFIAEoCUgBiAEBQgkKB19zY2hlbWFCDAoKX2NvbnRhaW5lciJBChRBZG1pbkV4ZWN1dGVSZXNwb25zZRIpCgdyZXN1bHRzGAEgAygLMhguYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQi/AEKDFF1ZXJ5UmVxdWVzdBIrCgRuYW1lGAEgASgJQh3gQQL6QRcKFWJ5dGViYXNlLmNvbS9EYXRhYmFzZRIRCglzdGF0ZW1lbnQYAiABKAkSDQoFbGltaXQYAyABKAUSFgoOZGF0YV9zb3VyY2VfaWQYBCABKAkSDwoHZXhwbGFpbhgFIAEoCBITCgZzY2hlbWEYBiABKAlIAIgBARIuCgxxdWVyeV9vcHRpb24YByABKAsyGC5ieXRlYmFzZS52MS5RdWVyeU9wdGlv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RlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_google_api_annotations, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_struct, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_database_service]);+ fileDesc("ChR2MS9zcWxfc2VydmljZS5wcm90bxILYnl0ZWJhc2UudjEiqgEKE0FkbWluRXhlY3V0ZVJlcXVlc3QSKwoEbmFtZRgBIAEoCUId4EEC+kEXChVieXRlYmFzZS5jb20vRGF0YWJhc2USEQoJc3RhdGVtZW50GAIgASgJEg0KBWxpbWl0GAMgASgFEhMKBnNjaGVtYRgEIAEoCUgAiAEBEhYKCWNvbnRhaW5lchgFIAEoCUgBiAEBQgkKB19zY2hlbWFCDAoKX2NvbnRhaW5lciJBChRBZG1pbkV4ZWN1dGVSZXNwb25zZRIpCgdyZXN1bHRzGAEgAygLMhguYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQi/AEKDFF1ZXJ5UmVxdWVzdBIrCgRuYW1lGAEgASgJQh3gQQL6QRcKFWJ5dGViYXNlLmNvbS9EYXRhYmFzZRIRCglzdGF0ZW1lbnQYAiABKAkSDQoFbGltaXQYAyABKAUSFgoOZGF0YV9zb3VyY2VfaWQYBCABKAkSDwoHZXhwbGFpbhgFIAEoCBITCgZzY2hlbWEYBiABKAlIAIgBARIuCgxxdWVyeV9vcHRpb24YByABKAsyGC5ieXRlYmFzZS52MS5RdWVyeU9wdGlvbhIWCgljb250YWluZXIYCCABKAlIAYgBAUIJCgdfc2NoZW1hQgwKCl9jb250YWluZXIiWAoNUXVlcnlSZXNwb25zZRIpCgdyZXN1bHRzGAEgAygLMhguYnl0ZWJhc2UudjEuUXVlcnlSZXN1bHQSHAoUYXBwbGllZF9hY2Nlc3NfZ3JhbnQYAiABKAki+QIKC1F1ZXJ5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dG8z", [file_google_api_annotations, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_struct, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_database_service]);/*** Describes the message bytebase.v1.AdminExecuteRequest.diff --git a/frontend/src/types/v1/sql.ts b/frontend/src/types/v1/sql.tsindex 17e0e81e28..09a8d5057c 100644--- a/frontend/src/types/v1/sql.ts+++ b/frontend/src/types/v1/sql.ts@@ -1,7 +1,13 @@import type { Code } from "@connectrpc/connect";import type { QueryResponse } from "../proto-es/v1/sql_service_pb";-export interface SQLResultSetV1 extends Omit<QueryResponse, "$typeName"> {+export interface SQLResultSetV1+ extends Omit<QueryResponse, "$typeName" | "appliedAccessGrant"> {error: string; // empty if no error occurredstatus?: Code;+ // The wire field is a required proto3 string (default ""), but adapter+ // sites (webTerminal AdminExecuteResponse spread, abort/error branches)+ // construct a SQLResultSetV1 before any grant context exists. Keeping it+ // optional here lets those sites omit it; treat absent or "" as no grant.+ appliedAccessGrant?: string;}diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex e08f361456..dadc614581 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -7028,6 +7028,8 @@ paths:- create_time: the access creation time in "2006-01-02T15:04:05Z07:00" format, support ">=", ">", "<=" and "<" operator.- query: the access query, support "==" and ".contains(xx)" operator- target: the target database fullname, support "==" operator.+ - unmask: whether the grant allows unmasking sensitive data, support "==" operator with a boolean literal.+ - export: whether the grant allows exporting the query result, support "==" operator with a boolean literal.Examples:- creator == "users/[email protected]"@@ -7037,6 +7039,8 @@ paths:- issue == "projects/x/issues/123"- status == "ACTIVE" && expire_time > "2024-02-01T00:00:00Z"- target == "instances/sample/databases/employee"+ - unmask == true+ - export == true && status == "ACTIVE"schema:type: stringtitle: filter@@ -7051,6 +7055,8 @@ paths:- create_time: the access creation time in "2006-01-02T15:04:05Z07:00" format, support ">=", ">", "<=" and "<" operator.- query: the access query, support "==" and ".contains(xx)" operator- target: the target database fullname, support "==" operator.+ - unmask: whether the grant allows unmasking sensitive data, support "==" operator with a boolean literal.+ - export: whether the grant allows exporting the query result, support "==" operator with a boolean literal.Examples:- creator == "users/[email protected]"@@ -7060,6 +7066,8 @@ paths:- issue == "projects/x/issues/123"- status == "ACTIVE" && expire_time > "2024-02-01T00:00:00Z"- target == "instances/sample/databases/employee"+ - unmask == true+ - export == true && status == "ACTIVE"- name: orderByin: querydescription: |-@@ -16778,6 +16786,10 @@ components:reason:type: stringtitle: reason+ export:+ type: boolean+ title: export+ description: Whether export the query result.- oneOf:- type: objectproperties:@@ -20524,6 +20536,13 @@ components:title: contentformat: bytedescription: The export file content.+ appliedAccessGrant:+ type: string+ title: applied_access_grant+ description: |-+ The just-in-time access grant applied to this export, if any.+ Format: projects/{project}/accessGrants/{accessGrant}.+ Empty when the user was authorized through normal ACL rather than a grant.title: ExportResponseadditionalProperties: falsebytebase.v1.ExportVCSProviderUsersRequest:@@ -22161,6 +22180,8 @@ components:- create_time: the access creation time in "2006-01-02T15:04:05Z07:00" format, support ">=", ">", "<=" and "<" operator.- query: the access query, support "==" and ".contains(xx)" operator- target: the target database fullname, support "==" operator.+ - unmask: whether the grant allows unmasking sensitive data, support "==" operator with a boolean literal.+ - export: whether the grant allows exporting the query result, support "==" operator with a boolean literal.Examples:- creator == "users/[email protected]"@@ -22170,6 +22191,8 @@ components:- issue == "projects/x/issues/123"- status == "ACTIVE" && expire_time > "2024-02-01T00:00:00Z"- target == "instances/sample/databases/employee"+ - unmask == true+ - export == true && status == "ACTIVE"orderBy:type: stringtitle: order_by@@ -25122,6 +25145,13 @@ components:$ref: '#/components/schemas/bytebase.v1.QueryResult'title: resultsdescription: The query results.+ appliedAccessGrant:+ type: string+ title: applied_access_grant+ description: |-+ The just-in-time access grant applied to this query, if any.+ Format: projects/{project}/accessGrants/{accessGrant}.+ Empty when the user was authorized through normal ACL rather than a grant.title: QueryResponseadditionalProperties: falsebytebase.v1.QueryResult:@@ -29932,7 +29962,7 @@ components:When source is CREATE_DATABASE, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_nameWhen source is EXPORT_DATA, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_nameWhen source is REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role- When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, request.unmask+ When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, request.unmask, request.data_exportFor examples:resource.environment_id == "prod" && statement.affected_rows >= 100diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex 6fa4251ed9..81e5853579 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -389,6 +389,7 @@| unmask | [bool](#bool) | | Whether the grant allows unmasking sensitive data. || reason | [string](#string) | | || requested_duration | [google.protobuf.Duration](#google-protobuf-Duration) | | The requested duration for the access grant. Stored when the user provides a TTL instead of an absolute expire_time. The server computes expire_time from this value at activation time. |+| export | [bool](#bool) | | Whether export the query result. |diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.htmlindex 93f4a05640..05c508306c 100644--- a/proto/gen/grpc-doc/store/index.html+++ b/proto/gen/grpc-doc/store/index.html@@ -1675,6 +1675,13 @@ Stored when the user provides a TTL instead of an absolute expire_time.The server computes expire_time from this value at activation time. </p></td></tr>+ <tr>+ <td>export</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether export the query result. </p></td>+ </tr>+</tbody></table>diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 6cbb7b42fd..c10819a442 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -825,6 +825,7 @@ Authorization method for RPC calls.| create_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | || update_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | || reason | [string](#string) | | |+| export | [bool](#bool) | | Whether export the query result. |@@ -888,9 +889,9 @@ Authorization method for RPC calls.| parent | [string](#string) | | The parent project of the access grants. Format: projects/{project} || page_size | [int32](#int32) | | The maximum number of access grants to return. || page_token | [string](#string) | | A page token from a previous ListAccessGrants call. |-| filter | [string](#string) | | Filter expression using AIP-160 syntax. Supported fields: - name: the fullname in "projects/{project}/accessGrants/{access_grant}" format, support "==" operator. - creator: the creator name in "users/{email}" format, support "==" operator. - status: the access status, support "==" and "in" operator. - issue: the access issue fullname, support "==" operator. - expire_time: the access expire time in "2006-01-02T15:04:05Z07:00" format, support ">=", ">", "<=" and "<" operator. - create_time: the access creation time in "2006-01-02T15:04:05Z07:00" format, support ">=", ">", "<=" and "<" operator. - query: the access query, support "==" and ".contains(xx)" operator - target: the target database fullname, support "==" operator.+| filter | [string](#string) | | Filter expression using AIP-160 syntax. Supported fields: - name: the fullname in "projects/{project}/accessGrants/{access_grant}" format, support "==" operator. - creator: the creator name in "users/{email}" format, support "==" operator. - status: the access status, support "==" and "in" operator. - issue: the access issue fullname, support "==" operator. - expire_time: the access expire time in "2006-01-02T15:04:05Z07:00" format, support ">=", ">", "<=" and "<" operator. - create_time: the access creation time in "2006-01-02T15:04:05Z07:00" format, support ">=", ">", "<=" and "<" operator. - query: the access query, support "==" and ".contains(xx)" operator - target: the target database fullname, support "==" operator. - unmask: whether the grant allows unmasking sensitive data, support "==" operator with a boolean literal. - export: whether the grant allows exporting the query result, support "==" operator with a boolean literal.-Examples: - creator == "users/[email protected]" - status == "ACTIVE" - status in ["ACTIVE", "PENDING"] - creator == "users/[email protected]" && status == "ACTIVE" - issue == "projects/x/issues/123" - status == "ACTIVE" && expire_time > "2024-02-01T00:00:00Z" - target == "instances/sample/databases/employee" |+Examples: - creator == "users/[email protected]" - status == "ACTIVE" - status in ["ACTIVE", "PENDING"] - creator == "users/[email protected]" && status == "ACTIVE" - issue == "projects/x/issues/123" - status == "ACTIVE" && expire_time > "2024-02-01T00:00:00Z" - target == "instances/sample/databases/employee" - unmask == true - export == true && status == "ACTIVE" || order_by | [string](#string) | | The order by of access grants. Support creator, expire_time, create_time. The default sorting order is ascending. For example: - order_by = "creator" - order_by = "expire_time desc" - order_by = "expire_time asc, create_time desc" |@@ -4487,6 +4488,7 @@ DatabaseService manages databases and their schemas.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- || content | [bytes](#bytes) | | The export file content. |+| applied_access_grant | [string](#string) | | The just-in-time access grant applied to this export, if any. Format: projects/{project}/accessGrants/{accessGrant}. Empty when the user was authorized through normal ACL rather than a grant. |@@ -4583,6 +4585,7 @@ DatabaseService manages databases and their schemas.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- || results | [QueryResult](#bytebase-v1-QueryResult) | repeated | The query results. |+| applied_access_grant | [string](#string) | | The just-in-time access grant applied to this query, if any. Format: projects/{project}/accessGrants/{accessGrant}. Empty when the user was authorized through normal ACL rather than a grant. |@@ -6583,7 +6586,7 @@ The `source` field filters which rules apply. The `condition` field then evaluatAll supported variables: statement.affected_rows: affected row count in the DDL/DML, support "==", "!=", "<", "<=", ">", ">=" operations. statement.table_rows: table row count number, support "==", "!=", "<", "<=", ">", ">=" operations. resource.environment_id: the environment resource id, support "==", "!=", "in [xx]", "!(in [xx])" operations. resource.project_id: the project resource id, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations. resource.db_engine: the database engine type, support "==", "!=", "in [xx]", "!(in [xx])" operations. Check the Engine enum for values. statement.sql_type: the SQL type, support "==", "!=", "in [xx]", "!(in [xx])" operations. resource.database_name: the database name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations. resource.schema_name: the schema name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations. resource.table_name: the table name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations. statement.text: the SQL statement, support "contains()", "matches()", "startsWith()", "endsWith()" operations. request.expiration_days: the role expiration days for the request, support "==", "!=", "<", "<=", ">", ">=" operations. request.role: the request role full name, support "==", "!=", "in [xx]", "!(in [xx])", "contains()", "matches()", "startsWith()", "endsWith()" operations.-When source is CHANGE_DATABASE, support: statement.*, resource.* (excluding request.*) When source is CREATE_DATABASE, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name When source is EXPORT_DATA, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_name When source is REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, request.unmask+When source is CHANGE_DATABASE, support: statement.*, resource.* (excluding request.*) When source is CREATE_DATABASE, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name When source is EXPORT_DATA, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_name When source is REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, request.unmask, request.data_exportFor examples: resource.environment_id == "prod" && statement.affected_rows >= 100 resource.table_name.matches("sensitive_.*") && resource.db_engine == "MYSQL" || source | [WorkspaceApprovalSetting.Rule.Source](#bytebase-v1-WorkspaceApprovalSetting-Rule-Source) | | |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex c3d337aafa..46a19785b1 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -3252,6 +3252,13 @@ Format: instances/{instance}/databases/{database} </p></td><td><p> </p></td></tr>+ <tr>+ <td>export</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p>Whether export the query result. </p></td>+ </tr>+</tbody></table>@@ -3387,6 +3394,8 @@ Supported fields:- create_time: the access creation time in "2006-01-02T15:04:05Z07:00" format, support ">=", ">", "<=" and "<" operator.- query: the access query, support "==" and ".contains(xx)" operator- target: the target database fullname, support "==" operator.+- unmask: whether the grant allows unmasking sensitive data, support "==" operator with a boolean literal.+- export: whether the grant allows exporting the query result, support "==" operator with a boolean literal.Examples:- creator == "users/[email protected]"@@ -3395,7 +3404,9 @@ Examples:- creator == "users/[email protected]" && status == "ACTIVE"- issue == "projects/x/issues/123"- status == "ACTIVE" && expire_time > "2024-02-01T00:00:00Z"-- target == "instances/sample/databases/employee" </p></td>+- target == "instances/sample/databases/employee"+- unmask == true+- export == true && status == "ACTIVE" </p></td></tr><tr>@@ -13577,6 +13588,15 @@ Oracle and search path in Postgres. </p></td><td><p>The export file content. </p></td></tr>+ <tr>+ <td>applied_access_grant</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The just-in-time access grant applied to this export, if any.+Format: projects/{project}/accessGrants/{accessGrant}.+Empty when the user was authorized through normal ACL rather than a grant. </p></td>+ </tr>+</tbody></table>@@ -13853,6 +13873,15 @@ CosmosDB only. </p></td><td><p>The query results. </p></td></tr>+ <tr>+ <td>applied_access_grant</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>The just-in-time access grant applied to this query, if any.+Format: projects/{project}/accessGrants/{accessGrant}.+Empty when the user was authorized through normal ACL rather than a grant. </p></td>+ </tr>+</tbody></table>@@ -19073,7 +19102,7 @@ When source is CHANGE_DATABASE, support: statement.*, resource.* (excluding requWhen source is CREATE_DATABASE, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_nameWhen source is EXPORT_DATA, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_nameWhen source is REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role-When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, request.unmask+When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, request.unmask, request.data_exportFor examples:resource.environment_id == "prod" && statement.affected_rows >= 100diff --git a/proto/store/store/access_grant.proto b/proto/store/store/access_grant.protoindex 75a1db5c07..019df79a95 100644--- a/proto/store/store/access_grant.proto+++ b/proto/store/store/access_grant.proto@@ -35,4 +35,7 @@ message AccessGrantPayload {// Stored when the user provides a TTL instead of an absolute expire_time.// The server computes expire_time from this value at activation time.google.protobuf.Duration requested_duration = 6;++ // Whether export the query result.+ bool export = 7;}diff --git a/proto/v1/v1/access_grant_service.proto b/proto/v1/v1/access_grant_service.protoindex 64c8799ebe..46fcb70ef7 100644--- a/proto/v1/v1/access_grant_service.proto+++ b/proto/v1/v1/access_grant_service.proto@@ -142,6 +142,9 @@ message AccessGrant {}string reason = 12;++ // Whether export the query result.+ bool export = 13;}message GetAccessGrantRequest {@@ -177,6 +180,8 @@ message ListAccessGrantsRequest {// - create_time: the access creation time in "2006-01-02T15:04:05Z07:00" format, support ">=", ">", "<=" and "<" operator.// - query: the access query, support "==" and ".contains(xx)" operator// - target: the target database fullname, support "==" operator.+ // - unmask: whether the grant allows unmasking sensitive data, support "==" operator with a boolean literal.+ // - export: whether the grant allows exporting the query result, support "==" operator with a boolean literal.//// Examples:// - creator == "users/[email protected]"@@ -186,6 +191,8 @@ message ListAccessGrantsRequest {// - issue == "projects/x/issues/123"// - status == "ACTIVE" && expire_time > "2024-02-01T00:00:00Z"// - target == "instances/sample/databases/employee"+ // - unmask == true+ // - export == true && status == "ACTIVE"string filter = 4;// The order by of access grants.diff --git a/proto/v1/v1/setting_service.proto b/proto/v1/v1/setting_service.protoindex 89b52c8702..84d564d6ce 100644--- a/proto/v1/v1/setting_service.proto+++ b/proto/v1/v1/setting_service.proto@@ -315,7 +315,7 @@ message WorkspaceApprovalSetting {// When source is CREATE_DATABASE, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name// When source is EXPORT_DATA, support: resource.environment_id, resource.project_id, resource.db_engine, resource.database_name, resource.schema_name, resource.table_name// When source is REQUEST_ROLE, support: resource.project_id, request.expiration_days, request.role- // When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, request.unmask+ // When source is REQUEST_ACCESS, support: resource.environment_id, resource.project_id, request.unmask, request.data_export//// For examples:// resource.environment_id == "prod" && statement.affected_rows >= 100diff --git a/proto/v1/v1/sql_service.proto b/proto/v1/v1/sql_service.protoindex 33a7eae2b7..429aed53ab 100644--- a/proto/v1/v1/sql_service.proto+++ b/proto/v1/v1/sql_service.proto@@ -157,6 +157,11 @@ message QueryRequest {message QueryResponse {// The query results.repeated QueryResult results = 1;++ // The just-in-time access grant applied to this query, if any.+ // Format: projects/{project}/accessGrants/{accessGrant}.+ // Empty when the user was authorized through normal ACL rather than a grant.+ string applied_access_grant = 2;}message QueryOption {@@ -441,6 +446,11 @@ message ExportRequest {message ExportResponse {// The export file content.bytes content = 1;++ // The just-in-time access grant applied to this export, if any.+ // Format: projects/{project}/accessGrants/{accessGrant}.+ // Empty when the user was authorized through normal ACL rather than a grant.+ string applied_access_grant = 2;}message DiffMetadataRequest {