Skip to content

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

chore(breaking): make access request use the max expire time (#20636)

ecmadaoa7720a616d97
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yaml
index 949f7f4383..12fe5f60d3 100644
--- a/backend/api/mcp/gen/openapi.yaml
+++ b/backend/api/mcp/gen/openapi.yaml
@@ -20653,9 +20653,9 @@ components:
title: announcement
description: The setting of custom announcement
$ref: '#/components/schemas/bytebase.v1.Announcement'
- maximumRoleExpiration:
- title: maximum_role_expiration
- description: The max duration for role expired.
+ maximumRequestExpiration:
+ title: maximum_request_expiration
+ description: The max expiration duration for role grants and data access requests.
$ref: '#/components/schemas/google.protobuf.Duration'
domains:
type: array
diff --git a/backend/api/v1/access_grant_service.go b/backend/api/v1/access_grant_service.go
index 72add37de6..a6e4cf3d8e 100644
--- a/backend/api/v1/access_grant_service.go
+++ b/backend/api/v1/access_grant_service.go
@@ -192,6 +192,22 @@ func (s *AccessGrantService) CreateAccessGrant(ctx context.Context, request *con
return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("expiration (expire_time or ttl) is required"))
}
+ // Enforce the workspace maximum request expiration cap on the requested access
+ // window, matching the request-role flow and the client-side cap.
+ workspaceProfileSetting, err := s.store.GetWorkspaceProfileSetting(ctx, workspaceID)
+ if err != nil {
+ return nil, connect.NewError(connect.CodeInternal, errors.New("failed to get workspace profile setting"))
+ }
+ if maximumRequestExpiration := workspaceProfileSetting.GetMaximumRequestExpiration(); maximumRequestExpiration != nil {
+ maxExpireTime := time.Now().Add(maximumRequestExpiration.AsDuration())
+ switch {
+ case expireTime != nil && expireTime.After(maxExpireTime):
+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("expiration exceeds maximum request expiration %s", maximumRequestExpiration.AsDuration()))
+ case requestedDuration != nil && requestedDuration.AsDuration() > maximumRequestExpiration.AsDuration():
+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("expiration exceeds maximum request expiration %s", maximumRequestExpiration.AsDuration()))
+ }
+ }
+
// Step 1: Create the access grant.
grant, err := s.store.CreateAccessGrant(ctx, &store.AccessGrantMessage{
ProjectID: projectID,
diff --git a/backend/api/v1/issue_service.go b/backend/api/v1/issue_service.go
index 038c320e9f..fd428ca65b 100644
--- a/backend/api/v1/issue_service.go
+++ b/backend/api/v1/issue_service.go
@@ -469,6 +469,22 @@ func (s *IssueService) buildIssueMessage(ctx context.Context, project *store.Pro
}
}
+ // Enforce the workspace maximum request expiration cap (project owner is
+ // exempt), mirroring SetIamPolicy. The role grant's condition carries the
+ // `request.time < timestamp(...)` clause that becomes the IAM binding, so
+ // validating it here also rejects a missing expiration when a cap is set.
+ if request.Issue.RoleGrant.GetRole() != fmt.Sprintf("roles/%s", store.ProjectOwnerRole) {
+ workspaceProfileSetting, err := s.store.GetWorkspaceProfileSetting(ctx, common.GetWorkspaceIDFromContext(ctx))
+ if err != nil {
+ return nil, connect.NewError(connect.CodeInternal, errors.New("failed to get workspace profile setting"))
+ }
+ if maximumRequestExpiration := workspaceProfileSetting.GetMaximumRequestExpiration(); maximumRequestExpiration != nil {
+ if err := validateExpirationInExpression(request.Issue.RoleGrant.GetCondition().GetExpression(), maximumRequestExpiration); err != nil {
+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Wrapf(err, "failed to validate role expiration"))
+ }
+ }
+ }
+
roleGrantUserEmail, err := common.GetUserEmail(request.Issue.RoleGrant.User)
if err != nil {
return nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to get user email from %q", request.Issue.RoleGrant.User))
diff --git a/backend/api/v1/project_service.go b/backend/api/v1/project_service.go
index d4b9f9daee..f7e382b33c 100644
--- a/backend/api/v1/project_service.go
+++ b/backend/api/v1/project_service.go
@@ -1077,9 +1077,9 @@ func validateIAMPolicy(
if err != nil {
return connect.NewError(connect.CodeInternal, errors.New("failed to get workspace profile setting"))
}
- var maximumRoleExpiration *durationpb.Duration
+ var maximumRequestExpiration *durationpb.Duration
if workspaceProfileSetting != nil {
- maximumRoleExpiration = workspaceProfileSetting.MaximumRoleExpiration
+ maximumRequestExpiration = workspaceProfileSetting.MaximumRequestExpiration
}
roleMessages, err := stores.ListRoles(ctx, &store.FindRoleMessage{Workspace: common.GetWorkspaceIDFromContext(ctx)})
@@ -1117,14 +1117,14 @@ func validateIAMPolicy(
}
}
- return validateBindings(msg.Resource, bindings, roleMessages, maximumRoleExpiration)
+ return validateBindings(msg.Resource, bindings, roleMessages, maximumRequestExpiration)
}
func validateBindings(
parent string,
bindings []*v1pb.Binding,
roles []*store.RoleMessage,
- maximumRoleExpiration *durationpb.Duration,
+ maximumRequestExpiration *durationpb.Duration,
) error {
existingRoles := make(map[string]bool)
for _, role := range roles {
@@ -1147,9 +1147,9 @@ func validateBindings(
return err
}
- if binding.Role != fmt.Sprintf("roles/%s", store.ProjectOwnerRole) && maximumRoleExpiration != nil {
- // Only validate when maximumRoleExpiration is set and the role is not project owner.
- if err := validateExpirationInExpression(binding.GetCondition().GetExpression(), maximumRoleExpiration); err != nil {
+ if binding.Role != fmt.Sprintf("roles/%s", store.ProjectOwnerRole) && maximumRequestExpiration != nil {
+ // Only validate when maximumRequestExpiration is set and the role is not project owner.
+ if err := validateExpirationInExpression(binding.GetCondition().GetExpression(), maximumRequestExpiration); err != nil {
return connect.NewError(connect.CodeInvalidArgument, errors.Wrapf(err, "failed to validate expiration for binding %v", binding.Role))
}
}
@@ -1162,8 +1162,8 @@ func validateBindings(
// * request.time < timestamp("2021-01-01T00:00:00Z")
//
// Other expressions will be ignored.
-func validateExpirationInExpression(expr string, maximumRoleExpiration *durationpb.Duration) error {
- if maximumRoleExpiration == nil {
+func validateExpirationInExpression(expr string, maximumRequestExpiration *durationpb.Duration) error {
+ if maximumRequestExpiration == nil {
return nil
}
if !strings.Contains(expr, "request.time") {
@@ -1237,9 +1237,9 @@ func validateExpirationInExpression(expr string, maximumRoleExpiration *duration
if err != nil {
return errors.Errorf("failed to parse time %v, error: %v", value, err)
}
- maxExpirationTime := time.Now().Add(maximumRoleExpiration.AsDuration())
+ maxExpirationTime := time.Now().Add(maximumRequestExpiration.AsDuration())
if t.After(maxExpirationTime) {
- return errors.Errorf("time %s exceeds maximum role expiration %s", t.Format(time.DateTime), maxExpirationTime.Format(time.DateTime))
+ return errors.Errorf("time %s exceeds maximum request expiration %s", t.Format(time.DateTime), maxExpirationTime.Format(time.DateTime))
}
return nil
default:
diff --git a/backend/api/v1/project_service_test.go b/backend/api/v1/project_service_test.go
index 646ef5dddc..69a19028a3 100644
--- a/backend/api/v1/project_service_test.go
+++ b/backend/api/v1/project_service_test.go
@@ -256,28 +256,50 @@ func TestValidateBindings(t *testing.T) {
func TestValidateIAMPolicyExpression(t *testing.T) {
timeNow := time.Now()
+ thirtyDays := &durationpb.Duration{Seconds: 60 * 60 * 24 * 30}
+ withinCap := fmt.Sprintf("request.time < timestamp(\"%s\")", timeNow.AddDate(0, 0, 15).Format(time.RFC3339))
+ overCap := fmt.Sprintf("request.time < timestamp(\"%s\")", timeNow.AddDate(0, 0, 60).Format(time.RFC3339))
tests := []struct {
- expr string
- maximumRoleExpiration *durationpb.Duration
- wantErr bool
+ name string
+ expr string
+ maximumRequestExpiration *durationpb.Duration
+ wantErr bool
}{
{
- expr: fmt.Sprintf("request.time < timestamp(\"%s\")", timeNow.AddDate(0, 0, 15).Format(time.RFC3339)),
- maximumRoleExpiration: &durationpb.Duration{Seconds: 60 * 60 * 24 * 30}, // 30 days
+ name: "within cap",
+ expr: withinCap,
+ maximumRequestExpiration: thirtyDays,
},
{
- expr: fmt.Sprintf("request.time < timestamp(\"%s\")", timeNow.AddDate(0, 0, 60).Format(time.RFC3339)),
- maximumRoleExpiration: &durationpb.Duration{Seconds: 60 * 60 * 24 * 30},
- wantErr: true,
+ name: "exceeds cap",
+ expr: overCap,
+ maximumRequestExpiration: thirtyDays,
+ wantErr: true,
+ },
+ {
+ name: "no cap configured",
+ expr: overCap,
+ maximumRequestExpiration: nil,
+ },
+ {
+ name: "bound with database scoping",
+ expr: fmt.Sprintf(`%s && (resource.database == "a" || resource.database == "b")`, withinCap),
+ maximumRequestExpiration: thirtyDays,
+ },
+ {
+ name: "missing request.time",
+ expr: `resource.database == "a"`,
+ maximumRequestExpiration: thirtyDays,
+ wantErr: true,
},
}
for _, tt := range tests {
- err := validateExpirationInExpression(tt.expr, tt.maximumRoleExpiration)
+ err := validateExpirationInExpression(tt.expr, tt.maximumRequestExpiration)
if tt.wantErr {
- require.Error(t, err)
+ require.Error(t, err, tt.name)
} else {
- require.NoError(t, err)
+ require.NoError(t, err, tt.name)
}
}
}
diff --git a/backend/api/v1/setting_service.go b/backend/api/v1/setting_service.go
index d289ccefa9..942df4dbaa 100644
--- a/backend/api/v1/setting_service.go
+++ b/backend/api/v1/setting_service.go
@@ -266,14 +266,14 @@ func (s *SettingService) UpdateSetting(ctx context.Context, request *connect.Req
return nil, connect.NewError(connect.CodePermissionDenied, err)
}
oldSetting.Announcement = payload.Announcement
- case "value.workspace_profile.maximum_role_expiration":
- if payload.MaximumRoleExpiration != nil {
+ case "value.workspace_profile.maximum_request_expiration":
+ if payload.MaximumRequestExpiration != nil {
// If the value is less than or equal to 0, we will remove the setting. AKA no limit.
- if payload.MaximumRoleExpiration.Seconds <= 0 {
- payload.MaximumRoleExpiration = nil
+ if payload.MaximumRequestExpiration.Seconds <= 0 {
+ payload.MaximumRequestExpiration = nil
}
}
- oldSetting.MaximumRoleExpiration = payload.MaximumRoleExpiration
+ oldSetting.MaximumRequestExpiration = payload.MaximumRequestExpiration
case "value.workspace_profile.domains":
if err := validateDomains(payload.Domains); err != nil {
return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("invalid domains, error %v", err))
diff --git a/backend/api/v1/setting_service_converter.go b/backend/api/v1/setting_service_converter.go
index 269aa3dd62..67c0db3994 100644
--- a/backend/api/v1/setting_service_converter.go
+++ b/backend/api/v1/setting_service_converter.go
@@ -251,28 +251,28 @@ func convertWorkspaceProfileSetting(v1Setting *v1pb.WorkspaceProfileSetting) *st
}
storeSetting := &storepb.WorkspaceProfileSetting{
- ExternalUrl: v1Setting.ExternalUrl,
- DisallowSignup: v1Setting.DisallowSignup,
- Require_2Fa: v1Setting.RequireMfa,
- RefreshTokenDuration: v1Setting.RefreshTokenDuration,
- AccessTokenDuration: v1Setting.AccessTokenDuration,
- InactiveSessionTimeout: v1Setting.InactiveSessionTimeout,
- MaximumRoleExpiration: v1Setting.MaximumRoleExpiration,
- Domains: v1Setting.Domains,
- EnforceIdentityDomain: v1Setting.EnforceIdentityDomain,
- DatabaseChangeMode: storepb.WorkspaceProfileSetting_DatabaseChangeMode(v1Setting.DatabaseChangeMode),
- DisallowPasswordSignin: v1Setting.DisallowPasswordSignin,
- AllowEmailCodeSignin: v1Setting.AllowEmailCodeSignin,
- EnableMetricCollection: v1Setting.EnableMetricCollection,
- EnableAuditLogStdout: v1Setting.EnableAuditLogStdout,
- Watermark: v1Setting.Watermark,
- DirectorySyncToken: v1Setting.DirectorySyncToken,
- PasswordRestriction: convertToStorePasswordRestriction(v1Setting.PasswordRestriction),
- EnableDebug: v1Setting.EnableDebug,
- SqlResultSize: v1Setting.SqlResultSize,
- QueryTimeout: v1Setting.QueryTimeout,
- SqlEditorThemeId: v1Setting.SqlEditorThemeId,
- SqlEditorCustomTheme: convertToStoreSQLEditorThemeSetting(v1Setting.SqlEditorCustomTheme),
+ ExternalUrl: v1Setting.ExternalUrl,
+ DisallowSignup: v1Setting.DisallowSignup,
+ Require_2Fa: v1Setting.RequireMfa,
+ RefreshTokenDuration: v1Setting.RefreshTokenDuration,
+ AccessTokenDuration: v1Setting.AccessTokenDuration,
+ InactiveSessionTimeout: v1Setting.InactiveSessionTimeout,
+ MaximumRequestExpiration: v1Setting.MaximumRequestExpiration,
+ Domains: v1Setting.Domains,
+ EnforceIdentityDomain: v1Setting.EnforceIdentityDomain,
+ DatabaseChangeMode: storepb.WorkspaceProfileSetting_DatabaseChangeMode(v1Setting.DatabaseChangeMode),
+ DisallowPasswordSignin: v1Setting.DisallowPasswordSignin,
+ AllowEmailCodeSignin: v1Setting.AllowEmailCodeSignin,
+ EnableMetricCollection: v1Setting.EnableMetricCollection,
+ EnableAuditLogStdout: v1Setting.EnableAuditLogStdout,
+ Watermark: v1Setting.Watermark,
+ DirectorySyncToken: v1Setting.DirectorySyncToken,
+ PasswordRestriction: convertToStorePasswordRestriction(v1Setting.PasswordRestriction),
+ EnableDebug: v1Setting.EnableDebug,
+ SqlResultSize: v1Setting.SqlResultSize,
+ QueryTimeout: v1Setting.QueryTimeout,
+ SqlEditorThemeId: v1Setting.SqlEditorThemeId,
+ SqlEditorCustomTheme: convertToStoreSQLEditorThemeSetting(v1Setting.SqlEditorCustomTheme),
}
// Convert announcement if present. The store only holds the theme colors.
@@ -324,29 +324,29 @@ func convertToWorkspaceProfileSetting(storeSetting *storepb.WorkspaceProfileSett
}
return &v1pb.WorkspaceProfileSetting{
- ExternalUrl: storeSetting.ExternalUrl,
- DisallowSignup: storeSetting.DisallowSignup,
- RequireMfa: storeSetting.Require_2Fa,
- RefreshTokenDuration: storeSetting.RefreshTokenDuration,
- AccessTokenDuration: storeSetting.AccessTokenDuration,
- InactiveSessionTimeout: storeSetting.InactiveSessionTimeout,
- MaximumRoleExpiration: storeSetting.MaximumRoleExpiration,
- Domains: storeSetting.Domains,
- EnforceIdentityDomain: storeSetting.EnforceIdentityDomain,
- DatabaseChangeMode: v1pb.DatabaseChangeMode(storeSetting.DatabaseChangeMode),
- DisallowPasswordSignin: storeSetting.DisallowPasswordSignin,
- AllowEmailCodeSignin: storeSetting.AllowEmailCodeSignin,
- EnableMetricCollection: storeSetting.EnableMetricCollection,
- EnableAuditLogStdout: storeSetting.EnableAuditLogStdout,
- Watermark: storeSetting.Watermark,
- DirectorySyncToken: storeSetting.DirectorySyncToken,
- PasswordRestriction: convertToPasswordRestrictionSetting(storeSetting.PasswordRestriction),
- Announcement: convertToV1Announcement(storeSetting.Announcement),
- EnableDebug: storeSetting.EnableDebug,
- SqlResultSize: storeSetting.SqlResultSize,
- QueryTimeout: storeSetting.QueryTimeout,
- SqlEditorThemeId: storeSetting.SqlEditorThemeId,
- SqlEditorCustomTheme: convertToV1SQLEditorThemeSetting(storeSetting.SqlEditorCustomTheme),
+ ExternalUrl: storeSetting.ExternalUrl,
+ DisallowSignup: storeSetting.DisallowSignup,
+ RequireMfa: storeSetting.Require_2Fa,
+ RefreshTokenDuration: storeSetting.RefreshTokenDuration,
+ AccessTokenDuration: storeSetting.AccessTokenDuration,
+ InactiveSessionTimeout: storeSetting.InactiveSessionTimeout,
+ MaximumRequestExpiration: storeSetting.MaximumRequestExpiration,
+ Domains: storeSetting.Domains,
+ EnforceIdentityDomain: storeSetting.EnforceIdentityDomain,
+ DatabaseChangeMode: v1pb.DatabaseChangeMode(storeSetting.DatabaseChangeMode),
+ DisallowPasswordSignin: storeSetting.DisallowPasswordSignin,
+ AllowEmailCodeSignin: storeSetting.AllowEmailCodeSignin,
+ EnableMetricCollection: storeSetting.EnableMetricCollection,
+ EnableAuditLogStdout: storeSetting.EnableAuditLogStdout,
+ Watermark: storeSetting.Watermark,
+ DirectorySyncToken: storeSetting.DirectorySyncToken,
+ PasswordRestriction: convertToPasswordRestrictionSetting(storeSetting.PasswordRestriction),
+ Announcement: convertToV1Announcement(storeSetting.Announcement),
+ EnableDebug: storeSetting.EnableDebug,
+ SqlResultSize: storeSetting.SqlResultSize,
+ QueryTimeout: storeSetting.QueryTimeout,
+ SqlEditorThemeId: storeSetting.SqlEditorThemeId,
+ SqlEditorCustomTheme: convertToV1SQLEditorThemeSetting(storeSetting.SqlEditorCustomTheme),
}
}
diff --git a/backend/generated-go/store/setting.pb.go b/backend/generated-go/store/setting.pb.go
index c351c7ef10..1560ac2afd 100644
--- a/backend/generated-go/store/setting.pb.go
+++ b/backend/generated-go/store/setting.pb.go
@@ -518,8 +518,8 @@ type WorkspaceProfileSetting struct {
RefreshTokenDuration *durationpb.Duration `protobuf:"bytes,4,opt,name=refresh_token_duration,json=refreshTokenDuration,proto3" json:"refresh_token_duration,omitempty"`
// The setting of custom announcement
Announcement *WorkspaceProfileSetting_Announcement `protobuf:"bytes,5,opt,name=announcement,proto3" json:"announcement,omitempty"`
- // The max duration for role expired.
- MaximumRoleExpiration *durationpb.Duration `protobuf:"bytes,6,opt,name=maximum_role_expiration,json=maximumRoleExpiration,proto3" json:"maximum_role_expiration,omitempty"`
+ // The max expiration duration for role grants and data access requests.
+ MaximumRequestExpiration *durationpb.Duration `protobuf:"bytes,6,opt,name=maximum_request_expiration,json=maximumRequestExpiration,proto3" json:"maximum_request_expiration,omitempty"`
// The workspace domain, e.g., bytebase.com.
Domains []string `protobuf:"bytes,7,rep,name=domains,proto3" json:"domains,omitempty"`
// Only user and group from the domains can be created and login.
@@ -629,9 +629,9 @@ func (x *WorkspaceProfileSetting) GetAnnouncement() *WorkspaceProfileSetting_Ann
return nil
}
-func (x *WorkspaceProfileSetting) GetMaximumRoleExpiration() *durationpb.Duration {
+func (x *WorkspaceProfileSetting) GetMaximumRequestExpiration() *durationpb.Duration {
if x != nil {
- return x.MaximumRoleExpiration
+ return x.MaximumRequestExpiration
}
return nil
}
@@ -2800,15 +2800,15 @@ const file_store_setting_proto_rawDesc = "" +
"\n" +
"\x13store/setting.proto\x12\x0ebytebase.store\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x16google/type/expr.proto\x1a\x14store/approval.proto\x1a\x12store/common.proto\"P\n" +
"\rSystemSetting\x12\x18\n" +
- "\alicense\x18\x03 \x01(\tR\alicenseJ\x04\b\x01\x10\x02J\x04\b\x02\x10\x03R\vauth_secretR\fworkspace_id\"\x81\x11\n" +
+ "\alicense\x18\x03 \x01(\tR\alicenseJ\x04\b\x01\x10\x02J\x04\b\x02\x10\x03R\vauth_secretR\fworkspace_id\"\x87\x11\n" +
"\x17WorkspaceProfileSetting\x12!\n" +
"\fexternal_url\x18\x01 \x01(\tR\vexternalUrl\x12'\n" +
"\x0fdisallow_signup\x18\x02 \x01(\bR\x0edisallowSignup\x12\x1f\n" +
"\vrequire_2fa\x18\x03 \x01(\bR\n" +
"require2fa\x12O\n" +
"\x16refresh_token_duration\x18\x04 \x01(\v2\x19.google.protobuf.DurationR\x14refreshTokenDuration\x12X\n" +
- "\fannouncement\x18\x05 \x01(\v24.bytebase.store.WorkspaceProfileSetting.AnnouncementR\fannouncement\x12Q\n" +
- "\x17maximum_role_expiration\x18\x06 \x01(\v2\x19.google.protobuf.DurationR\x15maximumRoleExpiration\x12\x18\n" +
+ "\fannouncement\x18\x05 \x01(\v24.bytebase.store.WorkspaceProfileSetting.AnnouncementR\fannouncement\x12W\n" +
+ "\x1amaximum_request_expiration\x18\x06 \x01(\v2\x19.google.protobuf.DurationR\x18maximumRequestExpiration\x12\x18\n" +
"\adomains\x18\a \x03(\tR\adomains\x126\n" +
"\x17enforce_identity_domain\x18\b \x01(\bR\x15enforceIdentityDomain\x12l\n" +
"\x14database_change_mode\x18\t \x01(\x0e2:.bytebase.store.WorkspaceProfileSetting.DatabaseChangeModeR\x12databaseChangeMode\x128\n" +
@@ -3099,7 +3099,7 @@ var file_store_setting_proto_goTypes = []any{
var file_store_setting_proto_depIdxs = []int32{
44, // 0: bytebase.store.WorkspaceProfileSetting.refresh_token_duration:type_name -> google.protobuf.Duration
19, // 1: bytebase.store.WorkspaceProfileSetting.announcement:type_name -> bytebase.store.WorkspaceProfileSetting.Announcement
- 44, // 2: bytebase.store.WorkspaceProfileSetting.maximum_role_expiration:type_name -> google.protobuf.Duration
+ 44, // 2: bytebase.store.WorkspaceProfileSetting.maximum_request_expiration:type_name -> google.protobuf.Duration
1, // 3: bytebase.store.WorkspaceProfileSetting.database_change_mode:type_name -> bytebase.store.WorkspaceProfileSetting.DatabaseChangeMode
44, // 4: bytebase.store.WorkspaceProfileSetting.inactive_session_timeout:type_name -> google.protobuf.Duration
20, // 5: bytebase.store.WorkspaceProfileSetting.password_restriction:type_name -> bytebase.store.WorkspaceProfileSetting.PasswordRestriction
diff --git a/backend/generated-go/store/setting_equal.pb.go b/backend/generated-go/store/setting_equal.pb.go
index b35ecc5e3d..b9f5a93b0a 100644
--- a/backend/generated-go/store/setting_equal.pb.go
+++ b/backend/generated-go/store/setting_equal.pb.go
@@ -109,7 +109,7 @@ func (x *WorkspaceProfileSetting) Equal(y *WorkspaceProfileSetting) bool {
if !x.Announcement.Equal(y.Announcement) {
return false
}
- if p, q := x.MaximumRoleExpiration, y.MaximumRoleExpiration; (p == nil && q != nil) || (p != nil && (q == nil || p.Seconds != q.Seconds || p.Nanos != q.Nanos)) {
+ if p, q := x.MaximumRequestExpiration, y.MaximumRequestExpiration; (p == nil && q != nil) || (p != nil && (q == nil || p.Seconds != q.Seconds || p.Nanos != q.Nanos)) {
return false
}
if len(x.Domains) != len(y.Domains) {
diff --git a/backend/generated-go/v1/setting_service.pb.go b/backend/generated-go/v1/setting_service.pb.go
index a24b366271..797091f678 100644
--- a/backend/generated-go/v1/setting_service.pb.go
+++ b/backend/generated-go/v1/setting_service.pb.go
@@ -995,8 +995,8 @@ type WorkspaceProfileSetting struct {
RefreshTokenDuration *durationpb.Duration `protobuf:"bytes,4,opt,name=refresh_token_duration,json=refreshTokenDuration,proto3" json:"refresh_token_duration,omitempty"`
// The setting of custom announcement
Announcement *Announcement `protobuf:"bytes,5,opt,name=announcement,proto3" json:"announcement,omitempty"`
- // The max duration for role expired.
- MaximumRoleExpiration *durationpb.Duration `protobuf:"bytes,6,opt,name=maximum_role_expiration,json=maximumRoleExpiration,proto3" json:"maximum_role_expiration,omitempty"`
+ // The max expiration duration for role grants and data access requests.
+ MaximumRequestExpiration *durationpb.Duration `protobuf:"bytes,6,opt,name=maximum_request_expiration,json=maximumRequestExpiration,proto3" json:"maximum_request_expiration,omitempty"`
// The workspace domain, e.g., bytebase.com.
Domains []string `protobuf:"bytes,7,rep,name=domains,proto3" json:"domains,omitempty"`
// Only user and group from the domains can be created and login.
@@ -1106,9 +1106,9 @@ func (x *WorkspaceProfileSetting) GetAnnouncement() *Announcement {
return nil
}
-func (x *WorkspaceProfileSetting) GetMaximumRoleExpiration() *durationpb.Duration {
+func (x *WorkspaceProfileSetting) GetMaximumRequestExpiration() *durationpb.Duration {
if x != nil {
- return x.MaximumRoleExpiration
+ return x.MaximumRequestExpiration
}
return nil
}
@@ -3446,15 +3446,15 @@ const file_v1_setting_service_proto_rawDesc = "" +
"\x04lark\x18\x05 \x01(\v2\x1e.bytebase.v1.AppIMSetting.LarkH\x00R\x04lark\x12@\n" +
"\bdingtalk\x18\x06 \x01(\v2\".bytebase.v1.AppIMSetting.DingTalkH\x00R\bdingtalk\x127\n" +
"\x05teams\x18\a \x01(\v2\x1f.bytebase.v1.AppIMSetting.TeamsH\x00R\x05teamsB\t\n" +
- "\apayload\"\x82\x0e\n" +
+ "\apayload\"\x88\x0e\n" +
"\x17WorkspaceProfileSetting\x12!\n" +
"\fexternal_url\x18\x01 \x01(\tR\vexternalUrl\x12'\n" +
"\x0fdisallow_signup\x18\x02 \x01(\bR\x0edisallowSignup\x12\x1f\n" +
"\vrequire_mfa\x18\x03 \x01(\bR\n" +
"requireMfa\x12O\n" +
"\x16refresh_token_duration\x18\x04 \x01(\v2\x19.google.protobuf.DurationR\x14refreshTokenDuration\x12=\n" +
- "\fannouncement\x18\x05 \x01(\v2\x19.bytebase.v1.AnnouncementR\fannouncement\x12Q\n" +
- "\x17maximum_role_expiration\x18\x06 \x01(\v2\x19.google.protobuf.DurationR\x15maximumRoleExpiration\x12\x18\n" +
+ "\fannouncement\x18\x05 \x01(\v2\x19.bytebase.v1.AnnouncementR\fannouncement\x12W\n" +
+ "\x1amaximum_request_expiration\x18\x06 \x01(\v2\x19.google.protobuf.DurationR\x18maximumRequestExpiration\x12\x18\n" +
"\adomains\x18\a \x03(\tR\adomains\x126\n" +
"\x17enforce_identity_domain\x18\b \x01(\bR\x15enforceIdentityDomain\x12Q\n" +
"\x14database_change_mode\x18\t \x01(\x0e2\x1f.bytebase.v1.DatabaseChangeModeR\x12databaseChangeMode\x128\n" +
@@ -3734,7 +3734,7 @@ var file_v1_setting_service_proto_depIdxs = []int32{
34, // 13: bytebase.v1.AppIMSetting.settings:type_name -> bytebase.v1.AppIMSetting.IMSetting
53, // 14: bytebase.v1.WorkspaceProfileSetting.refresh_token_duration:type_name -> google.protobuf.Duration
18, // 15: bytebase.v1.WorkspaceProfileSetting.announcement:type_name -> bytebase.v1.Announcement
- 53, // 16: bytebase.v1.WorkspaceProfileSetting.maximum_role_expiration:type_name -> google.protobuf.Duration
+ 53, // 16: bytebase.v1.WorkspaceProfileSetting.maximum_request_expiration:type_name -> google.protobuf.Duration
0, // 17: bytebase.v1.WorkspaceProfileSetting.database_change_mode:type_name -> bytebase.v1.DatabaseChangeMode
53, // 18: bytebase.v1.WorkspaceProfileSetting.inactive_session_timeout:type_name -> google.protobuf.Duration
35, // 19: bytebase.v1.WorkspaceProfileSetting.password_restriction:type_name -> bytebase.v1.WorkspaceProfileSetting.PasswordRestriction
diff --git a/backend/generated-go/v1/setting_service_equal.pb.go b/backend/generated-go/v1/setting_service_equal.pb.go
index ca200347fd..6ca879b765 100644
--- a/backend/generated-go/v1/setting_service_equal.pb.go
+++ b/backend/generated-go/v1/setting_service_equal.pb.go
@@ -343,7 +343,7 @@ func (x *WorkspaceProfileSetting) Equal(y *WorkspaceProfileSetting) bool {
if !x.Announcement.Equal(y.Announcement) {
return false
}
- if p, q := x.MaximumRoleExpiration, y.MaximumRoleExpiration; (p == nil && q != nil) || (p != nil && (q == nil || p.Seconds != q.Seconds || p.Nanos != q.Nanos)) {
+ if p, q := x.MaximumRequestExpiration, y.MaximumRequestExpiration; (p == nil && q != nil) || (p != nil && (q == nil || p.Seconds != q.Seconds || p.Nanos != q.Nanos)) {
return false
}
if len(x.Domains) != len(y.Domains) {
diff --git a/backend/migrator/migration/3.20/0001##rename_maximum_request_expiration.sql b/backend/migrator/migration/3.20/0001##rename_maximum_request_expiration.sql
new file mode 100644
index 0000000000..a36bd33f77
--- /dev/null
+++ b/backend/migrator/migration/3.20/0001##rename_maximum_request_expiration.sql
@@ -0,0 +1,18 @@
+-- Rename the workspace profile `maximumRoleExpiration` JSON key to
+-- `maximumRequestExpiration`, following the proto field rename. The cap now
+-- bounds both role grants and data access requests, so the broader name fits.
+--
+-- Safety:
+-- * Only touches a WORKSPACE_PROFILE row that actually carries the old key,
+-- so it never fabricates a cap on workspaces that never set one.
+-- * Idempotent: the run removes the old key, and the WHERE excludes rows that
+-- no longer have it, so a re-run matches nothing.
+UPDATE setting
+SET value = jsonb_set(
+ value #- '{maximumRoleExpiration}',
+ '{maximumRequestExpiration}',
+ value->'maximumRoleExpiration',
+ true
+)
+WHERE name = 'WORKSPACE_PROFILE'
+ AND value ? 'maximumRoleExpiration';
diff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.go
index a9440b3211..2a681ae6f5 100644
--- a/backend/migrator/migrator_test.go
+++ b/backend/migrator/migrator_test.go
@@ -15,8 +15,8 @@ import (
func TestLatestVersion(t *testing.T) {
files, err := getSortedVersionedFiles()
require.NoError(t, err)
- require.Equal(t, semver.MustParse("3.20.0"), *files[len(files)-1].version)
- require.Equal(t, "migration/3.20/0000##migrate_announcement_level_to_theme.sql", files[len(files)-1].path)
+ require.Equal(t, semver.MustParse("3.20.1"), *files[len(files)-1].version)
+ require.Equal(t, "migration/3.20/0001##rename_maximum_request_expiration.sql", files[len(files)-1].path)
}
func TestVersionUnique(t *testing.T) {
diff --git a/backend/tests/maximum_request_expiration_test.go b/backend/tests/maximum_request_expiration_test.go
new file mode 100644
index 0000000000..c01256c9b5
--- /dev/null
+++ b/backend/tests/maximum_request_expiration_test.go
@@ -0,0 +1,170 @@
+package tests
+
+import (
+ "context"
+ "fmt"
+ "testing"
+ "time"
+
+ "connectrpc.com/connect"
+ "github.com/stretchr/testify/require"
+ "google.golang.org/genproto/googleapis/type/expr"
+ "google.golang.org/protobuf/types/known/durationpb"
+ "google.golang.org/protobuf/types/known/fieldmaskpb"
+ "google.golang.org/protobuf/types/known/timestamppb"
+
+ v1pb "github.com/bytebase/bytebase/backend/generated-go/v1"
+)
+
+// setMaximumRequestExpiration sets the workspace-level maximum request expiration cap.
+// Passing nil clears the cap.
+func (ctl *controller) setMaximumRequestExpiration(ctx context.Context, d *durationpb.Duration) error {
+ _, err := ctl.settingServiceClient.UpdateSetting(ctx, connect.NewRequest(&v1pb.UpdateSettingRequest{
+ AllowMissing: true,
+ Setting: &v1pb.Setting{
+ Name: "settings/" + v1pb.Setting_WORKSPACE_PROFILE.String(),
+ Value: &v1pb.SettingValue{
+ Value: &v1pb.SettingValue_WorkspaceProfile{
+ WorkspaceProfile: &v1pb.WorkspaceProfileSetting{
+ MaximumRequestExpiration: d,
+ },
+ },
+ },
+ },
+ UpdateMask: &fieldmaskpb.FieldMask{
+ Paths: []string{"value.workspace_profile.maximum_request_expiration"},
+ },
+ }))
+ return err
+}
+
+// TestRoleGrantMaximumExpiration verifies that creating a ROLE_GRANT issue is
+// validated server-side against the workspace maximum request expiration cap.
+func TestRoleGrantMaximumExpiration(t *testing.T) {
+ t.Parallel()
+ a := require.New(t)
+ ctx := context.Background()
+ ctl := &controller{}
+
+ ctx, err := ctl.StartServerWithExternalPg(ctx)
+ a.NoError(err)
+ defer ctl.Close(ctx)
+
+ // Cap request expiration to 7 days.
+ a.NoError(ctl.setMaximumRequestExpiration(ctx, durationpb.New(7*24*time.Hour)))
+
+ newRoleGrantIssue := func(condition string) *connect.Request[v1pb.CreateIssueRequest] {
+ return connect.NewRequest(&v1pb.CreateIssueRequest{
+ Parent: ctl.project.Name,
+ Issue: &v1pb.Issue{
+ Title: "Request projectDeveloper role",
+ Type: v1pb.Issue_ROLE_GRANT,
+ RoleGrant: &v1pb.RoleGrant{
+ Role: "roles/projectDeveloper",
+ User: ctl.principalName,
+ Condition: &expr.Expr{Expression: condition},
+ },
+ },
+ })
+ }
+
+ // Within the cap (1 day): allowed.
+ withinCap := fmt.Sprintf(`request.time < timestamp("%s")`, time.Now().Add(24*time.Hour).Format(time.RFC3339))
+ _, err = ctl.issueServiceClient.CreateIssue(ctx, newRoleGrantIssue(withinCap))
+ a.NoError(err, "expiration within the cap should be allowed")
+
+ // Exceeding the cap (30 days): rejected.
+ overCap := fmt.Sprintf(`request.time < timestamp("%s")`, time.Now().Add(30*24*time.Hour).Format(time.RFC3339))
+ _, err = ctl.issueServiceClient.CreateIssue(ctx, newRoleGrantIssue(overCap))
+ a.Error(err, "expiration exceeding the cap should be rejected")
+ a.Equal(connect.CodeInvalidArgument, connect.CodeOf(err))
+
+ // Missing expiration while a cap is configured: rejected (the grant would
+ // otherwise be treated as unbounded, bypassing the cap).
+ _, err = ctl.issueServiceClient.CreateIssue(ctx, newRoleGrantIssue(""))
+ a.Error(err, "missing expiration should be rejected when a cap is configured")
+ a.Equal(connect.CodeInvalidArgument, connect.CodeOf(err))
+
+ // Clearing the cap restores the unbounded behavior.
+ a.NoError(ctl.setMaximumRequestExpiration(ctx, nil))
+ _, err = ctl.issueServiceClient.CreateIssue(ctx, newRoleGrantIssue(overCap))
+ a.NoError(err, "expiration should be unbounded when no cap is configured")
+}
+
+// TestAccessGrantMaximumExpiration verifies that creating an access grant is
+// validated server-side against the workspace maximum request expiration cap.
+func TestAccessGrantMaximumExpiration(t *testing.T) {
+ t.Parallel()
+ a := require.New(t)
+ ctx := context.Background()
+ ctl := &controller{}
+
+ ctx, err := ctl.StartServerWithExternalPg(ctx)
+ a.NoError(err)
+ defer ctl.Close(ctx)
+
+ // Create an instance and database to target.
+ instanceDir := t.TempDir()
+ instanceResp, err := ctl.instanceServiceClient.CreateInstance(ctx, connect.NewRequest(&v1pb.CreateInstanceRequest{
+ InstanceId: generateRandomString("inst"),
+ Instance: &v1pb.Instance{
+ Title: "Test Instance",
+ Engine: v1pb.Engine_SQLITE,
+ Environment: new("environments/prod"),
+ Activation: true,
+ DataSources: []*v1pb.DataSource{{
+ Type: v1pb.DataSourceType_ADMIN,
+ Host: instanceDir,
+ Id: "admin",
+ }},
+ },
+ }))
+ a.NoError(err)
+
+ dbName := generateRandomString("db")
+ a.NoError(ctl.createDatabase(ctx, ctl.project, instanceResp.Msg, nil, dbName, ""))
+ target := fmt.Sprintf("%s/databases/%s", instanceResp.Msg.Name, dbName)
+
+ // Cap role expiration to 7 days.
+ a.NoError(ctl.setMaximumRequestExpiration(ctx, durationpb.New(7*24*time.Hour)))
+
+ newAccessGrant := func(exp any) *connect.Request[v1pb.CreateAccessGrantRequest] {
+ ag := &v1pb.AccessGrant{
+ Creator: ctl.principalName,
+ Targets: []string{target},
+ Query: "SELECT 1",
+ Reason: "testing",
+ }
+ switch e := exp.(type) {
+ case *durationpb.Duration:
+ ag.Expiration = &v1pb.AccessGrant_Ttl{Ttl: e}
+ case *timestamppb.Timestamp:
+ ag.Expiration = &v1pb.AccessGrant_ExpireTime{ExpireTime: e}
+ default:
+ // No expiration set.
+ }
+ return connect.NewRequest(&v1pb.CreateAccessGrantRequest{
+ Parent: ctl.project.Name,
+ AccessGrant: ag,
+ })
+ }
+
+ // ttl within the cap (1 day): allowed.
+ _, err = ctl.accessGrantServiceClient.CreateAccessGrant(ctx, newAccessGrant(durationpb.New(24*time.Hour)))
+ a.NoError(err, "ttl within the cap should be allowed")
+
+ // ttl exceeding the cap (30 days): rejected.
+ _, err = ctl.accessGrantServiceClient.CreateAccessGrant(ctx, newAccessGrant(durationpb.New(30*24*time.Hour)))
+ a.Error(err, "ttl exceeding the cap should be rejected")
+ a.Equal(connect.CodeInvalidArgument, connect.CodeOf(err))
+
+ // expire_time exceeding the cap (30 days): rejected.
+ _, err = ctl.accessGrantServiceClient.CreateAccessGrant(ctx, newAccessGrant(timestamppb.New(time.Now().Add(30*24*time.Hour))))
+ a.Error(err, "expire_time exceeding the cap should be rejected")
+ a.Equal(connect.CodeInvalidArgument, connect.CodeOf(err))
+
+ // Clearing the cap restores the unbounded behavior.
+ a.NoError(ctl.setMaximumRequestExpiration(ctx, nil))
+ _, err = ctl.accessGrantServiceClient.CreateAccessGrant(ctx, newAccessGrant(durationpb.New(30*24*time.Hour)))
+ a.NoError(err, "ttl should be unbounded when no cap is configured")
+}
diff --git a/backend/tests/tests.go b/backend/tests/tests.go
index cb86218ff9..016a061f95 100644
--- a/backend/tests/tests.go
+++ b/backend/tests/tests.go
@@ -117,6 +117,7 @@ type controller struct {
auditLogServiceClient v1connect.AuditLogServiceClient
serviceAccountServiceClient v1connect.ServiceAccountServiceClient
workloadIdentityServiceClient v1connect.WorkloadIdentityServiceClient
+ accessGrantServiceClient v1connect.AccessGrantServiceClient
project *v1pb.Project
@@ -307,6 +308,7 @@ func (ctl *controller) start(ctx context.Context, port int) (context.Context, er
ctl.auditLogServiceClient = v1connect.NewAuditLogServiceClient(ctl.client, baseURL, interceptors)
ctl.serviceAccountServiceClient = v1connect.NewServiceAccountServiceClient(ctl.client, baseURL, interceptors)
ctl.workloadIdentityServiceClient = v1connect.NewWorkloadIdentityServiceClient(ctl.client, baseURL, interceptors)
+ ctl.accessGrantServiceClient = v1connect.NewAccessGrantServiceClient(ctl.client, baseURL, interceptors)
if err := ctl.waitForHealthz(ctx); err != nil {
return nil, errors.Wrap(err, "failed to wait for healthz")
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index 3efc0855bd..92b894c4cc 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -2258,11 +2258,11 @@
"logo": "Logo",
"logo-aspect": "The suggested logo size should be 5:2 aspect ratio, e.g 100 x 40.",
"logo-upload-tip": "{{extension}} up to {{size}} MiB",
- "maximum-role-expiration": {
+ "maximum-request-expiration": {
"days": "Day(s)",
- "description": "Maximum role expiration is the maximum period a role can be granted to a user, will apply on all project roles expect the project owner.",
+ "description": "Maximum request expiration is the maximum period a role grant or data access request can remain valid. It applies to all project roles except the project owner, and to all data access requests.",
"never-expires": "Never expires",
- "self": "Maximum role expiration"
+ "self": "Maximum request expiration"
},
"maximum-sql-result": {
"rows": {
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index f55aa1aa5b..121f680787 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -2258,11 +2258,11 @@
"logo": "Logotipo",
"logo-aspect": "El tamaño sugerido para el logo debería tener una proporción de 5:2, por ejemplo, 100 x 40.",
"logo-upload-tip": "{{extension}} hasta {{size}} MiB",
- "maximum-role-expiration": {
+ "maximum-request-expiration": {
"days": "Días)",
- "description": "La expiración máxima del rol es el período máximo durante el cual se puede otorgar un rol a un usuario y se aplicará a todos los roles del proyecto excepto al propietario del proyecto.",
+ "description": "La caducidad máxima de la solicitud es el período máximo durante el cual una concesión de rol o una solicitud de acceso a datos puede permanecer válida. Se aplica a todos los roles del proyecto excepto al propietario del proyecto, y a todas las solicitudes de acceso a datos.",
"never-expires": "Nunca expira",
- "self": "Caducidad máxima del rol"
+ "self": "Caducidad máxima de la solicitud"
},
"maximum-sql-result": {
"rows": {
diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.json
index 4eb8b99815..0baacb16a0 100644
--- a/frontend/src/locales/ja-JP.json
+++ b/frontend/src/locales/ja-JP.json
@@ -2258,11 +2258,11 @@
"logo": "ロゴ",
"logo-aspect": "推奨されるロゴの幅:高さの比率 (例: 100 x 40 ピクセル)",
"logo-upload-tip": "{{extension}} タイプのファイルをサポートします。{{size}} MiB より大きくすることはできません",
- "maximum-role-expiration": {
+ "maximum-request-expiration": {
"days": "日",
- "description": "最大ロール有効期限は、ロールをユーザーに付与できる最大期間であり、プロジェクト所有者を除くすべてのプロジェクト ロールに適用されます。",
+ "description": "最大リクエスト有効期限は、ロールの付与またはデータアクセスリクエストが有効であり続けられる最大期間です。プロジェクト所有者を除くすべてのプロジェクトロール、およびすべてのデータアクセスリクエストに適用されます。",
"never-expires": "期限切れなし",
- "self": "最大ロール有効期限"
+ "self": "最大リクエスト有効期限"
},
"maximum-sql-result": {
"rows": {
diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.json
index 29cafd4e4b..f3e31aab33 100644
--- a/frontend/src/locales/vi-VN.json
+++ b/frontend/src/locales/vi-VN.json
@@ -2258,11 +2258,11 @@
"logo": "Logo",
"logo-aspect": "Kích thước logo được đề xuất nên theo tỷ lệ 5:2, ví dụ 100 x 40.",
"logo-upload-tip": "{{extension}} tối đa {{size}} MiB",
- "maximum-role-expiration": {
+ "maximum-request-expiration": {
"days": "Ngày",
- "description": "Thời hạn vai trò tối đa là thời hạn tối đa mà một vai trò có thể được cấp cho người dùng, sẽ áp dụng cho tất cả các vai trò trong dự án ngoại trừ chủ sở hữu dự án.",
+ "description": "Thời hạn yêu cầu tối đa là khoảng thời gian tối đa mà việc cấp vai trò hoặc yêu cầu truy cập dữ liệu có thể còn hiệu lực. Nó áp dụng cho tất cả các vai trò trong dự án ngoại trừ chủ sở hữu dự án, và cho tất cả các yêu cầu truy cập dữ liệu.",
"never-expires": "Không bao giờ hết hạn",
- "self": "Thời gian hết hạn vai trò tối đa"
+ "self": "Thời hạn yêu cầu tối đa"
},
"maximum-sql-result": {
"rows": {
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index c3698d3031..fc802568c1 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -2258,11 +2258,11 @@
"logo": "Logo",
"logo-aspect": "Logo 建议为 5:2 的宽:高比例(例如 100 x 40 像素)",
"logo-upload-tip": "支持 {{extension}} 类型文件,不能大于 {{size}} MiB",
- "maximum-role-expiration": {
+ "maximum-request-expiration": {
"days": "天数",
- "description": "角色最大过期时间是可以赋予用户角色时所能设置的最大过期时间,会应用在项目所有者之外的其他项目角色上。",
+ "description": "最大申请有效期是角色授予或数据访问申请可保持有效的最长时间。它适用于除项目所有者之外的所有项目角色,以及所有数据访问申请。",
"never-expires": "永不过期",
- "self": "角色最大过期时间"
+ "self": "最大申请有效期"
},
"maximum-sql-result": {
"rows": {
diff --git a/frontend/src/react/components/sql-editor/AccessGrantRequestDrawer.tsx b/frontend/src/react/components/sql-editor/AccessGrantRequestDrawer.tsx
index d99755488b..6590c7cfa2 100644
--- a/frontend/src/react/components/sql-editor/AccessGrantRequestDrawer.tsx
+++ b/frontend/src/react/components/sql-editor/AccessGrantRequestDrawer.tsx
@@ -1,5 +1,6 @@
import { create } from "@bufbuild/protobuf";
import { DurationSchema, TimestampSchema } from "@bufbuild/protobuf/wkt";
+import dayjs from "dayjs";
import { Loader2 } from "lucide-react";
import { useEffect, useMemo, useRef, useState } from "react";
import { useTranslation } from "react-i18next";
@@ -166,27 +167,111 @@ function AccessGrantRequestDrawerInner({
return { instance, database: db };
}, [targets]);
- const durationOptions = useMemo(
- () => [
- { value: "1", label: t("sql-editor.duration-hour", { hours: 1 }) },
- { value: "4", label: t("sql-editor.duration-hours", { hours: 4 }) },
- { value: "24", label: t("sql-editor.duration-day", { days: 1 }) },
- { value: "168", label: t("sql-editor.duration-days", { days: 7 }) },
+ // Workspace-configured maximum role expiration, in seconds. When set, data
+ // access grants are capped to the same window: preset durations that exceed
+ // it are filtered out and the custom picker is bounded. Kept in seconds (not
+ // floored to days) so sub-day caps configured via the API are honored.
+ // Returns undefined when no cap is configured, leaving the preset UX intact.
+ const workspaceProfile = useAppStore((state) => state.getWorkspaceProfile());
+ const maximumExpirationSeconds = useMemo(() => {
+ const seconds = workspaceProfile.maximumRequestExpiration?.seconds;
+ if (!seconds) return undefined;
+ return Number(seconds);
+ }, [workspaceProfile]);
+ const expirationCapped = maximumExpirationSeconds !== undefined;
+ // Whole-day cap value for the day-worded hint/error copy; undefined for a
+ // sub-day cap, where the bounded picker enforces the limit on its own.
+ const maximumExpirationDays =
+ maximumExpirationSeconds !== undefined &&
+ maximumExpirationSeconds % (60 * 60 * 24) === 0
+ ? maximumExpirationSeconds / (60 * 60 * 24)
+ : undefined;
+
+ const durationOptions = useMemo(() => {
+ const presets = [
+ {
+ hours: 1,
+ label: t("sql-editor.duration-hour", { hours: 1 }),
+ },
+ {
+ hours: 4,
+ label: t("sql-editor.duration-hours", { hours: 4 }),
+ },
+ {
+ hours: 24,
+ label: t("sql-editor.duration-day", { days: 1 }),
+ },
+ {
+ hours: 168,
+ label: t("sql-editor.duration-days", { days: 7 }),
+ },
+ ];
+ return [
+ ...presets
+ .filter(
+ (o) =>
+ maximumExpirationSeconds === undefined ||
+ o.hours * 60 * 60 <= maximumExpirationSeconds
+ )
+ .map(({ hours, label }) => ({ value: `${hours}`, label })),
{ value: "-1", label: t("common.custom") },
- ],
- [t]
- );
+ ];
+ }, [t, maximumExpirationSeconds]);
const today = new Date();
const minDate = `${today.getFullYear()}-${String(today.getMonth() + 1).padStart(2, "0")}-${String(today.getDate()).padStart(2, "0")}T00:00`;
+ // A previously selected preset (e.g. the default 4h) may exceed a newly
+ // applied cap; fall back to the largest still-valid preset, or to the custom
+ // picker when the cap is shorter than every preset.
+ useEffect(() => {
+ if (duration === -1) return;
+ if (durationOptions.some((o) => o.value === String(duration))) return;
+ const presets = durationOptions.filter((o) => o.value !== "-1");
+ setDuration(
+ presets.length > 0 ? Number(presets[presets.length - 1].value) : -1
+ );
+ }, [durationOptions, duration]);
+
+ // Bind the picker's min to the current minute and its max to the configured
+ // cap, matching the request-role drawer.
+ const minDatetime = dayjs().format("YYYY-MM-DDTHH:mm");
+ const maxDatetime =
+ maximumExpirationSeconds === undefined
+ ? undefined
+ : dayjs()
+ .add(maximumExpirationSeconds, "second")
+ .format("YYYY-MM-DDTHH:mm");
+
+ const expirationIsInPast =
+ duration === -1 &&
+ !!customExpireTime &&
+ dayjs(customExpireTime).unix() <= dayjs().unix();
+ const expirationExceedsMax =
+ duration === -1 &&
+ !!customExpireTime &&
+ maximumExpirationSeconds !== undefined &&
+ dayjs(customExpireTime).isAfter(
+ dayjs().add(maximumExpirationSeconds, "second")
+ );
+
const allowSubmit = useMemo(() => {
if (targets.length === 0) return false;
if (!query.trim()) return false;
if (!reason.trim()) return false;
- if (duration === -1 && !customExpireTime) return false;
+ if (duration === -1) {
+ return !!customExpireTime && !expirationIsInPast && !expirationExceedsMax;
+ }
return true;
- }, [targets, query, reason, duration, customExpireTime]);
+ }, [
+ targets,
+ query,
+ reason,
+ duration,
+ customExpireTime,
+ expirationIsInPast,
+ expirationExceedsMax,
+ ]);
const handleSubmit = async () => {
if (isRequesting || !allowSubmit) return;
@@ -338,11 +423,32 @@ function AccessGrantRequestDrawerInner({
/>
{duration === -1 && (
<ExpirationPicker
+ className="w-full"
value={customExpireTime}
onChange={setCustomExpireTime}
- minDate={minDate}
+ minDate={expirationCapped ? minDatetime : minDate}
+ maxDate={maxDatetime}
/>
)}
+ {maximumExpirationDays !== undefined && (
+ <p className="text-xs text-control-light">
+ {t("project.members.request-role.max-expiration-hint", {
+ days: maximumExpirationDays,
+ })}
+ </p>
+ )}
+ {expirationIsInPast && (
+ <p className="text-xs text-error">
+ {t("project.members.request-role.expiration-must-be-future")}
+ </p>
+ )}
+ {expirationExceedsMax && maximumExpirationDays !== undefined && (
+ <p className="text-xs text-error">
+ {t("project.members.request-role.expiration-exceeds-max", {
+ days: maximumExpirationDays,
+ })}
+ </p>
+ )}
</div>
{/* Reason */}
diff --git a/frontend/src/react/components/ui/expiration-picker.tsx b/frontend/src/react/components/ui/expiration-picker.tsx
index 8c93bb9d51..c1fdc72166 100644
--- a/frontend/src/react/components/ui/expiration-picker.tsx
+++ b/frontend/src/react/components/ui/expiration-picker.tsx
@@ -14,11 +14,13 @@ export function ExpirationPicker({
onChange,
minDate,
maxDate,
+ className,
}: {
value: string | undefined;
onChange: (value: string | undefined) => void;
minDate?: string;
maxDate?: string;
+ className?: string;
}) {
const { t } = useTranslation();
@@ -31,6 +33,7 @@ export function ExpirationPicker({
onChange={(date) =>
onChange(date ? dayjs(date).format("YYYY-MM-DDTHH:mm") : undefined)
}
+ className={className}
/>
{value && (
<button
diff --git a/frontend/src/react/pages/settings/MembersPage.tsx b/frontend/src/react/pages/settings/MembersPage.tsx
index 0342627825..98a286ab2d 100644
--- a/frontend/src/react/pages/settings/MembersPage.tsx
+++ b/frontend/src/react/pages/settings/MembersPage.tsx
@@ -893,16 +893,16 @@ function formatExpirationDate(timestampMs?: number): string {
// must be in the future and within the cap.
function isExpirationValid(
form: RoleBindingFormState,
- maximumRoleExpirationDays: number | undefined
+ maximumRequestExpirationDays: number | undefined
): boolean {
if (form.expirationTimestampInMS === undefined) {
- return maximumRoleExpirationDays === undefined;
+ return maximumRequestExpirationDays === undefined;
}
const now = Date.now();
if (form.expirationTimestampInMS <= now) return false;
if (
- maximumRoleExpirationDays !== undefined &&
- form.expirationTimestampInMS > now + maximumRoleExpirationDays * 86400000
+ maximumRequestExpirationDays !== undefined &&
+ form.expirationTimestampInMS > now + maximumRequestExpirationDays * 86400000
) {
return false;
}
@@ -1039,14 +1039,14 @@ function ProjectRoleBindingForm({
onRemove,
canRemove,
projectName,
- maximumRoleExpirationDays,
+ maximumRequestExpirationDays,
}: {
form: RoleBindingFormState;
onChange: (updated: RoleBindingFormState) => void;
onRemove: () => void;
canRemove: boolean;
projectName: string;
- maximumRoleExpirationDays: number | undefined;
+ maximumRequestExpirationDays: number | undefined;
}) {
const { t } = useTranslation();
@@ -1056,16 +1056,16 @@ function ProjectRoleBindingForm({
() =>
EXPIRATION_PRESETS.filter(
(preset) =>
- maximumRoleExpirationDays === undefined ||
- preset.days <= maximumRoleExpirationDays
+ maximumRequestExpirationDays === undefined ||
+ preset.days <= maximumRequestExpirationDays
),
- [maximumRoleExpirationDays]
+ [maximumRequestExpirationDays]
);
const minDatetime = dayjs().format("YYYY-MM-DDTHH:mm");
const maxDatetime =
- maximumRoleExpirationDays !== undefined
+ maximumRequestExpirationDays !== undefined
? dayjs()
- .add(maximumRoleExpirationDays, "days")
+ .add(maximumRequestExpirationDays, "days")
.format("YYYY-MM-DDTHH:mm")
: undefined;
const now = Date.now();
@@ -1075,8 +1075,9 @@ function ProjectRoleBindingForm({
form.expirationTimestampInMS <= now;
const expirationExceedsMax =
form.expirationTimestampInMS !== undefined &&
- maximumRoleExpirationDays !== undefined &&
- form.expirationTimestampInMS > now + maximumRoleExpirationDays * 86400000;
+ maximumRequestExpirationDays !== undefined &&
+ form.expirationTimestampInMS >
+ now + maximumRequestExpirationDays * 86400000;
const factorList = useMemo<Factor[]>(
() => [
CEL_ATTRIBUTE_RESOURCE_DATABASE,
@@ -1153,9 +1154,9 @@ function ProjectRoleBindingForm({
// Seed the picker with the current timestamp, or a default 1 week
// (clamped to the cap) when switching from "Never".
const seedDays =
- maximumRoleExpirationDays !== undefined
- ? Math.min(7, maximumRoleExpirationDays)
- : 7;
+ maximumRequestExpirationDays === undefined
+ ? 7
+ : Math.min(7, maximumRequestExpirationDays);
onChange({
...form,
expirationCustom: true,
@@ -1288,7 +1289,7 @@ function ProjectRoleBindingForm({
</label>
<div className="flex flex-wrap gap-1.5">
{/* "Never" is only offered when the workspace sets no cap. */}
- {maximumRoleExpirationDays === undefined && (
+ {maximumRequestExpirationDays === undefined && (
<ExpirationChip
label={t("project.members.never-expires")}
selected={
@@ -1325,10 +1326,10 @@ function ProjectRoleBindingForm({
maxDate={maxDatetime}
/>
)}
- {maximumRoleExpirationDays !== undefined && (
+ {maximumRequestExpirationDays !== undefined && (
<p className="text-xs text-control-light">
{t("project.members.request-role.max-expiration-hint", {
- days: maximumRoleExpirationDays,
+ days: maximumRequestExpirationDays,
})}
</p>
)}
@@ -1340,7 +1341,7 @@ function ProjectRoleBindingForm({
{expirationExceedsMax && (
<p className="text-xs text-error">
{t("project.members.request-role.expiration-exceeds-max", {
- days: maximumRoleExpirationDays,
+ days: maximumRequestExpirationDays,
})}
</p>
)}
@@ -1452,9 +1453,9 @@ function EditMemberRoleDrawer({
// grants are exempt; returns undefined when no cap is set. Mirrors
// RequestRoleSheet so direct grants and role requests behave the same.
const workspaceProfile = useAppStore((s) => s.getWorkspaceProfile());
- const maximumRoleExpirationDays = useMemo(() => {
+ const maximumRequestExpirationDays = useMemo(() => {
if (form.role === PresetRoleType.PROJECT_OWNER) return undefined;
- const seconds = workspaceProfile.maximumRoleExpiration?.seconds;
+ const seconds = workspaceProfile.maximumRequestExpiration?.seconds;
if (!seconds) return undefined;
return Math.floor(Number(seconds) / (60 * 60 * 24));
}, [workspaceProfile, form.role]);
@@ -1768,7 +1769,7 @@ function EditMemberRoleDrawer({
const allowConfirm = isProjectCreateMode
? selectedBindings.length > 0 &&
!!form.role &&
- isExpirationValid(form, maximumRoleExpirationDays) &&
+ isExpirationValid(form, maximumRequestExpirationDays) &&
!(
roleHasDatabaseLimitation(form.role) &&
form.databaseMode === "SELECT" &&
@@ -1996,7 +1997,7 @@ function EditMemberRoleDrawer({
onRemove={() => {}}
canRemove={false}
projectName={projectName}
- maximumRoleExpirationDays={maximumRoleExpirationDays}
+ maximumRequestExpirationDays={maximumRequestExpirationDays}
/>
</div>
) : (
diff --git a/frontend/src/react/pages/settings/RequestRoleSheet.test.tsx b/frontend/src/react/pages/settings/RequestRoleSheet.test.tsx
index 0b042d6bb6..ab120db02e 100644
--- a/frontend/src/react/pages/settings/RequestRoleSheet.test.tsx
+++ b/frontend/src/react/pages/settings/RequestRoleSheet.test.tsx
@@ -230,7 +230,7 @@ vi.mock("@/react/stores/app", () => ({
: [],
}),
// Migrated off the Pinia useSettingV1Store mock.
- getWorkspaceProfile: () => ({ maximumRoleExpiration: undefined }),
+ getWorkspaceProfile: () => ({ maximumRequestExpiration: undefined }),
}),
}));
diff --git a/frontend/src/react/pages/settings/RequestRoleSheet.tsx b/frontend/src/react/pages/settings/RequestRoleSheet.tsx
index 4df2cfce0b..f6c1b16207 100644
--- a/frontend/src/react/pages/settings/RequestRoleSheet.tsx
+++ b/frontend/src/react/pages/settings/RequestRoleSheet.tsx
@@ -222,9 +222,9 @@ function RequestRoleForm({
// owners can request unbounded expirations), otherwise the workspace cap
// applies. Returns undefined when no cap is set.
const workspaceProfile = useAppStore((state) => state.getWorkspaceProfile());
- const maximumRoleExpirationDays = useMemo(() => {
+ const maximumRequestExpirationDays = useMemo(() => {
if (role === PresetRoleType.PROJECT_OWNER) return undefined;
- const seconds = workspaceProfile.maximumRoleExpiration?.seconds;
+ const seconds = workspaceProfile.maximumRequestExpiration?.seconds;
if (!seconds) return undefined;
return Math.floor(Number(seconds) / (60 * 60 * 24));
}, [workspaceProfile, role]);
@@ -265,8 +265,10 @@ function RequestRoleForm({
// can't silently pick a time earlier today and submit a zero-duration
// role grant.
const minDatetime = dayjs().format("YYYY-MM-DDTHH:mm");
- const maxDatetime = maximumRoleExpirationDays
- ? dayjs().add(maximumRoleExpirationDays, "days").format("YYYY-MM-DDTHH:mm")
+ const maxDatetime = maximumRequestExpirationDays
+ ? dayjs()
+ .add(maximumRequestExpirationDays, "days")
+ .format("YYYY-MM-DDTHH:mm")
: undefined;
const expirationIsInPast =
@@ -278,9 +280,9 @@ function RequestRoleForm({
// disables over-cap dates in its picker).
const expirationExceedsMax =
!!expirationTimestamp &&
- !!maximumRoleExpirationDays &&
+ !!maximumRequestExpirationDays &&
dayjs(expirationTimestamp).isAfter(
- dayjs().add(maximumRoleExpirationDays, "days")
+ dayjs().add(maximumRequestExpirationDays, "days")
);
const labelsMisconfigured =
@@ -307,7 +309,7 @@ function RequestRoleForm({
// pick an expiration — leaving it empty sends `roleGrant.expiration` as
// `undefined`, which the backend's approval runner treats as effectively
// unbounded (math.MaxInt32 days), bypassing the cap entirely.
- const expirationRequired = maximumRoleExpirationDays !== undefined;
+ const expirationRequired = maximumRequestExpirationDays !== undefined;
const canSubmit =
!submitting &&
@@ -608,10 +610,10 @@ function RequestRoleForm({
minDate={minDatetime}
maxDate={maxDatetime}
/>
- {maximumRoleExpirationDays !== undefined && (
+ {maximumRequestExpirationDays !== undefined && (
<p className="text-xs text-control-light">
{t("project.members.request-role.max-expiration-hint", {
- days: maximumRoleExpirationDays,
+ days: maximumRequestExpirationDays,
})}
</p>
)}
@@ -623,7 +625,7 @@ function RequestRoleForm({
{expirationExceedsMax && (
<p className="text-xs text-error">
{t("project.members.request-role.expiration-exceeds-max", {
- days: maximumRoleExpirationDays,
+ days: maximumRequestExpirationDays,
})}
</p>
)}
diff --git a/frontend/src/react/pages/settings/general/SecuritySection.tsx b/frontend/src/react/pages/settings/general/SecuritySection.tsx
index fbff4993dc..58da05fa87 100644
--- a/frontend/src/react/pages/settings/general/SecuritySection.tsx
+++ b/frontend/src/react/pages/settings/general/SecuritySection.tsx
@@ -58,8 +58,8 @@ export const SecuritySection = forwardRef<SectionHandle, SecuritySectionProps>(
// Maximum role expiration
let inputValue = DEFAULT_EXPIRATION_DAYS;
let neverExpire = true;
- const seconds = profile.maximumRoleExpiration?.seconds
- ? Number(profile.maximumRoleExpiration.seconds)
+ const seconds = profile.maximumRequestExpiration?.seconds
+ ? Number(profile.maximumRequestExpiration.seconds)
: undefined;
if (seconds && seconds > 0) {
inputValue =
@@ -126,13 +126,13 @@ export const SecuritySection = forwardRef<SectionHandle, SecuritySectionProps>(
}
await useAppStore.getState().updateWorkspaceProfile({
payload: {
- maximumRoleExpiration: create(DurationSchema, {
+ maximumRequestExpiration: create(DurationSchema, {
seconds: BigInt(seconds),
nanos: 0,
}),
},
updateMask: create(FieldMaskSchema, {
- paths: ["value.workspace_profile.maximum_role_expiration"],
+ paths: ["value.workspace_profile.maximum_request_expiration"],
}),
});
}
@@ -245,12 +245,14 @@ export const SecuritySection = forwardRef<SectionHandle, SecuritySectionProps>(
<div>
<p className="text-base font-semibold flex flex-row justify-start items-center">
<span className="mr-2">
- {t("settings.general.workspace.maximum-role-expiration.self")}
+ {t(
+ "settings.general.workspace.maximum-request-expiration.self"
+ )}
</span>
</p>
<p className="text-sm text-gray-400 mt-1">
{t(
- "settings.general.workspace.maximum-role-expiration.description"
+ "settings.general.workspace.maximum-request-expiration.description"
)}
</p>
<div className="mt-3 w-full flex flex-row">
@@ -275,7 +277,7 @@ export const SecuritySection = forwardRef<SectionHandle, SecuritySectionProps>(
/>
<span className="absolute right-3 top-1/2 -translate-y-1/2 text-sm text-gray-500 pointer-events-none">
{t(
- "settings.general.workspace.maximum-role-expiration.days"
+ "settings.general.workspace.maximum-request-expiration.days"
)}
</span>
</div>
@@ -292,7 +294,7 @@ export const SecuritySection = forwardRef<SectionHandle, SecuritySectionProps>(
/>
<span>
{t(
- "settings.general.workspace.maximum-role-expiration.never-expires"
+ "settings.general.workspace.maximum-request-expiration.never-expires"
)}
</span>
</label>
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.ts
index 415f56927c..89f329881c 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
@@ -525,11 +525,11 @@ export declare type WorkspaceProfileSetting = Message<"bytebase.v1.WorkspaceProf
announcement?: Announcement | undefined;
/**
- * The max duration for role expired.
+ * The max expiration duration for role grants and data access requests.
*
- * @generated from field: google.protobuf.Duration maximum_role_expiration = 6;
+ * @generated from field: google.protobuf.Duration maximum_request_expiration = 6;
*/
- maximumRoleExpiration?: Duration | undefined;
+ maximumRequestExpiration?: Duration | undefined;
/**
* The workspace domain, e.g., bytebase.com.
diff --git a/frontend/src/types/proto-es/v1/setting_service_pb.js b/frontend/src/types/proto-es/v1/setting_service_pb.js
index 43b152a104..a157965958 100644
--- a/frontend/src/types/proto-es/v1/setting_service_pb.js
+++ b/frontend/src/types/proto-es/v1/setting_service_pb.js
@@ -17,7 +17,7 @@ import { file_v1_issue_service } from "./issue_service_pb";
* Describes the file v1/setting_service.proto.
*/
export const file_v1_setting_service = /*@__PURE__*/
- fileDesc("Chh2MS9zZXR0aW5nX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIhUKE0xpc3RTZXR0aW5nc1JlcXVlc3QiPgoUTGlzdFNldHRpbmdzUmVzcG9uc2USJgoIc2V0dGluZ3MYASADKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nIj8KEUdldFNldHRpbmdSZXF1ZXN0EioKBG5hbWUYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1NldHRpbmciOwoSR2V0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PiuowD2JiLnNldHRpbmdzLnNldJDqMAGC0+STAjI6ASoiLS92MS97cGFyZW50PXdvcmtzcGFjZXMvKn0vc2V0dGluZ3MvRU1BSUw6dGVzdEKpAQoPY29tLmJ5dGViYXNlLnYxQhNTZXR0aW5nU2VydmljZVByb3RvUAFaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_field_mask, file_google_type_expr, file_v1_annotation, file_v1_common, file_v1_issue_service]);
+ fileDesc("Chh2MS9zZXR0aW5nX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIhUKE0xpc3RTZXR0aW5nc1JlcXVlc3QiPgoUTGlzdFNldHRpbmdzUmVzcG9uc2USJgoIc2V0dGluZ3MYASADKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nIj8KEUdldFNldHRpbmdSZXF1ZXN0EioKBG5hbWUYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1NldHRpbmciOwoSR2V0U2V0dGluZ1Jlc3BvbnNlEiUKB3NldHRpbmcYASABKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nIqEBChRVcGRhdGVTZXR0aW5nUmVxdWVzdBIqCgdzZXR0aW5nGAEgASgLMhQuYnl0ZWJhc2UudjEuU2V0dGluZ0ID4EECEhUKDXZhbGlkYXRlX29ubHkYAiABKAgSFQoNYWxsb3dfbWlzc2luZxgDIAEoCBIvCgt1cGRhdGVfbWFzaxgEIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2sitAIKB1NldHRpbmcSEQoEbmFtZRgBIAEoCUID4EEIEi0K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ZTo6VjFiBnByb3RvMw", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_field_mask, file_google_type_expr, file_v1_annotation, file_v1_common, file_v1_issue_service]);
/**
* Describes the message bytebase.v1.ListSettingsRequest.
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index d4c7a59e9f..7b45e97caf 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -28986,9 +28986,9 @@ components:
title: announcement
description: The setting of custom announcement
$ref: '#/components/schemas/bytebase.v1.Announcement'
- maximumRoleExpiration:
- title: maximum_role_expiration
- description: The max duration for role expired.
+ maximumRequestExpiration:
+ title: maximum_request_expiration
+ description: The max expiration duration for role grants and data access requests.
$ref: '#/components/schemas/google.protobuf.Duration'
domains:
type: array
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index 33406f594c..88fe4650fb 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -4633,7 +4633,7 @@ All other settings live in per-workspace WORKSPACE_PROFILE.
| require_2fa | [bool](#bool) | | Require 2FA for all users. |
| refresh_token_duration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for refresh token. Default is 7 days. |
| announcement | [WorkspaceProfileSetting.Announcement](#bytebase-store-WorkspaceProfileSetting-Announcement) | | The setting of custom announcement |
-| maximum_role_expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The max duration for role expired. |
+| maximum_request_expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The max expiration duration for role grants and data access requests. |
| domains | [string](#string) | repeated | The workspace domain, e.g., bytebase.com. |
| enforce_identity_domain | [bool](#bool) | | Only user and group from the domains can be created and login. |
| database_change_mode | [WorkspaceProfileSetting.DatabaseChangeMode](#bytebase-store-WorkspaceProfileSetting-DatabaseChangeMode) | | The workspace database change mode. |
diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.html
index 04b5010dea..eec875423d 100644
--- a/proto/gen/grpc-doc/store/index.html
+++ b/proto/gen/grpc-doc/store/index.html
@@ -12663,10 +12663,10 @@ are /[a-z][0-9]-/. </p></td>
</tr>
<tr>
- <td>maximum_role_expiration</td>
+ <td>maximum_request_expiration</td>
<td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
<td></td>
- <td><p>The max duration for role expired. </p></td>
+ <td><p>The max expiration duration for role grants and data access requests. </p></td>
</tr>
<tr>
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 88f263deaa..8f88367294 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -6678,7 +6678,7 @@ For examples: resource.environment_id == &#34;prod&#34; &amp;&amp; statement.aff
| require_mfa | [bool](#bool) | | Require MFA for all users. |
| refresh_token_duration | [google.protobuf.Duration](#google-protobuf-Duration) | | The duration for refresh token. Default is 7 days. |
| announcement | [Announcement](#bytebase-v1-Announcement) | | The setting of custom announcement |
-| maximum_role_expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The max duration for role expired. |
+| maximum_request_expiration | [google.protobuf.Duration](#google-protobuf-Duration) | | The max expiration duration for role grants and data access requests. |
| domains | [string](#string) | repeated | The workspace domain, e.g., bytebase.com. |
| enforce_identity_domain | [bool](#bool) | | Only user and group from the domains can be created and login. |
| database_change_mode | [DatabaseChangeMode](#bytebase-v1-DatabaseChangeMode) | | The workspace database change mode. |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index 92650860a4..e306396303 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -19332,10 +19332,10 @@ resource.table_name.matches(&#34;sensitive_.*&#34;) &amp;&amp; resource.db_engin
</tr>
<tr>
- <td>maximum_role_expiration</td>
+ <td>maximum_request_expiration</td>
<td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
<td></td>
- <td><p>The max duration for role expired. </p></td>
+ <td><p>The max expiration duration for role grants and data access requests. </p></td>
</tr>
<tr>
diff --git a/proto/store/store/setting.proto b/proto/store/store/setting.proto
index 51d231ed4c..412a400823 100644
--- a/proto/store/store/setting.proto
+++ b/proto/store/store/setting.proto
@@ -79,8 +79,8 @@ message WorkspaceProfileSetting {
// The setting of custom announcement
Announcement announcement = 5;
- // The max duration for role expired.
- google.protobuf.Duration maximum_role_expiration = 6;
+ // The max expiration duration for role grants and data access requests.
+ google.protobuf.Duration maximum_request_expiration = 6;
// The workspace domain, e.g., bytebase.com.
repeated string domains = 7;
diff --git a/proto/v1/v1/setting_service.proto b/proto/v1/v1/setting_service.proto
index 518448015c..8342eae056 100644
--- a/proto/v1/v1/setting_service.proto
+++ b/proto/v1/v1/setting_service.proto
@@ -198,8 +198,8 @@ message WorkspaceProfileSetting {
// The setting of custom announcement
Announcement announcement = 5;
- // The max duration for role expired.
- google.protobuf.Duration maximum_role_expiration = 6;
+ // The max expiration duration for role grants and data access requests.
+ google.protobuf.Duration maximum_request_expiration = 6;
// The workspace domain, e.g., bytebase.com.
repeated string domains = 7;