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: inactive session timeout (#17802)
ecmadao5afc52b7f243
diff --git a/backend/api/auth/auth.go b/backend/api/auth/auth.goindex fa9c0f5bf3..a92eda7f44 100644--- a/backend/api/auth/auth.go+++ b/backend/api/auth/auth.go@@ -6,6 +6,7 @@ import ("errors""fmt""net/http"+ "slices""strconv""strings""time"@@ -254,12 +255,7 @@ func GetTokenFromHeaders(headers http.Header) (string, error) {}func audienceContains(audience jwt.ClaimStrings, token string) bool {- for _, v := range audience {- if v == token {- return true- }- }- return false+ return slices.Contains(audience, token)}type claimsMessage struct {diff --git a/backend/api/v1/setting_service.go b/backend/api/v1/setting_service.goindex 61e949ef8c..f0b24cbae1 100644--- a/backend/api/v1/setting_service.go+++ b/backend/api/v1/setting_service.go@@ -213,6 +213,11 @@ func (s *SettingService) UpdateSetting(ctx context.Context, request *connect.Reqreturn nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("refresh token duration should be at least one hour"))}oldSetting.TokenDuration = payload.TokenDuration+ case "value.workspace_profile_setting_value.inactive_session_timeout":+ if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_SIGN_IN_FREQUENCY_CONTROL); err != nil {+ return nil, connect.NewError(connect.CodePermissionDenied, err)+ }+ oldSetting.InactiveSessionTimeout = payload.InactiveSessionTimeoutcase "value.workspace_profile_setting_value.announcement":if err := s.licenseService.IsFeatureEnabled(v1pb.PlanFeature_FEATURE_DASHBOARD_ANNOUNCEMENT); err != nil {return nil, connect.NewError(connect.CodePermissionDenied, err)diff --git a/backend/api/v1/setting_service_converter.go b/backend/api/v1/setting_service_converter.goindex da7335253a..9faeea8149 100644--- a/backend/api/v1/setting_service_converter.go+++ b/backend/api/v1/setting_service_converter.go@@ -432,6 +432,7 @@ func convertWorkspaceProfileSetting(v1Setting *v1pb.WorkspaceProfileSetting) *stDisallowSignup: v1Setting.DisallowSignup,Require_2Fa: v1Setting.Require_2Fa,TokenDuration: v1Setting.TokenDuration,+ InactiveSessionTimeout: v1Setting.InactiveSessionTimeout,MaximumRoleExpiration: v1Setting.MaximumRoleExpiration,Domains: v1Setting.Domains,EnforceIdentityDomain: v1Setting.EnforceIdentityDomain,@@ -473,6 +474,7 @@ func convertToWorkspaceProfileSetting(storeSetting *storepb.WorkspaceProfileSettDisallowSignup: storeSetting.DisallowSignup,Require_2Fa: storeSetting.Require_2Fa,TokenDuration: storeSetting.TokenDuration,+ InactiveSessionTimeout: storeSetting.InactiveSessionTimeout,MaximumRoleExpiration: storeSetting.MaximumRoleExpiration,Domains: storeSetting.Domains,EnforceIdentityDomain: storeSetting.EnforceIdentityDomain,diff --git a/backend/generated-go/store/setting.pb.go b/backend/generated-go/store/setting.pb.goindex 506ceb5a01..ad90e5d499 100644--- a/backend/generated-go/store/setting.pb.go+++ b/backend/generated-go/store/setting.pb.go@@ -347,6 +347,8 @@ type WorkspaceProfileSetting struct {DisallowPasswordSignin bool `protobuf:"varint,12,opt,name=disallow_password_signin,json=disallowPasswordSignin,proto3" json:"disallow_password_signin,omitempty"`// Whether to enable metric collection for the workspace.EnableMetricCollection bool `protobuf:"varint,13,opt,name=enable_metric_collection,json=enableMetricCollection,proto3" json:"enable_metric_collection,omitempty"`+ // The session expiration time if not activity detected for the user. Value <= 0 means no limit.+ InactiveSessionTimeout *durationpb.Duration `protobuf:"bytes,14,opt,name=inactive_session_timeout,json=inactiveSessionTimeout,proto3" json:"inactive_session_timeout,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}@@ -458,6 +460,13 @@ func (x *WorkspaceProfileSetting) GetEnableMetricCollection() bool {return false}+func (x *WorkspaceProfileSetting) GetInactiveSessionTimeout() *durationpb.Duration {+ if x != nil {+ return x.InactiveSessionTimeout+ }+ return nil+}+type Announcement struct {state protoimpl.MessageState `protogen:"open.v1"`// The alert level of the announcement.@@ -2384,7 +2393,7 @@ var File_store_setting_proto protoreflect.FileDescriptorconst file_store_setting_proto_rawDesc = "" +"\n" +- "\x13store/setting.proto\x12\x0ebytebase.store\x1a\x1egoogle/protobuf/duration.proto\x1a\x16google/type/expr.proto\x1a\x14store/approval.proto\x1a\x12store/common.proto\x1a\x14store/database.proto\"\xf9\x04\n" ++ "\x13store/setting.proto\x12\x0ebytebase.store\x1a\x1egoogle/protobuf/duration.proto\x1a\x16google/type/expr.proto\x1a\x14store/approval.proto\x1a\x12store/common.proto\x1a\x14store/database.proto\"\xce\x05\n" +"\x17WorkspaceProfileSetting\x12!\n" +"\fexternal_url\x18\x01 \x01(\tR\vexternalUrl\x12'\n" +"\x0fdisallow_signup\x18\x02 \x01(\bR\x0edisallowSignup\x12\x1f\n" +@@ -2398,7 +2407,8 @@ const file_store_setting_proto_rawDesc = "" +" \x01(\bR\x15enforceIdentityDomain\x12T\n" +"\x14database_change_mode\x18\v \x01(\x0e2\".bytebase.store.DatabaseChangeModeR\x12databaseChangeMode\x128\n" +"\x18disallow_password_signin\x18\f \x01(\bR\x16disallowPasswordSignin\x128\n" +- "\x18enable_metric_collection\x18\r \x01(\bR\x16enableMetricCollection\"\xe9\x01\n" ++ "\x18enable_metric_collection\x18\r \x01(\bR\x16enableMetricCollection\x12S\n" ++ "\x18inactive_session_timeout\x18\x0e \x01(\v2\x19.google.protobuf.DurationR\x16inactiveSessionTimeout\"\xe9\x01\n" +"\fAnnouncement\x12=\n" +"\x05level\x18\x01 \x01(\x0e2'.bytebase.store.Announcement.AlertLevelR\x05level\x12\x12\n" +"\x04text\x18\x02 \x01(\tR\x04text\x12\x12\n" +@@ -2651,46 +2661,47 @@ var file_store_setting_proto_depIdxs = []int32{6, // 1: bytebase.store.WorkspaceProfileSetting.announcement:type_name -> bytebase.store.Announcement38, // 2: bytebase.store.WorkspaceProfileSetting.maximum_role_expiration:type_name -> google.protobuf.Duration1, // 3: bytebase.store.WorkspaceProfileSetting.database_change_mode:type_name -> bytebase.store.DatabaseChangeMode- 2, // 4: bytebase.store.Announcement.level:type_name -> bytebase.store.Announcement.AlertLevel- 17, // 5: bytebase.store.WorkspaceApprovalSetting.rules:type_name -> bytebase.store.WorkspaceApprovalSetting.Rule- 18, // 6: bytebase.store.SchemaTemplateSetting.field_templates:type_name -> bytebase.store.SchemaTemplateSetting.FieldTemplate- 19, // 7: bytebase.store.SchemaTemplateSetting.column_types:type_name -> bytebase.store.SchemaTemplateSetting.ColumnType- 20, // 8: bytebase.store.SchemaTemplateSetting.table_templates:type_name -> bytebase.store.SchemaTemplateSetting.TableTemplate- 21, // 9: bytebase.store.DataClassificationSetting.configs:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig- 25, // 10: bytebase.store.SemanticTypeSetting.types:type_name -> bytebase.store.SemanticTypeSetting.SemanticType- 26, // 11: bytebase.store.Algorithm.full_mask:type_name -> bytebase.store.Algorithm.FullMask- 27, // 12: bytebase.store.Algorithm.range_mask:type_name -> bytebase.store.Algorithm.RangeMask- 28, // 13: bytebase.store.Algorithm.md5_mask:type_name -> bytebase.store.Algorithm.MD5Mask- 29, // 14: bytebase.store.Algorithm.inner_outer_mask:type_name -> bytebase.store.Algorithm.InnerOuterMask- 31, // 15: bytebase.store.AppIMSetting.slack:type_name -> bytebase.store.AppIMSetting.Slack- 32, // 16: bytebase.store.AppIMSetting.feishu:type_name -> bytebase.store.AppIMSetting.Feishu- 33, // 17: bytebase.store.AppIMSetting.wecom:type_name -> bytebase.store.AppIMSetting.Wecom- 34, // 18: bytebase.store.AppIMSetting.lark:type_name -> bytebase.store.AppIMSetting.Lark- 35, // 19: bytebase.store.AppIMSetting.dingtalk:type_name -> bytebase.store.AppIMSetting.DingTalk- 38, // 20: bytebase.store.PasswordRestrictionSetting.password_rotation:type_name -> google.protobuf.Duration- 4, // 21: bytebase.store.AISetting.provider:type_name -> bytebase.store.AISetting.Provider- 36, // 22: bytebase.store.EnvironmentSetting.environments:type_name -> bytebase.store.EnvironmentSetting.Environment- 39, // 23: bytebase.store.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.store.ApprovalTemplate- 40, // 24: bytebase.store.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr- 41, // 25: bytebase.store.SchemaTemplateSetting.FieldTemplate.engine:type_name -> bytebase.store.Engine- 42, // 26: bytebase.store.SchemaTemplateSetting.FieldTemplate.column:type_name -> bytebase.store.ColumnMetadata- 43, // 27: bytebase.store.SchemaTemplateSetting.FieldTemplate.catalog:type_name -> bytebase.store.ColumnCatalog- 41, // 28: bytebase.store.SchemaTemplateSetting.ColumnType.engine:type_name -> bytebase.store.Engine- 41, // 29: bytebase.store.SchemaTemplateSetting.TableTemplate.engine:type_name -> bytebase.store.Engine- 44, // 30: bytebase.store.SchemaTemplateSetting.TableTemplate.table:type_name -> bytebase.store.TableMetadata- 45, // 31: bytebase.store.SchemaTemplateSetting.TableTemplate.catalog:type_name -> bytebase.store.TableCatalog- 22, // 32: bytebase.store.DataClassificationSetting.DataClassificationConfig.levels:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.Level- 24, // 33: bytebase.store.DataClassificationSetting.DataClassificationConfig.classification:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry- 23, // 34: bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry.value:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.DataClassification- 11, // 35: bytebase.store.SemanticTypeSetting.SemanticType.algorithm:type_name -> bytebase.store.Algorithm- 30, // 36: bytebase.store.Algorithm.RangeMask.slices:type_name -> bytebase.store.Algorithm.RangeMask.Slice- 3, // 37: bytebase.store.Algorithm.InnerOuterMask.type:type_name -> bytebase.store.Algorithm.InnerOuterMask.MaskType- 37, // 38: bytebase.store.EnvironmentSetting.Environment.tags:type_name -> bytebase.store.EnvironmentSetting.Environment.TagsEntry- 39, // [39:39] is the sub-list for method output_type- 39, // [39:39] is the sub-list for method input_type- 39, // [39:39] is the sub-list for extension type_name- 39, // [39:39] is the sub-list for extension extendee- 0, // [0:39] is the sub-list for field type_name+ 38, // 4: bytebase.store.WorkspaceProfileSetting.inactive_session_timeout:type_name -> google.protobuf.Duration+ 2, // 5: bytebase.store.Announcement.level:type_name -> bytebase.store.Announcement.AlertLevel+ 17, // 6: bytebase.store.WorkspaceApprovalSetting.rules:type_name -> bytebase.store.WorkspaceApprovalSetting.Rule+ 18, // 7: bytebase.store.SchemaTemplateSetting.field_templates:type_name -> bytebase.store.SchemaTemplateSetting.FieldTemplate+ 19, // 8: bytebase.store.SchemaTemplateSetting.column_types:type_name -> bytebase.store.SchemaTemplateSetting.ColumnType+ 20, // 9: bytebase.store.SchemaTemplateSetting.table_templates:type_name -> bytebase.store.SchemaTemplateSetting.TableTemplate+ 21, // 10: bytebase.store.DataClassificationSetting.configs:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig+ 25, // 11: bytebase.store.SemanticTypeSetting.types:type_name -> bytebase.store.SemanticTypeSetting.SemanticType+ 26, // 12: bytebase.store.Algorithm.full_mask:type_name -> bytebase.store.Algorithm.FullMask+ 27, // 13: bytebase.store.Algorithm.range_mask:type_name -> bytebase.store.Algorithm.RangeMask+ 28, // 14: bytebase.store.Algorithm.md5_mask:type_name -> bytebase.store.Algorithm.MD5Mask+ 29, // 15: bytebase.store.Algorithm.inner_outer_mask:type_name -> bytebase.store.Algorithm.InnerOuterMask+ 31, // 16: bytebase.store.AppIMSetting.slack:type_name -> bytebase.store.AppIMSetting.Slack+ 32, // 17: bytebase.store.AppIMSetting.feishu:type_name -> bytebase.store.AppIMSetting.Feishu+ 33, // 18: bytebase.store.AppIMSetting.wecom:type_name -> bytebase.store.AppIMSetting.Wecom+ 34, // 19: bytebase.store.AppIMSetting.lark:type_name -> bytebase.store.AppIMSetting.Lark+ 35, // 20: bytebase.store.AppIMSetting.dingtalk:type_name -> bytebase.store.AppIMSetting.DingTalk+ 38, // 21: bytebase.store.PasswordRestrictionSetting.password_rotation:type_name -> google.protobuf.Duration+ 4, // 22: bytebase.store.AISetting.provider:type_name -> bytebase.store.AISetting.Provider+ 36, // 23: bytebase.store.EnvironmentSetting.environments:type_name -> bytebase.store.EnvironmentSetting.Environment+ 39, // 24: bytebase.store.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.store.ApprovalTemplate+ 40, // 25: bytebase.store.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr+ 41, // 26: bytebase.store.SchemaTemplateSetting.FieldTemplate.engine:type_name -> bytebase.store.Engine+ 42, // 27: bytebase.store.SchemaTemplateSetting.FieldTemplate.column:type_name -> bytebase.store.ColumnMetadata+ 43, // 28: bytebase.store.SchemaTemplateSetting.FieldTemplate.catalog:type_name -> bytebase.store.ColumnCatalog+ 41, // 29: bytebase.store.SchemaTemplateSetting.ColumnType.engine:type_name -> bytebase.store.Engine+ 41, // 30: bytebase.store.SchemaTemplateSetting.TableTemplate.engine:type_name -> bytebase.store.Engine+ 44, // 31: bytebase.store.SchemaTemplateSetting.TableTemplate.table:type_name -> bytebase.store.TableMetadata+ 45, // 32: bytebase.store.SchemaTemplateSetting.TableTemplate.catalog:type_name -> bytebase.store.TableCatalog+ 22, // 33: bytebase.store.DataClassificationSetting.DataClassificationConfig.levels:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.Level+ 24, // 34: bytebase.store.DataClassificationSetting.DataClassificationConfig.classification:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry+ 23, // 35: bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry.value:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.DataClassification+ 11, // 36: bytebase.store.SemanticTypeSetting.SemanticType.algorithm:type_name -> bytebase.store.Algorithm+ 30, // 37: bytebase.store.Algorithm.RangeMask.slices:type_name -> bytebase.store.Algorithm.RangeMask.Slice+ 3, // 38: bytebase.store.Algorithm.InnerOuterMask.type:type_name -> bytebase.store.Algorithm.InnerOuterMask.MaskType+ 37, // 39: bytebase.store.EnvironmentSetting.Environment.tags:type_name -> bytebase.store.EnvironmentSetting.Environment.TagsEntry+ 40, // [40:40] is the sub-list for method output_type+ 40, // [40:40] is the sub-list for method input_type+ 40, // [40:40] is the sub-list for extension type_name+ 40, // [40:40] is the sub-list for extension extendee+ 0, // [0:40] is the sub-list for field type_name}func init() { file_store_setting_proto_init() }diff --git a/backend/generated-go/store/setting_equal.pb.go b/backend/generated-go/store/setting_equal.pb.goindex c5d1dd260a..4b2984b8db 100644--- a/backend/generated-go/store/setting_equal.pb.go+++ b/backend/generated-go/store/setting_equal.pb.go@@ -53,6 +53,9 @@ func (x *WorkspaceProfileSetting) Equal(y *WorkspaceProfileSetting) bool {if x.EnableMetricCollection != y.EnableMetricCollection {return false}+ if p, q := x.InactiveSessionTimeout, y.InactiveSessionTimeout; (p == nil && q != nil) || (p != nil && (q == nil || p.Seconds != q.Seconds || p.Nanos != q.Nanos)) {+ return false+ }return true}diff --git a/backend/generated-go/v1/setting_service.pb.go b/backend/generated-go/v1/setting_service.pb.goindex 6c796cc4f6..523a98c7f1 100644--- a/backend/generated-go/v1/setting_service.pb.go+++ b/backend/generated-go/v1/setting_service.pb.go@@ -958,6 +958,8 @@ type WorkspaceProfileSetting struct {DisallowPasswordSignin bool `protobuf:"varint,12,opt,name=disallow_password_signin,json=disallowPasswordSignin,proto3" json:"disallow_password_signin,omitempty"`// Whether to enable metric collection for the workspace.EnableMetricCollection bool `protobuf:"varint,13,opt,name=enable_metric_collection,json=enableMetricCollection,proto3" json:"enable_metric_collection,omitempty"`+ // The session expiration time if not activity detected for the user. Value <= 0 means no limit.+ InactiveSessionTimeout *durationpb.Duration `protobuf:"bytes,14,opt,name=inactive_session_timeout,json=inactiveSessionTimeout,proto3" json:"inactive_session_timeout,omitempty"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache}@@ -1069,6 +1071,13 @@ func (x *WorkspaceProfileSetting) GetEnableMetricCollection() bool {return false}+func (x *WorkspaceProfileSetting) GetInactiveSessionTimeout() *durationpb.Duration {+ if x != nil {+ return x.InactiveSessionTimeout+ }+ return nil+}+type Announcement struct {state protoimpl.MessageState `protogen:"open.v1"`// The alert level of announcement@@ -3021,7 +3030,7 @@ const file_v1_setting_service_proto_rawDesc = "" +"\tclient_id\x18\x02 \x01(\tB\x03\xe0A\x04R\bclientId\x12(\n" +"\rclient_secret\x18\x03 \x01(\tB\x03\xe0A\x04R\fclientSecret\x12\"\n" +"\n" +- "robot_code\x18\x04 \x01(\tB\x03\xe0A\x04R\trobotCode\"\xf3\x04\n" ++ "robot_code\x18\x04 \x01(\tB\x03\xe0A\x04R\trobotCode\"\xc8\x05\n" +"\x17WorkspaceProfileSetting\x12!\n" +"\fexternal_url\x18\x01 \x01(\tR\vexternalUrl\x12'\n" +"\x0fdisallow_signup\x18\x02 \x01(\bR\x0edisallowSignup\x12\x1f\n" +@@ -3035,7 +3044,8 @@ const file_v1_setting_service_proto_rawDesc = "" +" \x01(\bR\x15enforceIdentityDomain\x12Q\n" +"\x14database_change_mode\x18\v \x01(\x0e2\x1f.bytebase.v1.DatabaseChangeModeR\x12databaseChangeMode\x128\n" +"\x18disallow_password_signin\x18\f \x01(\bR\x16disallowPasswordSignin\x128\n" +- "\x18enable_metric_collection\x18\r \x01(\bR\x16enableMetricCollection\"\xc2\x01\n" ++ "\x18enable_metric_collection\x18\r \x01(\bR\x16enableMetricCollection\x12S\n" ++ "\x18inactive_session_timeout\x18\x0e \x01(\v2\x19.google.protobuf.DurationR\x16inactiveSessionTimeout\"\xc2\x01\n" +"\fAnnouncement\x12:\n" +"\x05level\x18\x01 \x01(\x0e2$.bytebase.v1.Announcement.AlertLevelR\x05level\x12\x12\n" +"\x04text\x18\x02 \x01(\tR\x04text\x12\x12\n" +@@ -3272,47 +3282,48 @@ var file_v1_setting_service_proto_depIdxs = []int32{14, // 21: bytebase.v1.WorkspaceProfileSetting.announcement:type_name -> bytebase.v1.Announcement46, // 22: bytebase.v1.WorkspaceProfileSetting.maximum_role_expiration:type_name -> google.protobuf.Duration0, // 23: bytebase.v1.WorkspaceProfileSetting.database_change_mode:type_name -> bytebase.v1.DatabaseChangeMode- 2, // 24: bytebase.v1.Announcement.level:type_name -> bytebase.v1.Announcement.AlertLevel- 29, // 25: bytebase.v1.WorkspaceApprovalSetting.rules:type_name -> bytebase.v1.WorkspaceApprovalSetting.Rule- 30, // 26: bytebase.v1.SchemaTemplateSetting.field_templates:type_name -> bytebase.v1.SchemaTemplateSetting.FieldTemplate- 31, // 27: bytebase.v1.SchemaTemplateSetting.column_types:type_name -> bytebase.v1.SchemaTemplateSetting.ColumnType- 32, // 28: bytebase.v1.SchemaTemplateSetting.table_templates:type_name -> bytebase.v1.SchemaTemplateSetting.TableTemplate- 33, // 29: bytebase.v1.DataClassificationSetting.configs:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig- 37, // 30: bytebase.v1.SemanticTypeSetting.types:type_name -> bytebase.v1.SemanticTypeSetting.SemanticType- 38, // 31: bytebase.v1.Algorithm.full_mask:type_name -> bytebase.v1.Algorithm.FullMask- 39, // 32: bytebase.v1.Algorithm.range_mask:type_name -> bytebase.v1.Algorithm.RangeMask- 40, // 33: bytebase.v1.Algorithm.md5_mask:type_name -> bytebase.v1.Algorithm.MD5Mask- 41, // 34: bytebase.v1.Algorithm.inner_outer_mask:type_name -> bytebase.v1.Algorithm.InnerOuterMask- 46, // 35: bytebase.v1.PasswordRestrictionSetting.password_rotation:type_name -> google.protobuf.Duration- 4, // 36: bytebase.v1.AISetting.provider:type_name -> bytebase.v1.AISetting.Provider- 43, // 37: bytebase.v1.EnvironmentSetting.environments:type_name -> bytebase.v1.EnvironmentSetting.Environment- 47, // 38: bytebase.v1.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.v1.ApprovalTemplate- 48, // 39: bytebase.v1.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr- 49, // 40: bytebase.v1.SchemaTemplateSetting.FieldTemplate.engine:type_name -> bytebase.v1.Engine- 50, // 41: bytebase.v1.SchemaTemplateSetting.FieldTemplate.column:type_name -> bytebase.v1.ColumnMetadata- 51, // 42: bytebase.v1.SchemaTemplateSetting.FieldTemplate.catalog:type_name -> bytebase.v1.ColumnCatalog- 49, // 43: bytebase.v1.SchemaTemplateSetting.ColumnType.engine:type_name -> bytebase.v1.Engine- 49, // 44: bytebase.v1.SchemaTemplateSetting.TableTemplate.engine:type_name -> bytebase.v1.Engine- 52, // 45: bytebase.v1.SchemaTemplateSetting.TableTemplate.table:type_name -> bytebase.v1.TableMetadata- 53, // 46: bytebase.v1.SchemaTemplateSetting.TableTemplate.catalog:type_name -> bytebase.v1.TableCatalog- 34, // 47: bytebase.v1.DataClassificationSetting.DataClassificationConfig.levels:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level- 36, // 48: bytebase.v1.DataClassificationSetting.DataClassificationConfig.classification:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry- 35, // 49: bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry.value:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification- 19, // 50: bytebase.v1.SemanticTypeSetting.SemanticType.algorithm:type_name -> bytebase.v1.Algorithm- 42, // 51: bytebase.v1.Algorithm.RangeMask.slices:type_name -> bytebase.v1.Algorithm.RangeMask.Slice- 3, // 52: bytebase.v1.Algorithm.InnerOuterMask.type:type_name -> bytebase.v1.Algorithm.InnerOuterMask.MaskType- 44, // 53: bytebase.v1.EnvironmentSetting.Environment.tags:type_name -> bytebase.v1.EnvironmentSetting.Environment.TagsEntry- 5, // 54: bytebase.v1.SettingService.ListSettings:input_type -> bytebase.v1.ListSettingsRequest- 7, // 55: bytebase.v1.SettingService.GetSetting:input_type -> bytebase.v1.GetSettingRequest- 9, // 56: bytebase.v1.SettingService.UpdateSetting:input_type -> bytebase.v1.UpdateSettingRequest- 6, // 57: bytebase.v1.SettingService.ListSettings:output_type -> bytebase.v1.ListSettingsResponse- 10, // 58: bytebase.v1.SettingService.GetSetting:output_type -> bytebase.v1.Setting- 10, // 59: bytebase.v1.SettingService.UpdateSetting:output_type -> bytebase.v1.Setting- 57, // [57:60] is the sub-list for method output_type- 54, // [54:57] is the sub-list for method input_type- 54, // [54:54] is the sub-list for extension type_name- 54, // [54:54] is the sub-list for extension extendee- 0, // [0:54] is the sub-list for field type_name+ 46, // 24: bytebase.v1.WorkspaceProfileSetting.inactive_session_timeout:type_name -> google.protobuf.Duration+ 2, // 25: bytebase.v1.Announcement.level:type_name -> bytebase.v1.Announcement.AlertLevel+ 29, // 26: bytebase.v1.WorkspaceApprovalSetting.rules:type_name -> bytebase.v1.WorkspaceApprovalSetting.Rule+ 30, // 27: bytebase.v1.SchemaTemplateSetting.field_templates:type_name -> bytebase.v1.SchemaTemplateSetting.FieldTemplate+ 31, // 28: bytebase.v1.SchemaTemplateSetting.column_types:type_name -> bytebase.v1.SchemaTemplateSetting.ColumnType+ 32, // 29: bytebase.v1.SchemaTemplateSetting.table_templates:type_name -> bytebase.v1.SchemaTemplateSetting.TableTemplate+ 33, // 30: bytebase.v1.DataClassificationSetting.configs:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig+ 37, // 31: bytebase.v1.SemanticTypeSetting.types:type_name -> bytebase.v1.SemanticTypeSetting.SemanticType+ 38, // 32: bytebase.v1.Algorithm.full_mask:type_name -> bytebase.v1.Algorithm.FullMask+ 39, // 33: bytebase.v1.Algorithm.range_mask:type_name -> bytebase.v1.Algorithm.RangeMask+ 40, // 34: bytebase.v1.Algorithm.md5_mask:type_name -> bytebase.v1.Algorithm.MD5Mask+ 41, // 35: bytebase.v1.Algorithm.inner_outer_mask:type_name -> bytebase.v1.Algorithm.InnerOuterMask+ 46, // 36: bytebase.v1.PasswordRestrictionSetting.password_rotation:type_name -> google.protobuf.Duration+ 4, // 37: bytebase.v1.AISetting.provider:type_name -> bytebase.v1.AISetting.Provider+ 43, // 38: bytebase.v1.EnvironmentSetting.environments:type_name -> bytebase.v1.EnvironmentSetting.Environment+ 47, // 39: bytebase.v1.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.v1.ApprovalTemplate+ 48, // 40: bytebase.v1.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr+ 49, // 41: bytebase.v1.SchemaTemplateSetting.FieldTemplate.engine:type_name -> bytebase.v1.Engine+ 50, // 42: bytebase.v1.SchemaTemplateSetting.FieldTemplate.column:type_name -> bytebase.v1.ColumnMetadata+ 51, // 43: bytebase.v1.SchemaTemplateSetting.FieldTemplate.catalog:type_name -> bytebase.v1.ColumnCatalog+ 49, // 44: bytebase.v1.SchemaTemplateSetting.ColumnType.engine:type_name -> bytebase.v1.Engine+ 49, // 45: bytebase.v1.SchemaTemplateSetting.TableTemplate.engine:type_name -> bytebase.v1.Engine+ 52, // 46: bytebase.v1.SchemaTemplateSetting.TableTemplate.table:type_name -> bytebase.v1.TableMetadata+ 53, // 47: bytebase.v1.SchemaTemplateSetting.TableTemplate.catalog:type_name -> bytebase.v1.TableCatalog+ 34, // 48: bytebase.v1.DataClassificationSetting.DataClassificationConfig.levels:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level+ 36, // 49: bytebase.v1.DataClassificationSetting.DataClassificationConfig.classification:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry+ 35, // 50: bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry.value:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification+ 19, // 51: bytebase.v1.SemanticTypeSetting.SemanticType.algorithm:type_name -> bytebase.v1.Algorithm+ 42, // 52: bytebase.v1.Algorithm.RangeMask.slices:type_name -> bytebase.v1.Algorithm.RangeMask.Slice+ 3, // 53: bytebase.v1.Algorithm.InnerOuterMask.type:type_name -> bytebase.v1.Algorithm.InnerOuterMask.MaskType+ 44, // 54: bytebase.v1.EnvironmentSetting.Environment.tags:type_name -> bytebase.v1.EnvironmentSetting.Environment.TagsEntry+ 5, // 55: bytebase.v1.SettingService.ListSettings:input_type -> bytebase.v1.ListSettingsRequest+ 7, // 56: bytebase.v1.SettingService.GetSetting:input_type -> bytebase.v1.GetSettingRequest+ 9, // 57: bytebase.v1.SettingService.UpdateSetting:input_type -> bytebase.v1.UpdateSettingRequest+ 6, // 58: bytebase.v1.SettingService.ListSettings:output_type -> bytebase.v1.ListSettingsResponse+ 10, // 59: bytebase.v1.SettingService.GetSetting:output_type -> bytebase.v1.Setting+ 10, // 60: bytebase.v1.SettingService.UpdateSetting:output_type -> bytebase.v1.Setting+ 58, // [58:61] is the sub-list for method output_type+ 55, // [55:58] is the sub-list for method input_type+ 55, // [55:55] is the sub-list for extension type_name+ 55, // [55:55] is the sub-list for extension extendee+ 0, // [0:55] is the sub-list for field type_name}func init() { file_v1_setting_service_proto_init() }diff --git a/backend/generated-go/v1/setting_service_equal.pb.go b/backend/generated-go/v1/setting_service_equal.pb.goindex 3fac8cf598..a79dc45cce 100644--- a/backend/generated-go/v1/setting_service_equal.pb.go+++ b/backend/generated-go/v1/setting_service_equal.pb.go@@ -316,6 +316,9 @@ func (x *WorkspaceProfileSetting) Equal(y *WorkspaceProfileSetting) bool {if x.EnableMetricCollection != y.EnableMetricCollection {return false}+ if p, q := x.InactiveSessionTimeout, y.InactiveSessionTimeout; (p == nil && q != nil) || (p != nil && (q == nil || p.Seconds != q.Seconds || p.Nanos != q.Nanos)) {+ return false+ }return true}diff --git a/frontend/src/App.vue b/frontend/src/App.vueindex f6352860e4..fc1782b8aa 100644--- a/frontend/src/App.vue+++ b/frontend/src/App.vue@@ -51,6 +51,7 @@ const MAX_NOTIFICATION_DISPLAY_COUNT = 3;const route = useRoute();const router = useRouter();+// TODO(ed): can we remove it?const { key } = provideAppRootContext();const notificationStore = useNotificationStore();diff --git a/frontend/src/AuthContext.vue b/frontend/src/AuthContext.vueindex b9c5eb3c93..6d2b4e5779 100644--- a/frontend/src/AuthContext.vue+++ b/frontend/src/AuthContext.vue@@ -1,12 +1,17 @@<template><slot></slot>- <SigninModal />+ <template v-if="!isAuthRoute && authStore.isLoggedIn">+ <!-- Do not show the modal when the user is in auth related pages. -->+ <SigninModal v-if="authStore.unauthenticatedOccurred" />+ <InactiveRemindModal v-else />+ </template></template><script setup lang="ts">-import { onMounted, onUnmounted, ref, watch } from "vue";+import { onMounted, onUnmounted, ref, watch, computed } from "vue";import { useRouter } from "vue-router";import { isAuthRelatedRoute } from "@/utils/auth";+import InactiveRemindModal from "@/views/auth/InactiveRemindModal.vue";import SigninModal from "@/views/auth/SigninModal.vue";import { t } from "./plugins/i18n";import { WORKSPACE_ROOT_MODULE } from "./router/dashboard/workspaceRoutes";@@ -33,6 +38,13 @@ const roleStore = useRoleStore();const authCheckIntervalId = ref<NodeJS.Timeout>();+const isAuthRoute = computed(() => {+ return (+ router.currentRoute.value.name &&+ isAuthRelatedRoute(router.currentRoute.value.name.toString())+ );+});+onMounted(() => {// Periodically checks if the user's session is still valid.// Skips check if user is not logged in or on an auth-related route.@@ -40,10 +52,7 @@ onMounted(() => {if (!authStore.isLoggedIn || authStore.unauthenticatedOccurred) {return;}- if (- router.currentRoute.value.name &&- isAuthRelatedRoute(router.currentRoute.value.name.toString())- ) {+ if (isAuthRoute.value) {return;}diff --git a/frontend/src/components/GeneralSetting/SignInFrequencySetting.vue b/frontend/src/components/GeneralSetting/SignInFrequencySetting.vueindex b0edd4b957..72497f8e84 100644--- a/frontend/src/components/GeneralSetting/SignInFrequencySetting.vue+++ b/frontend/src/components/GeneralSetting/SignInFrequencySetting.vue@@ -13,7 +13,7 @@<template #trigger><div class="mt-3 w-full flex flex-row justify-start items-center"><NInputNumber- v-model:value="state.inputValue"+ v-model:value="state.tokenDuration"class="w-24 mr-4":disabled="!allowChangeSetting":min="1"@@ -41,6 +41,39 @@</NTooltip></div>+ <div class="mb-7 mt-4 lg:mt-0" @click="handleValueFieldClick">+ <p class="font-medium flex flex-row justify-start items-center">+ <span class="mr-2">{{+ $t("settings.general.workspace.inactive-session-timeout.self")+ }}</span>+ <FeatureBadge :feature="PlanFeature.FEATURE_SIGN_IN_FREQUENCY_CONTROL" />+ </p>+ <p class="text-sm text-gray-400 mt-1">+ {{+ $t("settings.general.workspace.inactive-session-timeout.description")+ }}+ </p>+ <NTooltip placement="top-start" :disabled="allowChangeSetting">+ <template #trigger>+ <div class="mt-3 w-full flex flex-row justify-start items-center">+ <NInputNumber+ v-model:value="state.inactiveTimeout"+ class="w-24 mr-4"+ :disabled="!allowChangeSetting"+ />+ <span class="textinfo text-sm">+ {{+ $t("settings.general.workspace.inactive-session-timeout.hours")+ }}+ </span>+ </div>+ </template>+ <span class="text-sm text-gray-400 -translate-y-2">+ {{ $t("settings.general.workspace.only-admin-can-edit") }}+ </span>+ </NTooltip>+ </div>+<FeatureModal:feature="PlanFeature.FEATURE_SIGN_IN_FREQUENCY_CONTROL":open="state.showFeatureModal"@@ -55,39 +88,52 @@ import { FieldMaskSchema } from "@bufbuild/protobuf/wkt";import { isEqual } from "lodash-es";import { NInputNumber, NRadioGroup, NRadio, NTooltip } from "naive-ui";import { computed, reactive, watch } from "vue";+import { FeatureBadge, FeatureModal } from "@/components/FeatureGuard";import { featureToRef } from "@/store";import { useSettingV1Store } from "@/store/modules/v1/setting";import { defaultTokenDurationInHours } from "@/types";import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";-import { FeatureBadge, FeatureModal } from "../FeatureGuard";++interface LocalState {+ tokenDuration: number;+ inactiveTimeout: number;+ timeFormat: "HOURS" | "DAYS";+ showFeatureModal: boolean;+}const getInitialState = (): LocalState => {const defaultState: LocalState = {- inputValue: defaultTokenDurationInHours / 24,+ tokenDuration: defaultTokenDurationInHours / 24,+ inactiveTimeout: -1,timeFormat: "DAYS",showFeatureModal: false,};- const seconds = settingV1Store.workspaceProfileSetting?.tokenDuration?.seconds+ const tokenDurationSeconds = settingV1Store.workspaceProfileSetting+ ?.tokenDuration?.seconds? Number(settingV1Store.workspaceProfileSetting.tokenDuration.seconds): undefined;- if (seconds && seconds > 0) {- if (seconds < 60 * 60 * 24) {- defaultState.inputValue = Math.floor(seconds / (60 * 60)) || 1;+ if (tokenDurationSeconds && tokenDurationSeconds > 0) {+ if (tokenDurationSeconds < 60 * 60 * 24) {+ defaultState.tokenDuration =+ Math.floor(tokenDurationSeconds / (60 * 60)) || 1;defaultState.timeFormat = "HOURS";} else {- defaultState.inputValue = Math.floor(seconds / (60 * 60 * 24)) || 1;+ defaultState.tokenDuration =+ Math.floor(tokenDurationSeconds / (60 * 60 * 24)) || 1;defaultState.timeFormat = "DAYS";}}++ const inactiveTimeoutSeconds = Number(+ settingV1Store.workspaceProfileSetting?.inactiveSessionTimeout?.seconds ?? 0+ );+ if (inactiveTimeoutSeconds) {+ defaultState.inactiveTimeout =+ Math.floor(inactiveTimeoutSeconds / (60 * 60)) || 1;+ }return defaultState;};-interface LocalState {- inputValue: number;- timeFormat: "HOURS" | "DAYS";- showFeatureModal: boolean;-}-const props = defineProps<{allowEdit: boolean;}>();@@ -113,8 +159,8 @@ const handleValueFieldClick = () => {const handleFrequencySettingChange = async () => {const seconds =state.timeFormat === "HOURS"- ? state.inputValue * 60 * 60- : state.inputValue * 24 * 60 * 60;+ ? state.tokenDuration * 60 * 60+ : state.tokenDuration * 24 * 60 * 60;await settingV1Store.updateWorkspaceProfile({payload: {tokenDuration: create(DurationSchema, {@@ -128,18 +174,46 @@ const handleFrequencySettingChange = async () => {});};+const handleInactivityTimeoutSettingChange = async () => {+ await settingV1Store.updateWorkspaceProfile({+ payload: {+ inactiveSessionTimeout: create(DurationSchema, {+ seconds: BigInt(state.inactiveTimeout * 60 * 60),+ nanos: 0,+ }),+ },+ updateMask: create(FieldMaskSchema, {+ paths: ["value.workspace_profile_setting_value.inactive_session_timeout"],+ }),+ });+};++const handleUpdate = async () => {+ const initState = getInitialState();+ if (initState.inactiveTimeout !== state.inactiveTimeout) {+ await handleInactivityTimeoutSettingChange();+ }++ if (+ initState.tokenDuration !== state.tokenDuration ||+ initState.timeFormat !== state.timeFormat+ ) {+ await handleFrequencySettingChange();+ }+};+watch(() => [state.timeFormat],() => {- if (state.timeFormat === "HOURS" && state.inputValue > 23) {- state.inputValue = 23;+ if (state.timeFormat === "HOURS" && state.tokenDuration > 23) {+ state.tokenDuration = 23;}});defineExpose({isDirty: computed(() => !isEqual(getInitialState(), state)),- update: handleFrequencySettingChange,+ update: handleUpdate,revert: () => {Object.assign(state, getInitialState());},diff --git a/frontend/src/composables/useCurrentTimestamp.ts b/frontend/src/composables/useCurrentTimestamp.tsnew file mode 100644index 0000000000..cf3bb9a5ee--- /dev/null+++ b/frontend/src/composables/useCurrentTimestamp.ts@@ -0,0 +1,16 @@+import { useIntervalFn } from "@vueuse/core";+import { ref } from "vue";++export const useCurrentTimestamp = () => {+ // Update every 1 second instead of every frame+ const currentTsInMS = ref(Date.now());+ const { pause, resume } = useIntervalFn(() => {+ currentTsInMS.value = Date.now();+ }, 1000);++ return {+ currentTsInMS,+ pause,+ resume,+ };+};diff --git a/frontend/src/composables/useLastActivity.ts b/frontend/src/composables/useLastActivity.tsnew file mode 100644index 0000000000..6e41ba4c63--- /dev/null+++ b/frontend/src/composables/useLastActivity.ts@@ -0,0 +1,12 @@+import { computed } from "vue";+import { useCurrentUserV1 } from "@/store";+import { useDynamicLocalStorage } from "@/utils";++export const useLastActivity = () => {+ const currentUser = useCurrentUserV1();+ const lastActivityTs = useDynamicLocalStorage<number>(+ computed(() => `bb.last-activity-ts.${currentUser.value.name}`),+ Date.now()+ );+ return { lastActivityTs };+};diff --git a/frontend/src/grpcweb/index.ts b/frontend/src/grpcweb/index.tsindex 656a35ff35..5a9749125c 100644--- a/frontend/src/grpcweb/index.ts+++ b/frontend/src/grpcweb/index.ts@@ -29,14 +29,22 @@ import { SubscriptionService } from "@/types/proto-es/v1/subscription_service_pbimport { UserService } from "@/types/proto-es/v1/user_service_pb";import { WorksheetService } from "@/types/proto-es/v1/worksheet_service_pb";import { WorkspaceService } from "@/types/proto-es/v1/workspace_service_pb";-import { authInterceptor, errorNotificationInterceptor } from "./middlewares";+import {+ authInterceptor,+ errorNotificationInterceptor,+ activeInterceptor,+} from "./middlewares";const address = import.meta.env.BB_GRPC_LOCAL || window.location.origin;const transport = createConnectTransport({baseUrl: address,useBinaryFormat: true,- interceptors: [authInterceptor, errorNotificationInterceptor],+ interceptors: [+ authInterceptor,+ activeInterceptor,+ errorNotificationInterceptor,+ ],fetch: (input, init) => fetch(input, { ...init, credentials: "include" }),});diff --git a/frontend/src/grpcweb/middlewares/activeInterceptorMiddleware.ts b/frontend/src/grpcweb/middlewares/activeInterceptorMiddleware.tsnew file mode 100644index 0000000000..2418054da5--- /dev/null+++ b/frontend/src/grpcweb/middlewares/activeInterceptorMiddleware.ts@@ -0,0 +1,15 @@+import { type Interceptor } from "@connectrpc/connect";+import { useLastActivity } from "@/composables/useLastActivity";+import { useCurrentUserV1 } from "@/store";++// TODO(ed): some requests are called automatically by the script, for example, refresh the issue status.+export const activeInterceptor: Interceptor = (next) => async (req) => {+ const resp = await next(req);+ const me = useCurrentUserV1();+ // ignore the GetCurrentUser method, it's automatically called by the script.+ if (me.value && req.method.name !== "GetCurrentUser") {+ const { lastActivityTs } = useLastActivity();+ lastActivityTs.value = Date.now();+ }+ return resp;+};diff --git a/frontend/src/grpcweb/middlewares/index.ts b/frontend/src/grpcweb/middlewares/index.tsindex a18a2a95ab..135c99773b 100644--- a/frontend/src/grpcweb/middlewares/index.ts+++ b/frontend/src/grpcweb/middlewares/index.ts@@ -1,2 +1,3 @@export * from "./authInterceptorMiddleware";export * from "./errorNotificationMiddleware";+export * from "./activeInterceptorMiddleware";diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex f16cb80dbe..c4e51a66e4 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -607,6 +607,11 @@"hours": "Hour(s)","days": "Day(s)"},+ "inactive-session-timeout": {+ "self": "Inactive session timeout",+ "description": "The session expiration time if no activity is detected for the user. The users will be forced to log out when they reach the limit.",+ "hours": "Hour(s)"+ },"maximum-role-expiration": {"self": "Maximum role expiration","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.",@@ -1527,7 +1532,12 @@"content": "We will refirect you to the home page."},"token-expired-title": "Token expired",- "token-expired-description": "Token has expired, please login again"+ "token-expired-description": "Token has expired, please login again",+ "inactive-modal": {+ "title": "Your session is about to end",+ "description": "You've been inactive for a while. For your security, we'll automatically sign you out in {minutes} minutes.",+ "stay-signed-in": "Stay signed in"+ }},"policy": {"rollout": {diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex d39e2b1ec7..394fcb7dcd 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -607,6 +607,11 @@"hours": "Horas","days": "Días"},+ "inactive-session-timeout": {+ "self": "Tiempo de espera de sesión inactiva",+ "description": "Tiempo de expiración de la sesión si no se detecta actividad del usuario. Los usuarios serán forzados a cerrar sesión cuando alcancen el límite.",+ "hours": "Horas"+ },"maximum-role-expiration": {"self": "Caducidad máxima del rol","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.",@@ -1527,7 +1532,12 @@"content": "Lo redirigiremos a la página de inicio."},"token-expired-title": "Token expirado",- "token-expired-description": "El token ha expirado, por favor inicia sesión nuevamente"+ "token-expired-description": "El token ha expirado, por favor inicia sesión nuevamente",+ "inactive-modal": {+ "title": "Tu sesión está a punto de terminar",+ "description": "Has estado inactivo un tiempo. Por tu seguridad, cerraremos tu sesión automáticamente en {minutes} minutos.",+ "stay-signed-in": "Permanecer conectado"+ }},"policy": {"rollout": {diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex 8a8e45c9fb..3a65f9ce93 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -607,6 +607,11 @@"hours": "時間","days": "日"},+ "inactive-session-timeout": {+ "self": "非アクティブセッションタイムアウト",+ "description": "ユーザーの活動が検出されない場合のセッション有効期限です。ユーザーが制限時間に達すると、強制的にログアウトされます。",+ "hours": "時間"+ },"maximum-role-expiration": {"self": "最大ロール有効期限","description": "最大ロール有効期限は、ロールをユーザーに付与できる最大期間であり、プロジェクト所有者を除くすべてのプロジェクト ロールに適用されます。",@@ -1527,7 +1532,12 @@"content": "ホームページへリダイレクトさせていただきます。"},"token-expired-title": "トークンの有効期限が切れました",- "token-expired-description": "トークンの有効期限が切れています。再度ログインしてください。"+ "token-expired-description": "トークンの有効期限が切れています。再度ログインしてください。",+ "inactive-modal": {+ "title": "セッションの有効期限が近づいています",+ "description": "しばらく操作がありませんでした。セキュリティのため、{minutes}分後に自動的にログアウトします。",+ "stay-signed-in": "ログインしたままにする"+ }},"policy": {"rollout": {diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.jsonindex 82c2d72fd7..9b6ab0c381 100644--- a/frontend/src/locales/vi-VN.json+++ b/frontend/src/locales/vi-VN.json@@ -607,6 +607,11 @@"hours": "Giờ","days": "Ngày"},+ "inactive-session-timeout": {+ "self": "Thời gian chờ phiên không hoạt động",+ "description": "Thời gian hết hạn phiên nếu không phát hiện hoạt động từ người dùng. Người dùng sẽ bị buộc phải đăng xuất khi đạt đến giới hạn.",+ "hours": "Giờ"+ },"maximum-role-expiration": {"self": "Thời gian hết hạn vai trò tối đa","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.",@@ -1527,7 +1532,12 @@"content": "Chúng tôi sẽ chuyển hướng bạn đến trang chủ."},"token-expired-title": "Mã thông báo đã hết hạn",- "token-expired-description": "Mã thông báo đã hết hạn, vui lòng đăng nhập lại"+ "token-expired-description": "Mã thông báo đã hết hạn, vui lòng đăng nhập lại",+ "inactive-modal": {+ "title": "Phiên của bạn sắp kết thúc",+ "description": "Bạn đã không hoạt động trong một thời gian. Để bảo mật cho bạn, chúng tôi sẽ tự động đăng xuất bạn sau {minutes} phút nữa.",+ "stay-signed-in": "Tiếp tục duy trì đăng nhập"+ }},"policy": {"rollout": {diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 372e400949..8023403ab0 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -607,6 +607,11 @@"hours": "小时","days": "天数"},+ "inactive-session-timeout": {+ "self": "非活动会话超时",+ "description": "未检测到用户活动时的会话过期时间。用户达到限制时将被强制退出登录。",+ "hours": "小时"+ },"maximum-role-expiration": {"self": "角色最大过期时间","description": "角色最大过期时间是可以赋予用户角色时所能设置的最大过期时间,会应用在项目所有者之外的其他项目角色上。",@@ -1527,7 +1532,12 @@"content": "我们将把您重定向到主页。"},"token-expired-title": "Token 已过期",- "token-expired-description": "Token 已过期,请重新登录"+ "token-expired-description": "Token 已过期,请重新登录",+ "inactive-modal": {+ "title": "您的会话即将结束",+ "description": "您已有一段时间未活动。为了您的安全,我们将在{minutes}分钟后自动退出您的登录。",+ "stay-signed-in": "保持登录状态"+ }},"policy": {"rollout": {diff --git a/frontend/src/store/modules/v1/actuator.ts b/frontend/src/store/modules/v1/actuator.tsindex 1775f24cef..ed4e166104 100644--- a/frontend/src/store/modules/v1/actuator.ts+++ b/frontend/src/store/modules/v1/actuator.ts@@ -217,15 +217,14 @@ export const useActuatorV1Store = defineStore("actuator_v1", {}// It's time to fetch the release- if (new Date().getTime() >= this.releaseInfo.nextCheckTs) {+ if (Date.now() >= this.releaseInfo.nextCheckTs) {const release = await this.fetchLatestRelease();if (!release) {return false;}// check till 24 hours later- this.releaseInfo.nextCheckTs =- new Date().getTime() + 24 * 60 * 60 * 1000;+ this.releaseInfo.nextCheckTs = Date.now() + 24 * 60 * 60 * 1000;if (semverCompare(release.tag_name, this.releaseInfo.latest.tag_name)) {this.releaseInfo.ignoreRemindModalTillNextRelease = false;diff --git a/frontend/src/store/modules/v1/auth.ts b/frontend/src/store/modules/v1/auth.tsindex 02d46d209d..773c659d0c 100644--- a/frontend/src/store/modules/v1/auth.ts+++ b/frontend/src/store/modules/v1/auth.ts@@ -163,6 +163,7 @@ export const useAuthStore = defineStore("auth_v1", () => {} catch {// nothing} finally {+ unauthenticatedOccurred.value = false;const pathname = location.pathname;// Replace and reload the page to clear frontend state directly.window.location.href = router.resolve({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 40ae40b631..8378402091 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@@ -588,6 +588,13 @@ export declare type WorkspaceProfileSetting = Message<"bytebase.v1.WorkspaceProf* @generated from field: bool enable_metric_collection = 13;*/enableMetricCollection: boolean;++ /**+ * The session expiration time if not activity detected for the user. Value <= 0 means no limit.+ *+ * @generated from field: google.protobuf.Duration inactive_session_timeout = 14;+ */+ inactiveSessionTimeout?: Duration;};/**diff --git a/frontend/src/types/proto-es/v1/setting_service_pb.js b/frontend/src/types/proto-es/v1/setting_service_pb.jsindex 15e5ee6be5..72d0595ee4 100644--- a/frontend/src/types/proto-es/v1/setting_service_pb.js+++ b/frontend/src/types/proto-es/v1/setting_service_pb.js@@ -19,7 +19,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("Chh2MS9zZXR0aW5nX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIhUKE0xpc3RTZXR0aW5nc1JlcXVlc3QiPgoUTGlzdFNldHRpbmdzUmVzcG9uc2USJgoIc2V0dGluZ3MYASADKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nIj8KEUdldFNldHRpbmdSZXF1ZXN0EioKBG5hbWUYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1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nIkmK6jAPYmIuc2V0dGluZ3Muc2V0kOowAZjqMAGC0+STAig6B3NldHRpbmcyHS92MS97c2V0dGluZy5uYW1lPXNldHRpbmdzLyp9QjZaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjFiBnByb3RvMw", [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_database_catalog_service, file_v1_database_service, file_v1_issue_service]);+ fileDesc("Chh2MS9zZXR0aW5nX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIhUKE0xpc3RTZXR0aW5nc1JlcXVlc3QiPgoUTGlzdFNldHRpbmdzUmVzcG9uc2USJgoIc2V0dGluZ3MYASADKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nIj8KEUdldFNldHRpbmdSZXF1ZXN0EioKBG5hbWUYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1NldHRpbmciOwoSR2V0U2V0dGluZ1Jlc3BvbnNlEiUKB3NldHRpbmcYASABKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nIqEBChRVcGRhdGVTZXR0aW5nUmVxdWVzdBIqCgdzZXR0aW5nGAEgASgLMhQuYnl0ZWJhc2UudjEuU2V0dGluZ0ID4EECEhUKDXZhbGlkYXRlX29ubHkYAiABKAgSFQoNYWxsb3dfbWlzc2luZxgDIAEoCBIvCgt1cGRhdGVfbWFzaxgEIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2si1QMKB1NldHRpbmcSDAoEbmFtZRgBIAEoCRIhCgV2YWx1ZRgCIAEoCzISLmJ5dGViYXNlLnYxLlZhbHVlIuMCCgtTZXR0aW5nTmFtZRIcChhTRVRUSU5HX05BTUVfVU5TUEVDSUZJRUQQABIPCgtBVVRIX1NFQ1JFVBABEhEKDUJSQU5ESU5HX0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CwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4ASpUChJEYXRhYmFzZUNoYW5nZU1vZGUSJAogREFUQUJBU0VfQ0hBTkdFX01PREVfVU5TUEVDSUZJRUQQABIMCghQSVBFTElORRABEgoKBkVESVRPUhACMq4DCg5TZXR0aW5nU2VydmljZRKEAQoMTGlzdFNldHRpbmdzEiAuYnl0ZWJhc2UudjEuTGlzdFNldHRpbmdzUmVxdWVzdBohLmJ5dGViYXNlLnYxLkxpc3RTZXR0aW5nc1Jlc3BvbnNlIi/aQQCK6jAQYmIuc2V0dGluZ3MubGlzdJDqMAGC0+STAg4SDC92MS9zZXR0aW5ncxJ/CgpHZXRTZXR0aW5nEh4uYnl0ZWJhc2UudjEuR2V0U2V0dGluZ1JlcXVlc3QaFC5ieXRlYmFzZS52MS5TZXR0aW5nIjvaQQRuYW1liuowD2JiLnNldHRpbmdzLmdldJDqMAGC0+STAhcSFS92MS97bmFtZT1zZXR0aW5ncy8qfRKTAQoNVXBkYXRlU2V0dGluZxIhLmJ5dGViYXNlLnYxLlVwZGF0ZVNldHRpbmdSZXF1ZXN0GhQuYnl0ZWJhc2UudjEuU2V0dGluZyJJiuowD2JiLnNldHRpbmdzLnNldJDqMAGY6jABgtPkkwIoOgdzZXR0aW5nMh0vdjEve3NldHRpbmcubmFtZT1zZXR0aW5ncy8qfUI2WjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxYgZwcm90bzM", [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_database_catalog_service, file_v1_database_service, file_v1_issue_service]);/*** Describes the message bytebase.v1.ListSettingsRequest.diff --git a/frontend/src/views/auth/InactiveRemindModal.vue b/frontend/src/views/auth/InactiveRemindModal.vuenew file mode 100644index 0000000000..0007f4d52e--- /dev/null+++ b/frontend/src/views/auth/InactiveRemindModal.vue@@ -0,0 +1,78 @@+<template>+ <BBModal+ :show="shouldShow"+ :trap-focus="true"+ :show-close="false"+ :mask-closable="false"+ :header-class="'!hidden'"+ >+ <div class="flex items-center w-auto md:min-w-96 max-w-full h-auto md:py-4">+ <div class="flex flex-col justify-center items-start flex-1 space-y-4">+ <div>+ <p class="font-medium text-lg">+ {{ $t("auth.inactive-modal.title") }}+ </p>+ <span class="textinfo">+ {{+ $t("auth.inactive-modal.description", {+ minutes: showModalThresholdInMins,+ })+ }}+ </span>+ </div>+ <div class="w-full flex items-center justify-end space-x-3">+ <NButton quaternary @click="logout">+ {{ $t("common.logout") }}+ </NButton>+ <NButton type="primary" @click="staySignedIn">+ {{ $t("auth.inactive-modal.stay-signed-in") }}+ </NButton>+ </div>+ </div>+ </div>+ </BBModal>+</template>++<script lang="tsx" setup>+import { NButton } from "naive-ui";+import { computed } from "vue";+import { BBModal } from "@/bbkit";+import { useCurrentTimestamp } from "@/composables/useCurrentTimestamp";+import { useLastActivity } from "@/composables/useLastActivity";+import { useAuthStore, useSettingV1Store } from "@/store";++const authStore = useAuthStore();+const settingStore = useSettingV1Store();++// Show the modal 3min before the inactiveTimeout threshold.+const showModalThresholdInMins = 3;++const logout = () => {+ authStore.logout();+};++const inactiveTimeoutInSeconds = computed(() =>+ Number(+ settingStore.workspaceProfileSetting?.inactiveSessionTimeout?.seconds ?? 0+ )+);++const { lastActivityTs } = useLastActivity();++const staySignedIn = () => (lastActivityTs.value = Date.now());++const { currentTsInMS } = useCurrentTimestamp();++const shouldShow = computed(() => {+ if (inactiveTimeoutInSeconds.value <= 0) {+ return false;+ }++ const inactiveInSeconds = (currentTsInMS.value - lastActivityTs.value) / 1000;+ // Show the modal 3min before the inactiveTimeout threshold.+ return (+ inactiveInSeconds >+ inactiveTimeoutInSeconds.value - showModalThresholdInMins * 60+ );+});+</script>diff --git a/frontend/src/views/auth/SigninModal.vue b/frontend/src/views/auth/SigninModal.vueindex 6a44d4d118..55ac52f20d 100644--- a/frontend/src/views/auth/SigninModal.vue+++ b/frontend/src/views/auth/SigninModal.vue@@ -1,6 +1,6 @@<template><BBModal- :show="shouldShow"+ :show="true":trap-focus="true":show-close="false":mask-closable="false"@@ -22,31 +22,13 @@<script lang="tsx" setup>import { NButton } from "naive-ui";-import { computed } from "vue";-import { useRoute } from "vue-router";import { BBModal } from "@/bbkit";import { useAuthStore } from "@/store";-import { isAuthRelatedRoute } from "@/utils/auth";import Signin from "@/views/auth/Signin.vue";-const route = useRoute();const authStore = useAuthStore();const logout = () => {- authStore.unauthenticatedOccurred = false;authStore.logout();};--const shouldShow = computed(() => {- // Do not show the modal when the user is in auth related pages.- if (route.name && isAuthRelatedRoute(route.name as string)) {- return false;- }-- if (!authStore.isLoggedIn) {- return false;- }-- return authStore.unauthenticatedOccurred;-});</script>diff --git a/frontend/src/views/sql-editor/EditorPanel/ResultPanel/DatabaseQueryContext.vue b/frontend/src/views/sql-editor/EditorPanel/ResultPanel/DatabaseQueryContext.vueindex 1f0b8fd8d3..01ce7c4d12 100644--- a/frontend/src/views/sql-editor/EditorPanel/ResultPanel/DatabaseQueryContext.vue+++ b/frontend/src/views/sql-editor/EditorPanel/ResultPanel/DatabaseQueryContext.vue@@ -38,10 +38,10 @@</template><script lang="tsx" setup>-import { useIntervalFn } from "@vueuse/core";import { NButton } from "naive-ui";-import { computed, ref, watch } from "vue";+import { computed, watch } from "vue";import { BBSpin } from "@/bbkit";+import { useCurrentTimestamp } from "@/composables/useCurrentTimestamp";import { useExecuteSQL } from "@/composables/useExecuteSQL";import { useSQLEditorTabStore } from "@/store";import type {@@ -61,18 +61,14 @@ const tabStore = useSQLEditorTabStore();const loading = computed(() => props.context.status === "EXECUTING");-// Update every 1 second instead of every frame-const currentTimestampMS = ref(Date.now());-const { pause, resume } = useIntervalFn(() => {- currentTimestampMS.value = Date.now();-}, 1000);+const { currentTsInMS, pause, resume } = useCurrentTimestamp();// Start/stop the timer based on loading statewatch(loading,(isLoading) => {if (isLoading) {- currentTimestampMS.value = Date.now();+ currentTsInMS.value = Date.now();resume();} else {pause();@@ -89,7 +85,7 @@ const queryElapsedTime = computed(() => {if (!beginMS) {return "";}- const elapsedMS = currentTimestampMS.value - beginMS;+ const elapsedMS = currentTsInMS.value - beginMS;return `${(elapsedMS / 1000).toFixed(1)}s`;});diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex aa5c0e1edc..4a90ab53da 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -14928,6 +14928,10 @@ components:enableMetricCollection:type: booleandescription: Whether to enable metric collection for the workspace.+ inactiveSessionTimeout:+ pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$+ type: string+ description: The session expiration time if not activity detected for the user. Value <= 0 means no limit.tags:- name: ActuatorServicedescription: ActuatorService manages system health and operational information.diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex 8047fcc87a..45ba63504e 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -4716,6 +4716,7 @@ ISSUE_CREATE represents creating an issue. || database_change_mode | [DatabaseChangeMode](#bytebase-store-DatabaseChangeMode) | | The workspace database change mode. || disallow_password_signin | [bool](#bool) | | Whether to disallow password signin. (Except workspace admins) || enable_metric_collection | [bool](#bool) | | Whether to enable metric collection for the workspace. |+| inactive_session_timeout | [google.protobuf.Duration](#google-protobuf-Duration) | | The session expiration time if not activity detected for the user. Value <= 0 means no limit. |diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.htmlindex 46651f9b6f..7461832ff8 100644--- a/proto/gen/grpc-doc/store/index.html+++ b/proto/gen/grpc-doc/store/index.html@@ -12394,6 +12394,13 @@ are /[a-z][0-9]-/. </p></td><td><p>Whether to enable metric collection for the workspace. </p></td></tr>+ <tr>+ <td>inactive_session_timeout</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td></td>+ <td><p>The session expiration time if not activity detected for the user. Value <= 0 means no limit. </p></td>+ </tr>+</tbody></table>diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex a847ce81c5..0dafde5bb0 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -4783,6 +4783,7 @@ For examples: (source == "DML" && level == 200) || (source == &#| database_change_mode | [DatabaseChangeMode](#bytebase-v1-DatabaseChangeMode) | | The workspace database change mode. || disallow_password_signin | [bool](#bool) | | Whether to disallow password signin. (Except workspace admins) || enable_metric_collection | [bool](#bool) | | Whether to enable metric collection for the workspace. |+| inactive_session_timeout | [google.protobuf.Duration](#google-protobuf-Duration) | | The session expiration time if not activity detected for the user. Value <= 0 means no limit. |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 2fa06019a9..c80825f119 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -13992,6 +13992,13 @@ For examples:<td><p>Whether to enable metric collection for the workspace. </p></td></tr>+ <tr>+ <td>inactive_session_timeout</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td></td>+ <td><p>The session expiration time if not activity detected for the user. Value <= 0 means no limit. </p></td>+ </tr>+</tbody></table>diff --git a/proto/store/store/setting.proto b/proto/store/store/setting.protoindex d28b82ac53..afd4945468 100644--- a/proto/store/store/setting.proto+++ b/proto/store/store/setting.proto@@ -65,6 +65,9 @@ message WorkspaceProfileSetting {// Whether to enable metric collection for the workspace.bool enable_metric_collection = 13;++ // The session expiration time if not activity detected for the user. Value <= 0 means no limit.+ google.protobuf.Duration inactive_session_timeout = 14;}message Announcement {diff --git a/proto/v1/v1/setting_service.proto b/proto/v1/v1/setting_service.protoindex f72bc6bd4d..fb38d808a5 100644--- a/proto/v1/v1/setting_service.proto+++ b/proto/v1/v1/setting_service.proto@@ -214,6 +214,9 @@ message WorkspaceProfileSetting {// Whether to enable metric collection for the workspace.bool enable_metric_collection = 13;++ // The session expiration time if not activity detected for the user. Value <= 0 means no limit.+ google.protobuf.Duration inactive_session_timeout = 14;}message Announcement {