Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: force to change the password (#13764)
ecmadao153239e50267
diff --git a/backend/api/v1/auth_service.go b/backend/api/v1/auth_service.goindex 12ad3589d4..fb8b96fef8 100644--- a/backend/api/v1/auth_service.go+++ b/backend/api/v1/auth_service.go@@ -3,6 +3,7 @@ package v1import ("context""fmt"+ "log/slog""net/mail""regexp""slices"@@ -18,9 +19,11 @@ import ("google.golang.org/grpc/metadata""google.golang.org/grpc/status""google.golang.org/protobuf/types/known/emptypb"+ "google.golang.org/protobuf/types/known/timestamppb""github.com/bytebase/bytebase/backend/api/auth""github.com/bytebase/bytebase/backend/common"+ "github.com/bytebase/bytebase/backend/common/log""github.com/bytebase/bytebase/backend/component/config""github.com/bytebase/bytebase/backend/component/iam""github.com/bytebase/bytebase/backend/component/state"@@ -258,31 +261,23 @@ func (s *AuthService) CreateUser(ctx context.Context, request *v1pb.CreateUserRe}func (s *AuthService) validatePassword(ctx context.Context, password string) error {- passwordSetting := &storepb.PasswordRestrictionSetting{- MinLength: 8,- }- setting, err := s.store.GetSettingV2(ctx, api.SettingPasswordRestriction)+ passwordRestriction, err := s.store.GetPasswordRestrictionSetting(ctx)if err != nil {- return status.Errorf(codes.Internal, "failed to get setting %v with error: %v", api.SettingPasswordRestriction, err)- }- if setting != nil {- if err := common.ProtojsonUnmarshaler.Unmarshal([]byte(setting.Value), passwordSetting); err != nil {- return status.Errorf(codes.Internal, "failed to unmarshal setting %v with error: %v", api.SettingPasswordRestriction, err)- }+ return status.Errorf(codes.Internal, "failed to get password restriction with error: %v", err)}- if len(password) < int(passwordSetting.MinLength) {- return status.Errorf(codes.InvalidArgument, "password length should no less than %v characters", passwordSetting.MinLength)+ if len(password) < int(passwordRestriction.MinLength) {+ return status.Errorf(codes.InvalidArgument, "password length should no less than %v characters", passwordRestriction.MinLength)}- if passwordSetting.RequireNumber && !regexp.MustCompile("[0-9]+").MatchString(password) {+ if passwordRestriction.RequireNumber && !regexp.MustCompile("[0-9]+").MatchString(password) {return status.Errorf(codes.InvalidArgument, "password must contains at least 1 number")}- if passwordSetting.RequireLetter && !regexp.MustCompile("[a-zA-Z]+").MatchString(password) {+ if passwordRestriction.RequireLetter && !regexp.MustCompile("[a-zA-Z]+").MatchString(password) {return status.Errorf(codes.InvalidArgument, "password must contains at least 1 lower case letter")}- if passwordSetting.RequireUppercaseLetter && !regexp.MustCompile("[A-Z]+").MatchString(password) {+ if passwordRestriction.RequireUppercaseLetter && !regexp.MustCompile("[A-Z]+").MatchString(password) {return status.Errorf(codes.InvalidArgument, "password must contains at least 1 upper case letter")}- if passwordSetting.RequireSpecialCharacter && !regexp.MustCompile(`[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]+`).MatchString(password) {+ if passwordRestriction.RequireSpecialCharacter && !regexp.MustCompile(`[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]+`).MatchString(password) {return status.Errorf(codes.InvalidArgument, "password must contains at least 1 special character")}return nil@@ -407,6 +402,11 @@ func (s *AuthService) UpdateUser(ctx context.Context, request *v1pb.UpdateUserRe}}if passwordPatch != nil {+ if err := bcrypt.CompareHashAndPassword([]byte(user.PasswordHash), []byte(*passwordPatch)); err == nil {+ // return bad request if the passwords match+ return nil, status.Errorf(codes.InvalidArgument, "password cannot be the same")+ }+passwordHash, err := bcrypt.GenerateFromPassword([]byte((*passwordPatch)), bcrypt.DefaultCost)if err != nil {return nil, status.Errorf(codes.Internal, "failed to generate password hash, error: %v", err)@@ -614,6 +614,44 @@ func convertToPrincipalType(userType v1pb.UserType) (api.PrincipalType, error) {return t, nil}+func (s *AuthService) needResetPassword(ctx context.Context, user *store.UserMessage) bool {+ // Reset password restriction only works for end user with email & password login.+ if user.Type != api.EndUser {+ return false+ }++ passwordRestriction, err := s.store.GetPasswordRestrictionSetting(ctx)+ if err != nil {+ slog.Error("failed to get password restriction", log.BBError(err))+ return false+ }++ if user.Profile.LastLoginTime == nil {+ if !passwordRestriction.RequireResetPasswordForFirstLogin {+ return false+ }+ count, err := s.store.CountUsers(ctx, api.EndUser)+ if err != nil {+ slog.Error("failed to count end users", log.BBError(err))+ return false+ }+ // The 1st workspace admin login don't need to reset the password+ return count > 1+ }++ if passwordRestriction.PasswordRotation != nil && passwordRestriction.PasswordRotation.GetNanos() > 0 {+ lastChangePasswordTime := user.CreatedTime+ if user.Profile.LastChangePasswordTime != nil {+ lastChangePasswordTime = user.Profile.LastChangePasswordTime.AsTime()+ }+ if lastChangePasswordTime.Add(time.Duration(passwordRestriction.PasswordRotation.GetNanos())).Before(time.Now()) {+ return true+ }+ }++ return false+}+// Login is the auth login method including SSO.func (s *AuthService) Login(ctx context.Context, request *v1pb.LoginRequest) (*v1pb.LoginResponse, error) {var loginUser *store.UserMessage@@ -623,15 +661,21 @@ func (s *AuthService) Login(ctx context.Context, request *v1pb.LoginRequest) (*v}loginViaIDP := request.GetIdpName() != ""+ response := &v1pb.LoginResponse{}if !mfaSecondLogin {var err errorif loginViaIDP {loginUser, err = s.getOrCreateUserWithIDP(ctx, request)+ if err != nil {+ return nil, err+ }} else {loginUser, err = s.getAndVerifyUser(ctx, request)- }- if err != nil {- return nil, err+ if err != nil {+ return nil, err+ }+ // Reset password restriction only works for end user with email & password login.+ response.RequireResetPassword = s.needResetPassword(ctx, loginUser)}} else {userID, err := auth.GetUserIDFromMFATempToken(*request.MfaTempToken, s.profile.Mode, s.secret)@@ -660,9 +704,6 @@ func (s *AuthService) Login(ctx context.Context, request *v1pb.LoginRequest) (*vloginUser = user}- if loginUser == nil {- return nil, invalidUserOrPasswordError- }if loginUser.MemberDeleted {return nil, status.Errorf(codes.Unauthenticated, "user has been deactivated by administrators")}@@ -702,19 +743,18 @@ func (s *AuthService) Login(ctx context.Context, request *v1pb.LoginRequest) (*v}, nil}- var accessToken stringif loginUser.Type == api.EndUser {token, err := auth.GenerateAccessToken(loginUser.Name, loginUser.ID, s.profile.Mode, s.secret, s.tokenDuration)if err != nil {return nil, status.Errorf(codes.Internal, "failed to generate API access token")}- accessToken = token+ response.Token = token} else if loginUser.Type == api.ServiceAccount {token, err := auth.GenerateAPIToken(loginUser.Name, loginUser.ID, s.profile.Mode, s.secret)if err != nil {return nil, status.Errorf(codes.Internal, "failed to generate API access token")}- accessToken = token+ response.Token = token} else {return nil, status.Errorf(codes.Unauthenticated, "user type %s cannot login", loginUser.Type)}@@ -730,7 +770,7 @@ func (s *AuthService) Login(ctx context.Context, request *v1pb.LoginRequest) (*vorigin = v}if err := grpc.SetHeader(ctx, metadata.New(map[string]string{- auth.GatewayMetadataAccessTokenKey: accessToken,+ auth.GatewayMetadataAccessTokenKey: response.Token,auth.GatewayMetadataUserIDKey: fmt.Sprintf("%d", loginUser.ID),auth.GatewayMetadataRequestOriginKey: origin,})); err != nil {@@ -738,6 +778,15 @@ func (s *AuthService) Login(ctx context.Context, request *v1pb.LoginRequest) (*v}}+ if _, err := s.store.UpdateUser(ctx, loginUser, &store.UpdateUserMessage{+ Profile: &storepb.UserProfile{+ LastLoginTime: timestamppb.Now(),+ LastChangePasswordTime: loginUser.Profile.GetLastChangePasswordTime(),+ },+ }, api.SystemBotID); err != nil {+ slog.Error("failed to update user profile", log.BBError(err), slog.String("user", loginUser.Email))+ }+s.metricReporter.Report(ctx, &metric.Metric{Name: metricapi.PrincipalLoginMetricName,Value: 1,@@ -745,9 +794,7 @@ func (s *AuthService) Login(ctx context.Context, request *v1pb.LoginRequest) (*v"email": loginUser.Email,},})- return &v1pb.LoginResponse{- Token: accessToken,- }, nil+ return response, nil}// Logout is the auth logout method.diff --git a/backend/server/init.go b/backend/server/init.goindex 77a33ec766..319b48dd7e 100644--- a/backend/server/init.go+++ b/backend/server/init.go@@ -243,20 +243,21 @@ func (s *Server) getInitSetting(ctx context.Context) (string, time.Duration, errreturn "", 0, err}- // Get token duration and external URL.- setting, err := s.store.GetSettingV2(ctx, api.SettingWorkspaceProfile)+ // Get token duration.+ workspaceProfile, err := s.store.GetWorkspaceGeneralSetting(ctx)if err != nil {return "", 0, err}+ passwordRestriction, err := s.store.GetPasswordRestrictionSetting(ctx)+ if err != nil {+ return "", 0, err+ }+tokenDuration := auth.DefaultTokenDuration- if setting != nil {- settingValue := new(storepb.WorkspaceProfileSetting)- if err := common.ProtojsonUnmarshaler.Unmarshal([]byte(setting.Value), settingValue); err != nil {- return "", 0, err- }- if settingValue.TokenDuration != nil && settingValue.TokenDuration.Seconds > 0 {- tokenDuration = settingValue.TokenDuration.AsDuration()- }+ if passwordRestriction.PasswordRotation != nil && passwordRestriction.PasswordRotation.GetSeconds() > 0 {+ tokenDuration = passwordRestriction.PasswordRotation.AsDuration()+ } else if workspaceProfile.TokenDuration != nil && workspaceProfile.TokenDuration.Seconds > 0 {+ tokenDuration = workspaceProfile.TokenDuration.AsDuration()}return secret, tokenDuration, nildiff --git a/backend/store/principal.go b/backend/store/principal.goindex 317bd36915..111dd7c7a3 100644--- a/backend/store/principal.go+++ b/backend/store/principal.go@@ -57,6 +57,8 @@ type UserMessage struct {Profile *storepb.UserProfile// Phone conforms E.164 format.Phone string+ // output only+ CreatedTime time.Time}// GetSystemBotUser gets the system bot.@@ -177,7 +179,8 @@ func listUserImpl(ctx context.Context, tx *Tx, find *FindUserMessage) ([]*UserMeprincipal.password_hash,principal.mfa_config,principal.phone,- principal.profile+ principal.profile,+ principal.created_tsFROM principalWHERE ` + strings.Join(where, " AND ")@@ -196,6 +199,7 @@ func listUserImpl(ctx context.Context, tx *Tx, find *FindUserMessage) ([]*UserMevar rowStatus stringvar mfaConfigBytes []bytevar profileBytes []byte+ var createdTs int64if err := rows.Scan(&userMessage.ID,&rowStatus,@@ -206,6 +210,7 @@ func listUserImpl(ctx context.Context, tx *Tx, find *FindUserMessage) ([]*UserMe&mfaConfigBytes,&userMessage.Phone,&profileBytes,+ &createdTs,); err != nil {return nil, err}@@ -221,6 +226,8 @@ func listUserImpl(ctx context.Context, tx *Tx, find *FindUserMessage) ([]*UserMereturn nil, err}userMessage.Profile = &profile+ userMessage.CreatedTime = time.Unix(createdTs, 0)+userMessages = append(userMessages, &userMessage)}if err := rows.Err(); err != nil {@@ -252,15 +259,16 @@ func (s *Store) CreateUser(ctx context.Context, create *UserMessage, creatorID i}var userID int+ var createdTs int64if err := tx.QueryRowContext(ctx, fmt.Sprintf(`INSERT INTO principal (%s)VALUES (%s)- RETURNING id+ RETURNING id, created_ts`, strings.Join(set, ","), strings.Join(placeholder, ",")),args...,- ).Scan(&userID); err != nil {+ ).Scan(&userID, &createdTs); err != nil {return nil, err}@@ -275,6 +283,9 @@ func (s *Store) CreateUser(ctx context.Context, create *UserMessage, creatorID iType: create.Type,PasswordHash: create.PasswordHash,Phone: create.Phone,+ CreatedTime: time.Unix(createdTs, 0),+ Profile: &storepb.UserProfile{},+ MFAConfig: &storepb.MFAConfig{},}s.userIDCache.Add(user.ID, user)s.userEmailCache.Add(user.Email, user)diff --git a/backend/store/setting.go b/backend/store/setting.goindex d79199d997..a2738b42e4 100644--- a/backend/store/setting.go+++ b/backend/store/setting.go@@ -36,6 +36,24 @@ type SettingMessage struct {CreatedTs int64}+func (s *Store) GetPasswordRestrictionSetting(ctx context.Context) (*storepb.PasswordRestrictionSetting, error) {+ passwordRestriction := &storepb.PasswordRestrictionSetting{+ MinLength: 8,+ }+ setting, err := s.GetSettingV2(ctx, api.SettingPasswordRestriction)+ if err != nil {+ return nil, err+ }+ if setting == nil {+ return passwordRestriction, nil+ }++ if err := common.ProtojsonUnmarshaler.Unmarshal([]byte(setting.Value), passwordRestriction); err != nil {+ return nil, err+ }+ return passwordRestriction, nil+}+func (s *Store) GetMaximumSQLResultLimit(ctx context.Context) int64 {setting, err := s.GetSettingV2(ctx, api.SettingSQLResultSizeLimit)if err != nil {diff --git a/frontend/src/App.vue b/frontend/src/App.vueindex 32f3c7a081..6cbca634ec 100644--- a/frontend/src/App.vue+++ b/frontend/src/App.vue@@ -46,6 +46,7 @@ import { onErrorCaptured, onMounted, watchEffect } from "vue";import { watch } from "vue";import { useRoute, useRouter } from "vue-router";import Watermark from "@/components/misc/Watermark.vue";+import { AUTH_PASSWORD_RESET_MODULE } from "@/router/auth";import { themeOverrides, dateLang, generalLang } from "../naive-ui.config";import { provideAppRootContext } from "./AppRootContext";import AuthContext from "./AuthContext.vue";@@ -98,6 +99,12 @@ onMounted(async () => {await initBasicModules();actuatorStore.initialized = true;++ if (authStore.requireResetPassword) {+ router.replace({+ name: AUTH_PASSWORD_RESET_MODULE,+ });+ }});watchEffect(async () => {diff --git a/frontend/src/components/GeneralSetting/PasswordRestrictionSetting.vue b/frontend/src/components/GeneralSetting/PasswordRestrictionSetting.vueindex 9823553374..3c6192b62b 100644--- a/frontend/src/components/GeneralSetting/PasswordRestrictionSetting.vue+++ b/frontend/src/components/GeneralSetting/PasswordRestrictionSetting.vue@@ -11,7 +11,7 @@:value="passwordRestrictionSetting.minLength":readonly="!allowEdit"class="w-24"- :min="DEFAULT_MIN_LENGTH"+ :min="1":placeholder="'Minimum length'":precision="0"@update:value="@@ -21,7 +21,7 @@<span class="textlabel">{{$t("settings.general.workspace.password-restriction.min-length", {- min: DEFAULT_MIN_LENGTH,+ min: passwordRestrictionSetting.minLength || DEFAULT_MIN_LENGTH,})}}</span>@@ -90,6 +90,76 @@}}</span></NCheckbox>+ <NCheckbox+ :checked="passwordRestrictionSetting.requireResetPasswordForFirstLogin"+ :readonly="!allowEdit"+ @update:checked="+ (val) => {+ onUpdate({ requireResetPasswordForFirstLogin: val });+ }+ "+ >+ <span class="textlabel">+ {{+ $t(+ "settings.general.workspace.password-restriction.require-reset-password-for-first-login"+ )+ }}+ </span>+ </NCheckbox>+ <NCheckbox+ :checked="!!passwordRestrictionSetting.passwordRotation"+ :readonly="!allowEdit"+ class="!flex !items-center"+ @update:checked="+ (checked) => {+ onUpdate({+ passwordRotation: checked+ ? Duration.fromPartial({+ seconds: 7 * 24 * 60 * 60 /* default 7 days */,+ nanos: 0,+ })+ : undefined,+ });+ }+ "+ >+ <i18n-t+ tag="div"+ keypath="settings.general.workspace.password-restriction.password-rotation"+ class="flex items-center space-x-2 textlabel"+ >+ <template #day>+ <NInputNumber+ v-if="passwordRestrictionSetting.passwordRotation"+ :value="+ Number(+ passwordRestrictionSetting.passwordRotation.seconds.divide(+ 24 * 60 * 60+ )+ )+ "+ :readonly="!allowEdit"+ :min="1"+ class="w-24 mx-2"+ :size="'small'"+ :placeholder="'Minimum length'"+ :precision="0"+ @update:value="+ (val) =>+ val &&+ onUpdate({+ passwordRotation: Duration.fromPartial({+ seconds: val * 24 * 60 * 60,+ nanos: 0,+ }),+ })+ "+ />+ <span v-else class="mx-1">N</span>+ </template>+ </i18n-t>+ </NCheckbox></div></div></template>@@ -100,6 +170,7 @@ import { computed } from "vue";import { useI18n } from "vue-i18n";import { pushNotification } from "@/store";import { useSettingV1Store } from "@/store/modules/v1/setting";+import { Duration } from "@/types/proto/google/protobuf/duration";import { PasswordRestrictionSetting } from "@/types/proto/v1/setting_service";const DEFAULT_MIN_LENGTH = 8;diff --git a/frontend/src/components/PasswordSigninForm.vue b/frontend/src/components/PasswordSigninForm.vueindex e9865d6ee0..01789ab776 100644--- a/frontend/src/components/PasswordSigninForm.vue+++ b/frontend/src/components/PasswordSigninForm.vue@@ -89,7 +89,7 @@ import { NButton } from "naive-ui";import { computed, reactive } from "vue";import { useRoute, useRouter } from "vue-router";import { BBTextField } from "@/bbkit";-import { AUTH_MFA_MODULE } from "@/router/auth";+import { AUTH_PASSWORD_RESET_MODULE } from "@/router/auth";import { useAuthStore } from "@/store";interface LocalState {@@ -129,23 +129,18 @@ const allowSignin = computed(() => {return state.email && state.password;});-const trySignin = async (idpName?: string) => {+const trySignin = async () => {if (state.isLoading) return;state.isLoading = true;try {- const mfaTempToken = await authStore.login({+ const { requireResetPassword } = await authStore.login({email: state.email,password: state.password,web: true,- idpName: idpName,});- if (mfaTempToken) {+ if (requireResetPassword) {router.push({- name: AUTH_MFA_MODULE,- query: {- mfaTempToken,- redirect: route.query.redirect as string,- },+ name: AUTH_PASSWORD_RESET_MODULE,});} else {router.push("/");diff --git a/frontend/src/components/ProvideDashboardContext.vue b/frontend/src/components/ProvideDashboardContext.vueindex 85cab17d90..280f056ec3 100644--- a/frontend/src/components/ProvideDashboardContext.vue+++ b/frontend/src/components/ProvideDashboardContext.vue@@ -18,6 +18,7 @@ import { useRoute, useRouter } from "vue-router";import {AUTH_MFA_MODULE,AUTH_PASSWORD_FORGOT_MODULE,+ AUTH_PASSWORD_RESET_MODULE,AUTH_SIGNIN_ADMIN_MODULE,AUTH_SIGNIN_MODULE,AUTH_SIGNUP_MODULE,@@ -82,7 +83,8 @@ onMounted(async () => {to.name === AUTH_SIGNIN_ADMIN_MODULE ||to.name === AUTH_SIGNUP_MODULE ||to.name === AUTH_MFA_MODULE ||- to.name === AUTH_PASSWORD_FORGOT_MODULE+ to.name === AUTH_PASSWORD_FORGOT_MODULE ||+ to.name === AUTH_PASSWORD_RESET_MODULE) {next();return;diff --git a/frontend/src/components/User/Settings/CreateUserDrawer.vue b/frontend/src/components/User/Settings/CreateUserDrawer.vueindex 462f0b650f..a868091fdb 100644--- a/frontend/src/components/User/Settings/CreateUserDrawer.vue+++ b/frontend/src/components/User/Settings/CreateUserDrawer.vue@@ -79,48 +79,12 @@/></div></NFormItem>- <NFormItem :label="$t('settings.profile.password')">- <div class="w-full space-y-1">- <span- :class="[- 'textinfolabel text-sm',- passwordHint ? '!text-error' : '',- ]"- >- {{ $t("settings.profile.password-hint") }}- <LearnMoreLink- :external="false"- url="/setting/general#account"- />- </span>- <NInput- v-model:value="state.user.password"- type="password"- :status="passwordHint ? 'error' : undefined"- :input-props="{ autocomplete: 'new-password' }"- :placeholder="$t('common.sensitive-placeholder')"- />- </div>- </NFormItem>- <NFormItem :label="$t('settings.profile.password-confirm')">- <div class="w-full flex flex-col justify-start items-start">- <NInput- v-model:value="state.passwordConfirm"- type="password"- :status="passwordMismatch ? 'error' : undefined"- :input-props="{ autocomplete: 'new-password' }"- :placeholder="- $t('settings.profile.password-confirm-placeholder')- "- />- <span- v-if="passwordMismatch"- class="text-error text-sm mt-1 pl-1"- >- {{ $t("settings.profile.password-mismatch") }}- </span>- </div>- </NFormItem>++ <UserPassword+ ref="userPasswordRef"+ v-model:password="state.user.password"+ v-model:password-confirm="state.passwordConfirm"+ /></template></NForm></template>@@ -187,10 +151,9 @@ import {NRadioGroup,NRadio,} from "naive-ui";-import { computed, reactive } from "vue";+import { computed, reactive, ref } from "vue";import { useI18n } from "vue-i18n";import EmailInput from "@/components/EmailInput.vue";-import LearnMoreLink from "@/components/LearnMoreLink.vue";import { Drawer, DrawerContent } from "@/components/v2";import { RoleSelect } from "@/components/v2/Select";import {@@ -208,8 +171,8 @@ import {User,} from "@/types/proto/v1/auth_service";import { State } from "@/types/proto/v1/common";-import { PasswordRestrictionSetting } from "@/types/proto/v1/setting_service";import { randomString } from "@/utils";+import UserPassword from "./UserPassword.vue";interface LocalState {isRequesting: boolean;@@ -247,6 +210,7 @@ const initUser = () => {const { t } = useI18n();const settingV1Store = useSettingV1Store();const userStore = useUserStore();+const userPasswordRef = ref<InstanceType<typeof UserPassword>>();const hideServiceAccount = useAppFeature("bb.feature.members.hide-service-account"@@ -266,55 +230,8 @@ const workspaceDomain = computed(() => {return head(settingV1Store.workspaceProfileSetting?.domains);});-const passwordRestrictionSetting = computed(- () =>- settingV1Store.getSettingByName("bb.workspace.password-restriction")?.value- ?.passwordRestrictionSetting ?? PasswordRestrictionSetting.fromPartial({})-);-const isCreating = computed(() => !props.user);-const passwordHint = computed(() => {- const pwd = state.user?.password ?? "";- if (!pwd) {- return false;- }- if (pwd.length < passwordRestrictionSetting.value.minLength) {- return true;- }- if (passwordRestrictionSetting.value.requireNumber && !/[0-9]+/.test(pwd)) {- return true;- }- if (- passwordRestrictionSetting.value.requireLetter &&- !/[a-zA-Z]+/.test(pwd)- ) {- return true;- }- if (- passwordRestrictionSetting.value.requireUppercaseLetter &&- !/[A-Z]+/.test(pwd)- ) {- return true;- }- if (- passwordRestrictionSetting.value.requireSpecialCharacter &&- // eslint-disable-next-line no-useless-escape- !/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]+/.test(pwd)- ) {- return true;- }- return false;-});--const passwordMismatch = computed(() => {- const pwd = state.user?.password ?? "";- if (!pwd) {- return false;- }- return pwd !== state.passwordConfirm;-});-const rolesChanged = computed(() => {if (isCreating.value) {return true;@@ -327,10 +244,10 @@ const allowConfirm = computed(() => {if (!state.user.email) {return false;}- if (passwordHint.value) {+ if (userPasswordRef.value?.passwordHint) {return false;}- if (passwordMismatch.value) {+ if (userPasswordRef.value?.passwordMismatch) {return false;}@@ -397,12 +314,14 @@ const tryCreateOrUpdateUser = async () => {state.user.password ||randomString(10) + randomString(10, "0123456789"),});- await workspaceStore.patchIamPolicy([- {- member: `user:${createdUser.email}`,- roles: state.roles,- },- ]);+ if (state.roles.length > 0) {+ await workspaceStore.patchIamPolicy([+ {+ member: `user:${createdUser.email}`,+ roles: state.roles,+ },+ ]);+ }pushNotification({module: "bytebase",style: "SUCCESS",diff --git a/frontend/src/components/User/Settings/UserPassword.vue b/frontend/src/components/User/Settings/UserPassword.vuenew file mode 100644index 0000000000..b5c4292ddf--- /dev/null+++ b/frontend/src/components/User/Settings/UserPassword.vue@@ -0,0 +1,169 @@+<template>+ <div v-bind="$attrs">+ <NFormItem :label="$t('settings.profile.password')">+ <div class="w-full space-y-1">+ <span+ :class="[+ 'flex items-center gap-x-1 textinfolabel text-sm',+ passwordHint ? '!text-error' : '',+ ]"+ >+ {{ $t("settings.profile.password-hint") }}+ <NTooltip>+ <template #trigger>+ <CircleHelpIcon class="w-4" />+ </template>+ <component :is="passwordRestrictionText" class="text-sm" />+ </NTooltip>+ <LearnMoreLink+ v-if="showLearnMore"+ :external="false"+ url="/setting/general#account"+ />+ </span>+ <NInput+ :value="password"+ type="password"+ :status="passwordHint ? 'error' : undefined"+ :input-props="{ autocomplete: 'new-password' }"+ :placeholder="$t('common.sensitive-placeholder')"+ @update:value="$emit('update:password', $event)"+ />+ </div>+ </NFormItem>+ <NFormItem :label="$t('settings.profile.password-confirm')">+ <div class="w-full flex flex-col justify-start items-start">+ <NInput+ :value="passwordConfirm"+ type="password"+ :status="passwordMismatch ? 'error' : undefined"+ :input-props="{ autocomplete: 'new-password' }"+ :placeholder="$t('settings.profile.password-confirm-placeholder')"+ @update:value="$emit('update:passwordConfirm', $event)"+ />+ <span v-if="passwordMismatch" class="text-error text-sm mt-1 pl-1">+ {{ $t("settings.profile.password-mismatch") }}+ </span>+ </div>+ </NFormItem>+ </div>+</template>++<script lang="tsx" setup>+import { CircleHelpIcon } from "lucide-vue-next";+import { NFormItem, NInput, NTooltip } from "naive-ui";+import { computed } from "vue";+import { useI18n } from "vue-i18n";+import LearnMoreLink from "@/components/LearnMoreLink.vue";+import { useSettingV1Store } from "@/store";+import { PasswordRestrictionSetting } from "@/types/proto/v1/setting_service";++const props = withDefaults(+ defineProps<{+ password: string;+ passwordConfirm: string;+ showLearnMore?: boolean;+ }>(),+ {+ showLearnMore: true,+ }+);++defineEmits<{+ (event: "update:password", password: string): void;+ (event: "update:passwordConfirm", passwordConfirm: string): void;+}>();++const { t } = useI18n();+const settingV1Store = useSettingV1Store();++const passwordRestrictionSetting = computed(+ () =>+ settingV1Store.getSettingByName("bb.workspace.password-restriction")?.value+ ?.passwordRestrictionSetting ?? PasswordRestrictionSetting.fromPartial({})+);++const passwordRestrictionText = computed(() => {+ const text = [+ t("settings.general.workspace.password-restriction.min-length", {+ min: passwordRestrictionSetting.value.minLength,+ }),+ ];+ if (passwordRestrictionSetting.value.requireNumber) {+ text.push(+ t("settings.general.workspace.password-restriction.require-number")+ );+ }+ if (passwordRestrictionSetting.value.requireUppercaseLetter) {+ text.push(+ t(+ "settings.general.workspace.password-restriction.require-uppercase-letter"+ )+ );+ } else if (passwordRestrictionSetting.value.requireLetter) {+ text.push(+ t("settings.general.workspace.password-restriction.require-letter")+ );+ }+ if (passwordRestrictionSetting.value.requireSpecialCharacter) {+ text.push(+ t(+ "settings.general.workspace.password-restriction.require-special-character"+ )+ );+ }++ return (+ <ul class="list-disc px-2">+ {text.map((t, i) => (+ <li key={i}>{t}</li>+ ))}+ </ul>+ );+});++const passwordHint = computed(() => {+ const pwd = props.password;+ if (!pwd) {+ return false;+ }+ if (pwd.length < passwordRestrictionSetting.value.minLength) {+ return true;+ }+ if (passwordRestrictionSetting.value.requireNumber && !/[0-9]+/.test(pwd)) {+ return true;+ }+ if (+ passwordRestrictionSetting.value.requireLetter &&+ !/[a-zA-Z]+/.test(pwd)+ ) {+ return true;+ }+ if (+ passwordRestrictionSetting.value.requireUppercaseLetter &&+ !/[A-Z]+/.test(pwd)+ ) {+ return true;+ }+ if (+ passwordRestrictionSetting.value.requireSpecialCharacter &&+ // eslint-disable-next-line no-useless-escape+ !/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]+/.test(pwd)+ ) {+ return true;+ }+ return false;+});++const passwordMismatch = computed(() => {+ if (!props.password) {+ return false;+ }+ return props.password !== props.passwordConfirm;+});++defineExpose({+ passwordHint,+ passwordMismatch,+});+</script>diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex f5428f66c5..d7b0b8cdb7 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -491,7 +491,7 @@"phone-tips": "Be sure to include the country code","country-code": "Country Code","password": "Password",- "password-hint": "Password should follow restriction setting.",+ "password-hint": "Password should follow restriction setting","password-confirm": "Password Confirm","password-confirm-placeholder": "Confirm new password","password-mismatch": "New password mismatch",@@ -718,11 +718,13 @@},"password-restriction": {"self": "Password Restriction",- "min-length": "Minimum length for password, should no less than {min} characters",- "require-number": "Requires the password must contains at least one number",- "require-letter": "Requires the password must contains at least one letter, regardless of upper case or lower case",- "require-uppercase-letter": "Requires the password must contains at least one upper case letter",- "require-special-character": "Requires the password must contains at least one special character"+ "min-length": "Minimum length for password should no less than {min} characters",+ "require-number": "The password must contain at least one number",+ "require-letter": "The password must contain at least one letter, regardless of upper case or lower case",+ "require-uppercase-letter": "The password must contain at least one upper case letter",+ "require-special-character": "The password must contain at least one special character",+ "require-reset-password-for-first-login": "Require users reset their password after the 1st time login",+ "password-rotation": "Require users reset their password every {day} days"},"config-updated": "Configuration is updated.","ai-assistant": {diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex af0c5f025e..33b5b3d3c6 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -491,7 +491,7 @@"phone-tips": "Asegúrese de incluir el código del país.","country-code": "Códigos de país y de área","password": "Contraseña",- "password-hint": "La contraseña debe seguir la configuración de restricción.",+ "password-hint": "La contraseña debe seguir la configuración de restricción","password-confirm": "Confirmar contraseña","password-confirm-placeholder": "Confirmar nueva contraseña","password-mismatch": "Nueva contraseña no coincide",@@ -722,7 +722,9 @@"require-number": "Requiere que la contraseña contenga al menos un número","require-letter": "Requiere que la contraseña contenga al menos una letra, independientemente de si es mayúscula o minúscula.","require-uppercase-letter": "Requiere que la contraseña contenga al menos una letra mayúscula",- "require-special-character": "Requiere que la contraseña contenga al menos un carácter especial"+ "require-special-character": "Requiere que la contraseña contenga al menos un carácter especial",+ "require-reset-password-for-first-login": "Requerir que los usuarios restablezcan su contraseña después del primer inicio de sesión",+ "password-rotation": "Requerir que los usuarios restablezcan su contraseña cada {day} días"},"config-updated": "La configuración se ha actualizado.","ai-assistant": {@@ -3737,4 +3739,4 @@},"self": "Configuración"}-}\ No newline at end of file+}diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex b690d0f7f1..4a9635028e 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -491,7 +491,7 @@"phone-tips": "国コードを必ず含めてください","country-code": "国または地域コード","password": "パスワード",- "password-hint": "パスワードは制限設定に従う必要があります。",+ "password-hint": "パスワードは制限設定に従う必要があります","password-confirm": "パスワードの確認","password-confirm-placeholder": "新しいパスワードを確認します","password-mismatch": "新しいパスワードが一致しません",@@ -722,7 +722,9 @@"require-number": "パスワードには少なくとも1つの数字が含まれている必要があります","require-letter": "パスワードには大文字、小文字に関係なく少なくとも1文字が含まれている必要があります","require-uppercase-letter": "パスワードには少なくとも1つの大文字が含まれている必要があります",- "require-special-character": "パスワードには少なくとも1つの特殊文字が含まれている必要があります"+ "require-special-character": "パスワードには少なくとも1つの特殊文字が含まれている必要があります",+ "require-reset-password-for-first-login": "初回ログイン後にユーザーにパスワードのリセットを要求する",+ "password-rotation": "ユーザーに{day}日ごとにパスワードのリセットを要求する"},"config-updated": "構成が更新されました。","ai-assistant": {@@ -3737,4 +3739,4 @@},"self": "設定"}-}\ No newline at end of file+}diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex 1c6ce69df7..f7f56e9ace 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -491,7 +491,7 @@"phone-tips": "请包含国家代码前缀","country-code": "国家或地区代码","password": "密码",- "password-hint": "密码应遵循限制设置。",+ "password-hint": "密码应遵循限制设置","password-confirm": "确认密码","password-confirm-placeholder": "确认新密码","password-mismatch": "新密码不匹配",@@ -718,11 +718,13 @@},"password-restriction": {"self": "密码限制",- "min-length": "密码最小长度,不得少于 {min} 个字符",- "require-number": "要求密码必须至少包含一个数字",- "require-letter": "要求密码必须至少包含一个字母(不区分大小写)",- "require-uppercase-letter": "要求密码必须至少包含一个大写字母",- "require-special-character": "要求密码必须至少包含一个特殊字符"+ "min-length": "密码最小长度不得少于 {min} 个字符",+ "require-number": "密码必须至少包含一个数字",+ "require-letter": "密码必须至少包含一个字母(不区分大小写)",+ "require-uppercase-letter": "密码必须至少包含一个大写字母",+ "require-special-character": "密码必须至少包含一个特殊字符",+ "require-reset-password-for-first-login": "要求用户在首次登录后重置密码",+ "password-rotation": "要求用户每 {day} 天重置一次密码"},"config-updated": "配置已更新。","ai-assistant": {diff --git a/frontend/src/router/auth.ts b/frontend/src/router/auth.tsindex 925d7fa374..a770596876 100644--- a/frontend/src/router/auth.ts+++ b/frontend/src/router/auth.ts@@ -6,6 +6,7 @@ export const AUTH_SIGNIN_MODULE = "auth.signin";export const AUTH_SIGNIN_ADMIN_MODULE = "auth.signin.admin";export const AUTH_SIGNUP_MODULE = "auth.signup";export const AUTH_MFA_MODULE = "auth.mfa";+export const AUTH_PASSWORD_RESET_MODULE = "auth.password.reset";export const AUTH_PASSWORD_FORGOT_MODULE = "auth.password.forgot";export const AUTH_OAUTH_CALLBACK_MODULE = "auth.oauth.callback";export const AUTH_OIDC_CALLBACK_MODULE = "auth.oidc.callback";@@ -42,6 +43,12 @@ const authRoutes: RouteRecordRaw[] = [meta: { title: () => `${t("auth.password-forgot")}` },component: () => import("@/views/auth/PasswordForgot.vue"),},+ {+ path: "password-reset",+ name: AUTH_PASSWORD_RESET_MODULE,+ meta: { title: () => `${t("auth.password-reset.title")}` },+ component: () => import("@/views/auth/PasswordReset.vue"),+ },{path: "mfa",name: AUTH_MFA_MODULE,diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.tsindex 2a904d9db1..c70e7daed1 100644--- a/frontend/src/router/index.ts+++ b/frontend/src/router/index.ts@@ -19,6 +19,7 @@ import authRoutes, {AUTH_OAUTH_CALLBACK_MODULE,AUTH_OIDC_CALLBACK_MODULE,AUTH_PASSWORD_FORGOT_MODULE,+ AUTH_PASSWORD_RESET_MODULE,AUTH_SIGNIN_ADMIN_MODULE,AUTH_SIGNIN_MODULE,AUTH_SIGNUP_MODULE,@@ -193,7 +194,8 @@ router.beforeEach((to, from, next) => {to.name?.toString().startsWith("sql-editor") ||to.name?.toString().startsWith(SETTING_ROUTE) ||to.name?.toString().startsWith("workspace") ||- to.name?.toString().startsWith("setup")+ to.name?.toString().startsWith("setup") ||+ to.name === AUTH_PASSWORD_RESET_MODULE) {next();return;diff --git a/frontend/src/store/modules/auth.ts b/frontend/src/store/modules/auth.tsindex be791730b0..f615884aae 100644--- a/frontend/src/store/modules/auth.ts+++ b/frontend/src/store/modules/auth.ts@@ -1,14 +1,12 @@+import { useLocalStorage } from "@vueuse/core";import axios from "axios";import { defineStore } from "pinia";import { computed, ref } from "vue";import { restartAppRoot } from "@/AppRootContext";import { authServiceClient } from "@/grpcweb";import { unknownUser } from "@/types";-import type {- LoginRequest,- LoginResponse,- User,-} from "@/types/proto/v1/auth_service";+import type { LoginRequest, User } from "@/types/proto/v1/auth_service";+import { LoginResponse } from "@/types/proto/v1/auth_service";import { UserType } from "@/types/proto/v1/auth_service";import { getIntCookie } from "@/utils";import { useUserStore } from ".";@@ -32,15 +30,38 @@ export const useAuthStore = defineStore("auth_v1", () => {return getIntCookie("user");};- const login = async (request: Partial<LoginRequest>) => {- const {- data: { mfaTempToken },- } = await axios.post<LoginResponse>("/v1/auth/login", request);- if (mfaTempToken) {- return mfaTempToken;+ const requireResetPassword = computed(() => {+ if (!currentUserId.value) {+ return false;+ }+ return useLocalStorage<boolean>(+ `${currentUserId.value}.require_reset_password`,+ false+ ).value;+ });++ const setRequireResetPassword = (requireResetPassword: boolean) => {+ if (currentUserId.value) {+ const needResetPasswordCache = useLocalStorage<boolean>(+ `${currentUserId.value}.require_reset_password`,+ false+ );+ needResetPasswordCache.value = requireResetPassword;+ }+ };++ const login = async (+ request: Partial<LoginRequest>+ ): Promise<LoginResponse> => {+ const { data } = await axios.post<LoginResponse>("/v1/auth/login", request);+ if (data.mfaTempToken) {+ return data;}await restoreUser();+ setRequireResetPassword(data.requireResetPassword);++ return data;};const signup = async (request: Partial<User>) => {@@ -99,6 +120,8 @@ export const useAuthStore = defineStore("auth_v1", () => {logout,restoreUser,refreshUserIfNeeded,+ requireResetPassword,+ setRequireResetPassword,};});diff --git a/frontend/src/types/proto/store/setting.ts b/frontend/src/types/proto/store/setting.tsindex 3e58d1e33f..35598c4414 100644--- a/frontend/src/types/proto/store/setting.ts+++ b/frontend/src/types/proto/store/setting.ts@@ -641,8 +641,8 @@ export interface PasswordRestrictionSetting {requireSpecialCharacter: boolean;/** require_reset_password_for_first_login requires users to reset their password after the 1st login. */requireResetPasswordForFirstLogin: boolean;- /** rotation_days requires users to reset their password after n days. */- rotationDays?: number | undefined;+ /** password_rotation requires users to reset their password after the duration. */+ passwordRotation: Duration | undefined;}function createBaseWorkspaceProfileSetting(): WorkspaceProfileSetting {@@ -3923,7 +3923,7 @@ function createBasePasswordRestrictionSetting(): PasswordRestrictionSetting {requireUppercaseLetter: false,requireSpecialCharacter: false,requireResetPasswordForFirstLogin: false,- rotationDays: undefined,+ passwordRotation: undefined,};}@@ -3947,8 +3947,8 @@ export const PasswordRestrictionSetting = {if (message.requireResetPasswordForFirstLogin === true) {writer.uint32(48).bool(message.requireResetPasswordForFirstLogin);}- if (message.rotationDays !== undefined) {- writer.uint32(56).int32(message.rotationDays);+ if (message.passwordRotation !== undefined) {+ Duration.encode(message.passwordRotation, writer.uint32(58).fork()).ldelim();}return writer;},@@ -4003,11 +4003,11 @@ export const PasswordRestrictionSetting = {message.requireResetPasswordForFirstLogin = reader.bool();continue;case 7:- if (tag !== 56) {+ if (tag !== 58) {break;}- message.rotationDays = reader.int32();+ message.passwordRotation = Duration.decode(reader, reader.uint32());continue;}if ((tag & 7) === 4 || tag === 0) {@@ -4032,7 +4032,7 @@ export const PasswordRestrictionSetting = {requireResetPasswordForFirstLogin: isSet(object.requireResetPasswordForFirstLogin)? globalThis.Boolean(object.requireResetPasswordForFirstLogin): false,- rotationDays: isSet(object.rotationDays) ? globalThis.Number(object.rotationDays) : undefined,+ passwordRotation: isSet(object.passwordRotation) ? Duration.fromJSON(object.passwordRotation) : undefined,};},@@ -4056,8 +4056,8 @@ export const PasswordRestrictionSetting = {if (message.requireResetPasswordForFirstLogin === true) {obj.requireResetPasswordForFirstLogin = message.requireResetPasswordForFirstLogin;}- if (message.rotationDays !== undefined) {- obj.rotationDays = Math.round(message.rotationDays);+ if (message.passwordRotation !== undefined) {+ obj.passwordRotation = Duration.toJSON(message.passwordRotation);}return obj;},@@ -4073,7 +4073,9 @@ export const PasswordRestrictionSetting = {message.requireUppercaseLetter = object.requireUppercaseLetter ?? false;message.requireSpecialCharacter = object.requireSpecialCharacter ?? false;message.requireResetPasswordForFirstLogin = object.requireResetPasswordForFirstLogin ?? false;- message.rotationDays = object.rotationDays ?? undefined;+ message.passwordRotation = (object.passwordRotation !== undefined && object.passwordRotation !== null)+ ? Duration.fromPartial(object.passwordRotation)+ : undefined;return message;},};diff --git a/frontend/src/types/proto/v1/auth_service.ts b/frontend/src/types/proto/v1/auth_service.tsindex a37e7e37e0..29d93dd088 100644--- a/frontend/src/types/proto/v1/auth_service.ts+++ b/frontend/src/types/proto/v1/auth_service.ts@@ -195,6 +195,7 @@ export interface OIDCIdentityProviderContext {export interface LoginResponse {token: string;mfaTempToken?: string | undefined;+ requireResetPassword: boolean;}export interface LogoutRequest {@@ -1101,7 +1102,7 @@ export const OIDCIdentityProviderContext = {};function createBaseLoginResponse(): LoginResponse {- return { token: "", mfaTempToken: undefined };+ return { token: "", mfaTempToken: undefined, requireResetPassword: false };}export const LoginResponse = {@@ -1112,6 +1113,9 @@ export const LoginResponse = {if (message.mfaTempToken !== undefined) {writer.uint32(18).string(message.mfaTempToken);}+ if (message.requireResetPassword === true) {+ writer.uint32(24).bool(message.requireResetPassword);+ }return writer;},@@ -1136,6 +1140,13 @@ export const LoginResponse = {message.mfaTempToken = reader.string();continue;+ case 3:+ if (tag !== 24) {+ break;+ }++ message.requireResetPassword = reader.bool();+ continue;}if ((tag & 7) === 4 || tag === 0) {break;@@ -1149,6 +1160,9 @@ export const LoginResponse = {return {token: isSet(object.token) ? globalThis.String(object.token) : "",mfaTempToken: isSet(object.mfaTempToken) ? globalThis.String(object.mfaTempToken) : undefined,+ requireResetPassword: isSet(object.requireResetPassword)+ ? globalThis.Boolean(object.requireResetPassword)+ : false,};},@@ -1160,6 +1174,9 @@ export const LoginResponse = {if (message.mfaTempToken !== undefined) {obj.mfaTempToken = message.mfaTempToken;}+ if (message.requireResetPassword === true) {+ obj.requireResetPassword = message.requireResetPassword;+ }return obj;},@@ -1170,6 +1187,7 @@ export const LoginResponse = {const message = createBaseLoginResponse();message.token = object.token ?? "";message.mfaTempToken = object.mfaTempToken ?? undefined;+ message.requireResetPassword = object.requireResetPassword ?? false;return message;},};diff --git a/frontend/src/types/proto/v1/setting_service.ts b/frontend/src/types/proto/v1/setting_service.tsindex 28045202b2..8ef09a1699 100644--- a/frontend/src/types/proto/v1/setting_service.ts+++ b/frontend/src/types/proto/v1/setting_service.ts@@ -734,8 +734,8 @@ export interface PasswordRestrictionSetting {requireSpecialCharacter: boolean;/** require_reset_password_for_first_login requires users to reset their password after the 1st login. */requireResetPasswordForFirstLogin: boolean;- /** rotation_days requires users to reset their password after n days. */- rotationDays?: number | undefined;+ /** password_rotation requires users to reset their password after the duration. */+ passwordRotation: Duration | undefined;}function createBaseListSettingsRequest(): ListSettingsRequest {@@ -4874,7 +4874,7 @@ function createBasePasswordRestrictionSetting(): PasswordRestrictionSetting {requireUppercaseLetter: false,requireSpecialCharacter: false,requireResetPasswordForFirstLogin: false,- rotationDays: undefined,+ passwordRotation: undefined,};}@@ -4898,8 +4898,8 @@ export const PasswordRestrictionSetting = {if (message.requireResetPasswordForFirstLogin === true) {writer.uint32(48).bool(message.requireResetPasswordForFirstLogin);}- if (message.rotationDays !== undefined) {- writer.uint32(56).int32(message.rotationDays);+ if (message.passwordRotation !== undefined) {+ Duration.encode(message.passwordRotation, writer.uint32(58).fork()).ldelim();}return writer;},@@ -4954,11 +4954,11 @@ export const PasswordRestrictionSetting = {message.requireResetPasswordForFirstLogin = reader.bool();continue;case 7:- if (tag !== 56) {+ if (tag !== 58) {break;}- message.rotationDays = reader.int32();+ message.passwordRotation = Duration.decode(reader, reader.uint32());continue;}if ((tag & 7) === 4 || tag === 0) {@@ -4983,7 +4983,7 @@ export const PasswordRestrictionSetting = {requireResetPasswordForFirstLogin: isSet(object.requireResetPasswordForFirstLogin)? globalThis.Boolean(object.requireResetPasswordForFirstLogin): false,- rotationDays: isSet(object.rotationDays) ? globalThis.Number(object.rotationDays) : undefined,+ passwordRotation: isSet(object.passwordRotation) ? Duration.fromJSON(object.passwordRotation) : undefined,};},@@ -5007,8 +5007,8 @@ export const PasswordRestrictionSetting = {if (message.requireResetPasswordForFirstLogin === true) {obj.requireResetPasswordForFirstLogin = message.requireResetPasswordForFirstLogin;}- if (message.rotationDays !== undefined) {- obj.rotationDays = Math.round(message.rotationDays);+ if (message.passwordRotation !== undefined) {+ obj.passwordRotation = Duration.toJSON(message.passwordRotation);}return obj;},@@ -5024,7 +5024,9 @@ export const PasswordRestrictionSetting = {message.requireUppercaseLetter = object.requireUppercaseLetter ?? false;message.requireSpecialCharacter = object.requireSpecialCharacter ?? false;message.requireResetPasswordForFirstLogin = object.requireResetPasswordForFirstLogin ?? false;- message.rotationDays = object.rotationDays ?? undefined;+ message.passwordRotation = (object.passwordRotation !== undefined && object.passwordRotation !== null)+ ? Duration.fromPartial(object.passwordRotation)+ : undefined;return message;},};diff --git a/frontend/src/views/OAuthCallback.vue b/frontend/src/views/OAuthCallback.vueindex c291e7205c..0150fbd101 100644--- a/frontend/src/views/OAuthCallback.vue+++ b/frontend/src/views/OAuthCallback.vue@@ -86,7 +86,7 @@ const triggerAuthCallback = async () => {);window.close();} else {- const mfaTempToken = await authStore.login({+ const { mfaTempToken } = await authStore.login({idpName: eventName.split(".").pop()!,idpContext: {oauth2Context: {diff --git a/frontend/src/views/ProfileDashboard.vue b/frontend/src/views/ProfileDashboard.vueindex 4d04e8250c..e56847d623 100644--- a/frontend/src/views/ProfileDashboard.vue+++ b/frontend/src/views/ProfileDashboard.vue@@ -131,44 +131,14 @@</dd></div>- <template v-if="state.editing">- <div class="sm:col-span-1">- <dt class="text-sm font-medium text-control-light">- {{ $t("settings.profile.password") }}- </dt>- <dd class="mt-1 text-sm text-main">- <NInput- type="password"- size="large"- :placeholder="$t('common.sensitive-placeholder')"- :value="state.editingUser?.password"- :input-props="{ autocomplete: 'new-password' }"- @update:value="updateUser('password', $event)"- />- </dd>- </div>-- <div class="sm:col-span-1">- <dt class="text-sm font-medium text-control-light">- {{ $t("settings.profile.password-confirm") }}- <span v-if="passwordMismatch" class="text-error">{{- $t("settings.profile.password-mismatch")- }}</span>- </dt>- <dd class="mt-1 text-sm text-main">- <NInput- type="password"- size="large"- :placeholder="- $t('settings.profile.password-confirm-placeholder')- "- :value="state.passwordConfirm"- :input-props="{ autocomplete: 'new-password' }"- @update:value="state.passwordConfirm = $event"- />- </dd>- </div>- </template>+ <div v-if="state.editing" class="col-span-2">+ <UserPassword+ v-if="state.editingUser"+ ref="userPasswordRef"+ v-model:password="state.editingUser.password"+ v-model:password-confirm="state.passwordConfirm"+ />+ </div></dl></div>@@ -253,7 +223,7 @@<script lang="ts" setup>import { useTitle } from "@vueuse/core";-import { cloneDeep, head, isEmpty, isEqual } from "lodash-es";+import { cloneDeep, head, isEqual } from "lodash-es";import type { DropdownOption } from "naive-ui";import { NButton, NInput, NDropdown, NTag } from "naive-ui";import { nextTick, computed, onMounted, onUnmounted, reactive, ref } from "vue";@@ -265,6 +235,7 @@ import FeatureBadge from "@/components/FeatureGuard/FeatureBadge.vue";import LearnMoreLink from "@/components/LearnMoreLink.vue";import RegenerateRecoveryCodesView from "@/components/RegenerateRecoveryCodesView.vue";import { ActionConfirmModal } from "@/components/SchemaEditorLite";+import UserPassword from "@/components/User/Settings/UserPassword.vue";import UserAvatar from "@/components/User/UserAvatar.vue";import NoPermissionPlaceholder from "@/components/misc/NoPermissionPlaceholder.vue";import ServiceAccountTag from "@/components/misc/ServiceAccountTag.vue";@@ -325,6 +296,7 @@ const state = reactive<LocalState>({});const editNameTextField = ref<InstanceType<typeof NInput>>();+const userPasswordRef = ref<InstanceType<typeof UserPassword>>();const workspaceDomain = computed(() =>head(settingV1Store.workspaceProfileSetting?.domains)@@ -373,13 +345,6 @@ const userRoles = computed(() => {return [...workspaceStore.getWorkspaceRolesByEmail(user.value.email)];});-const passwordMismatch = computed(() => {- return (- !isEmpty(state.editingUser?.password) &&- state.editingUser?.password !== state.passwordConfirm- );-});-const isSelf = computed(() => currentUserV1.value.name === user.value.name);// User can change her own info.@@ -397,8 +362,8 @@ const allowEdit = computed(() => {const allowSaveEdit = computed(() => {return (!isEqual(user.value, state.editingUser) &&- (state.passwordConfirm === "" ||- state.passwordConfirm === state.editingUser?.password)+ !userPasswordRef.value?.passwordHint &&+ !userPasswordRef.value?.passwordMismatch);});diff --git a/frontend/src/views/auth/PasswordReset.vue b/frontend/src/views/auth/PasswordReset.vueindex e7cad4590a..2f4ee5e63f 100644--- a/frontend/src/views/auth/PasswordReset.vue+++ b/frontend/src/views/auth/PasswordReset.vue@@ -9,71 +9,98 @@<div class="mt-8"><div class="mt-6">- <form class="space-y-6" @submit.prevent="tryReset">- <div>- <label- for="email"- class="block text-base font-medium leading-5 text-control"- >- {{ $t("auth.password-reset.content") }}- </label>- <div class="mt-4 rounded-md shadow-sm">- <BBTextField- v-model:value="state.email"- required- placeholder="[email protected]"- />- </div>- </div>-- <div class="w-full">- <NButton- attr-type="submit"- type="primary"- :disabled="!allowReset"- style="width: 100%"- >- {{ $t("auth.password-reset.send-reset-link") }}- </NButton>- </div>- </form>- </div>- </div>-- <div class="mt-6 relative">- <div class="absolute inset-0 flex items-center" aria-hidden="true">- <div class="w-full border-t border-control-border"></div>- </div>- <div class="relative flex justify-center text-sm">- <router-link- :to="{ name: AUTH_SIGNIN_MODULE }"- class="accent-link bg-white px-2"+ <NForm>+ <UserPassword+ ref="userPasswordRef"+ v-model:password="state.password"+ v-model:password-confirm="state.passwordConfirm"+ :show-learn-more="false"+ />+ </NForm>+ <NButton+ type="primary"+ size="large"+ style="width: 100%"+ :disabled="!allowConfirm"+ @click="onConfirm">- {{ $t("auth.password-reset.return-to-sign-in") }}- </router-link>+ {{ $t("common.confirm") }}+ </NButton></div></div></div></template><script lang="ts" setup>-import { NButton } from "naive-ui";-import { computed, reactive } from "vue";-import { BBTextField } from "@/bbkit";-import { AUTH_SIGNIN_MODULE } from "@/router/auth";-import { isValidEmail } from "../../utils";+import { NButton, NForm } from "naive-ui";+import { computed, reactive, ref, onMounted } from "vue";+import { useI18n } from "vue-i18n";+import { useRouter } from "vue-router";+import UserPassword from "@/components/User/Settings/UserPassword.vue";+import {+ pushNotification,+ useSettingV1Store,+ useUserStore,+ useAuthStore,+ useCurrentUserV1,+} from "@/store";+import { UpdateUserRequest, User } from "@/types/proto/v1/auth_service";interface LocalState {- email: string;+ password: string;+ passwordConfirm: string;}const state = reactive<LocalState>({- email: "",+ password: "",+ passwordConfirm: "",+});++const { t } = useI18n();+const me = useCurrentUserV1();+const userStore = useUserStore();+const authStore = useAuthStore();+const userPasswordRef = ref<InstanceType<typeof UserPassword>>();+const router = useRouter();+const settingV1Store = useSettingV1Store();++onMounted(async () => {+ if (!authStore.requireResetPassword) {+ router.replace("/");+ return;+ }+ await settingV1Store.getOrFetchSettingByName(+ "bb.workspace.password-restriction"+ );});-const allowReset = computed(() => {- return isValidEmail(state.email);+const allowConfirm = computed(() => {+ if (!state.password) {+ return false;+ }+ return (+ !userPasswordRef.value?.passwordHint &&+ !userPasswordRef.value?.passwordMismatch+ );});-const tryReset = () => {};+const onConfirm = async () => {+ const patch: User = {+ ...me.value,+ password: state.password,+ };+ await userStore.updateUser(+ UpdateUserRequest.fromPartial({+ user: patch,+ updateMask: ["password"],+ })+ );+ pushNotification({+ module: "bytebase",+ style: "SUCCESS",+ title: t("common.updated"),+ });+ authStore.setRequireResetPassword(false);+ router.replace("/");+};</script>diff --git a/frontend/src/views/auth/Signin.vue b/frontend/src/views/auth/Signin.vueindex 58f853884b..4de66e1d3e 100644--- a/frontend/src/views/auth/Signin.vue+++ b/frontend/src/views/auth/Signin.vue@@ -291,7 +291,7 @@ const trySignin = async (idpName?: string) => {if (state.isLoading) return;state.isLoading = true;try {- const mfaTempToken = await authStore.login({+ const { mfaTempToken } = await authStore.login({email: state.email,password: state.password,web: true,diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex e35aae9d66..01059e6996 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -10861,6 +10861,8 @@ components:type: stringmfaTempToken:type: string+ requireResetPassword:+ type: booleanLogoutRequest:type: objectproperties: {}@@ -11111,10 +11113,10 @@ components:requireResetPasswordForFirstLogin:type: booleandescription: require_reset_password_for_first_login requires users to reset their password after the 1st login.- rotationDays:- type: integer- description: rotation_days requires users to reset their password after n days.- format: int32+ passwordRotation:+ pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$+ type: string+ description: password_rotation requires users to reset their password after the duration.PatchSubscription:type: objectproperties:diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex 90ed558387..5d6479f016 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -3918,7 +3918,7 @@ SlowQueryPolicy is the policy configuration for slow query.| require_uppercase_letter | [bool](#bool) | | require_uppercase_letter requires the password must contains at least one upper case letter. || require_special_character | [bool](#bool) | | require_uppercase_letter requires the password must contains at least one special character. || require_reset_password_for_first_login | [bool](#bool) | | require_reset_password_for_first_login requires users to reset their password after the 1st login. |-| rotation_days | [int32](#int32) | optional | rotation_days requires users to reset their password after n days. |+| password_rotation | [google.protobuf.Duration](#google-protobuf-Duration) | | password_rotation requires users to reset their password after the duration. |diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.htmlindex c707866ef7..9f06acfbee 100644--- a/proto/gen/grpc-doc/store/index.html+++ b/proto/gen/grpc-doc/store/index.html@@ -9757,10 +9757,10 @@ The default value is 100MB, we will use the default value if the setting not exi</tr><tr>- <td>rotation_days</td>- <td><a href="#int32">int32</a></td>- <td>optional</td>- <td><p>rotation_days requires users to reset their password after n days. </p></td>+ <td>password_rotation</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td></td>+ <td><p>password_rotation requires users to reset their password after the duration. </p></td></tr></tbody>diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 851c1c6538..94279e904a 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -1625,6 +1625,7 @@ When paginating, all other parameters provided to `ListUsers` must match the cal| ----- | ---- | ----- | ----------- || token | [string](#string) | | || mfa_temp_token | [string](#string) | optional | |+| require_reset_password | [bool](#bool) | | |@@ -9549,7 +9550,7 @@ When paginating, all other parameters provided to `ListSettings` must match the| require_uppercase_letter | [bool](#bool) | | require_uppercase_letter requires the password must contains at least one upper case letter. || require_special_character | [bool](#bool) | | require_uppercase_letter requires the password must contains at least one special character. || require_reset_password_for_first_login | [bool](#bool) | | require_reset_password_for_first_login requires users to reset their password after the 1st login. |-| rotation_days | [int32](#int32) | optional | rotation_days requires users to reset their password after n days. |+| password_rotation | [google.protobuf.Duration](#google-protobuf-Duration) | | password_rotation requires users to reset their password after the duration. |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 8405d85b9b..334a11e7ac 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -5152,6 +5152,13 @@ Format: idps/{idp} </p></td><td><p> </p></td></tr>+ <tr>+ <td>require_reset_password</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>+</tbody></table>@@ -26042,10 +26049,10 @@ The default value is 100MB, we will use the default value if the setting not exi</tr><tr>- <td>rotation_days</td>- <td><a href="#int32">int32</a></td>- <td>optional</td>- <td><p>rotation_days requires users to reset their password after n days. </p></td>+ <td>password_rotation</td>+ <td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>+ <td></td>+ <td><p>password_rotation requires users to reset their password after the duration. </p></td></tr></tbody>diff --git a/proto/generated-go/store/setting.pb.go b/proto/generated-go/store/setting.pb.goindex c505c0940f..1dde130830 100644--- a/proto/generated-go/store/setting.pb.go+++ b/proto/generated-go/store/setting.pb.go@@ -1217,8 +1217,8 @@ type PasswordRestrictionSetting struct {RequireSpecialCharacter bool `protobuf:"varint,5,opt,name=require_special_character,json=requireSpecialCharacter,proto3" json:"require_special_character,omitempty"`// require_reset_password_for_first_login requires users to reset their password after the 1st login.RequireResetPasswordForFirstLogin bool `protobuf:"varint,6,opt,name=require_reset_password_for_first_login,json=requireResetPasswordForFirstLogin,proto3" json:"require_reset_password_for_first_login,omitempty"`- // rotation_days requires users to reset their password after n days.- RotationDays *int32 `protobuf:"varint,7,opt,name=rotation_days,json=rotationDays,proto3,oneof" json:"rotation_days,omitempty"`+ // password_rotation requires users to reset their password after the duration.+ PasswordRotation *durationpb.Duration `protobuf:"bytes,7,opt,name=password_rotation,json=passwordRotation,proto3" json:"password_rotation,omitempty"`}func (x *PasswordRestrictionSetting) Reset() {@@ -1295,11 +1295,11 @@ func (x *PasswordRestrictionSetting) GetRequireResetPasswordForFirstLogin() boolreturn false}-func (x *PasswordRestrictionSetting) GetRotationDays() int32 {- if x != nil && x.RotationDays != nil {- return *x.RotationDays+func (x *PasswordRestrictionSetting) GetPasswordRotation() *durationpb.Duration {+ if x != nil {+ return x.PasswordRotation}- return 0+ return nil}type WorkspaceApprovalSetting_Rule struct {@@ -2966,7 +2966,7 @@ var file_store_setting_proto_rawDesc = []byte{0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22,0x23, 0x0a, 0x0b, 0x53, 0x43, 0x49, 0x4d, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x14,0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74,- 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x8e, 0x03, 0x0a, 0x1a, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72,+ 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x9a, 0x03, 0x0a, 0x1a, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72,0x64, 0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74,0x69, 0x6e, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74,0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x67,@@ -2987,18 +2987,19 @@ var file_store_setting_proto_rawDesc = []byte{0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6c, 0x6f, 0x67, 0x69, 0x6e,0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x21, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x52,0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x46, 0x6f, 0x72, 0x46,- 0x69, 0x72, 0x73, 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x6f, 0x74,- 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05,- 0x48, 0x00, 0x52, 0x0c, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x79, 0x73,- 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,- 0x5f, 0x64, 0x61, 0x79, 0x73, 0x2a, 0x54, 0x0a, 0x12, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,- 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x24, 0x0a, 0x20, 0x44,- 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x4d,- 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,- 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x01, 0x12,- 0x0a, 0x0a, 0x06, 0x45, 0x44, 0x49, 0x54, 0x4f, 0x52, 0x10, 0x02, 0x42, 0x14, 0x5a, 0x12, 0x67,- 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72,- 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,+ 0x69, 0x72, 0x73, 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x46, 0x0a, 0x11, 0x70, 0x61, 0x73,+ 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07,+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,+ 0x10, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,+ 0x6e, 0x2a, 0x54, 0x0a, 0x12, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x43, 0x68, 0x61,+ 0x6e, 0x67, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x24, 0x0a, 0x20, 0x44, 0x41, 0x54, 0x41, 0x42,+ 0x41, 0x53, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f,+ 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a,+ 0x08, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x45,+ 0x44, 0x49, 0x54, 0x4f, 0x52, 0x10, 0x02, 0x42, 0x14, 0x5a, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72,+ 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70,+ 0x72, 0x6f, 0x74, 0x6f, 0x33,}var (@@ -3084,30 +3085,31 @@ var file_store_setting_proto_depIdxs = []int32{36, // 15: bytebase.store.AppIMSetting.slack:type_name -> bytebase.store.AppIMSetting.Slack37, // 16: bytebase.store.AppIMSetting.feishu:type_name -> bytebase.store.AppIMSetting.Feishu38, // 17: bytebase.store.AppIMSetting.wecom:type_name -> bytebase.store.AppIMSetting.Wecom- 40, // 18: bytebase.store.WorkspaceApprovalSetting.Rule.expression:type_name -> google.api.expr.v1alpha1.ParsedExpr- 41, // 19: bytebase.store.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.store.ApprovalTemplate- 42, // 20: bytebase.store.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr- 43, // 21: bytebase.store.SchemaTemplateSetting.FieldTemplate.engine:type_name -> bytebase.store.Engine- 44, // 22: bytebase.store.SchemaTemplateSetting.FieldTemplate.column:type_name -> bytebase.store.ColumnMetadata- 45, // 23: bytebase.store.SchemaTemplateSetting.FieldTemplate.config:type_name -> bytebase.store.ColumnConfig- 43, // 24: bytebase.store.SchemaTemplateSetting.ColumnType.engine:type_name -> bytebase.store.Engine- 43, // 25: bytebase.store.SchemaTemplateSetting.TableTemplate.engine:type_name -> bytebase.store.Engine- 46, // 26: bytebase.store.SchemaTemplateSetting.TableTemplate.table:type_name -> bytebase.store.TableMetadata- 47, // 27: bytebase.store.SchemaTemplateSetting.TableTemplate.config:type_name -> bytebase.store.TableConfig- 26, // 28: bytebase.store.DataClassificationSetting.DataClassificationConfig.levels:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.Level- 28, // 29: bytebase.store.DataClassificationSetting.DataClassificationConfig.classification:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry- 27, // 30: bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry.value:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.DataClassification- 31, // 31: bytebase.store.MaskingAlgorithmSetting.Algorithm.full_mask:type_name -> bytebase.store.MaskingAlgorithmSetting.Algorithm.FullMask- 32, // 32: bytebase.store.MaskingAlgorithmSetting.Algorithm.range_mask:type_name -> bytebase.store.MaskingAlgorithmSetting.Algorithm.RangeMask- 33, // 33: bytebase.store.MaskingAlgorithmSetting.Algorithm.md5_mask:type_name -> bytebase.store.MaskingAlgorithmSetting.Algorithm.MD5Mask- 34, // 34: bytebase.store.MaskingAlgorithmSetting.Algorithm.inner_outer_mask:type_name -> bytebase.store.MaskingAlgorithmSetting.Algorithm.InnerOuterMask- 35, // 35: bytebase.store.MaskingAlgorithmSetting.Algorithm.RangeMask.slices:type_name -> bytebase.store.MaskingAlgorithmSetting.Algorithm.RangeMask.Slice- 4, // 36: bytebase.store.MaskingAlgorithmSetting.Algorithm.InnerOuterMask.type:type_name -> bytebase.store.MaskingAlgorithmSetting.Algorithm.InnerOuterMask.MaskType- 37, // [37:37] is the sub-list for method output_type- 37, // [37:37] is the sub-list for method input_type- 37, // [37:37] is the sub-list for extension type_name- 37, // [37:37] is the sub-list for extension extendee- 0, // [0:37] is the sub-list for field type_name+ 39, // 18: bytebase.store.PasswordRestrictionSetting.password_rotation:type_name -> google.protobuf.Duration+ 40, // 19: bytebase.store.WorkspaceApprovalSetting.Rule.expression:type_name -> google.api.expr.v1alpha1.ParsedExpr+ 41, // 20: bytebase.store.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.store.ApprovalTemplate+ 42, // 21: bytebase.store.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr+ 43, // 22: bytebase.store.SchemaTemplateSetting.FieldTemplate.engine:type_name -> bytebase.store.Engine+ 44, // 23: bytebase.store.SchemaTemplateSetting.FieldTemplate.column:type_name -> bytebase.store.ColumnMetadata+ 45, // 24: bytebase.store.SchemaTemplateSetting.FieldTemplate.config:type_name -> bytebase.store.ColumnConfig+ 43, // 25: bytebase.store.SchemaTemplateSetting.ColumnType.engine:type_name -> bytebase.store.Engine+ 43, // 26: bytebase.store.SchemaTemplateSetting.TableTemplate.engine:type_name -> bytebase.store.Engine+ 46, // 27: bytebase.store.SchemaTemplateSetting.TableTemplate.table:type_name -> bytebase.store.TableMetadata+ 47, // 28: bytebase.store.SchemaTemplateSetting.TableTemplate.config:type_name -> bytebase.store.TableConfig+ 26, // 29: bytebase.store.DataClassificationSetting.DataClassificationConfig.levels:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.Level+ 28, // 30: bytebase.store.DataClassificationSetting.DataClassificationConfig.classification:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry+ 27, // 31: bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry.value:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.DataClassification+ 31, // 32: bytebase.store.MaskingAlgorithmSetting.Algorithm.full_mask:type_name -> bytebase.store.MaskingAlgorithmSetting.Algorithm.FullMask+ 32, // 33: bytebase.store.MaskingAlgorithmSetting.Algorithm.range_mask:type_name -> bytebase.store.MaskingAlgorithmSetting.Algorithm.RangeMask+ 33, // 34: bytebase.store.MaskingAlgorithmSetting.Algorithm.md5_mask:type_name -> bytebase.store.MaskingAlgorithmSetting.Algorithm.MD5Mask+ 34, // 35: bytebase.store.MaskingAlgorithmSetting.Algorithm.inner_outer_mask:type_name -> bytebase.store.MaskingAlgorithmSetting.Algorithm.InnerOuterMask+ 35, // 36: bytebase.store.MaskingAlgorithmSetting.Algorithm.RangeMask.slices:type_name -> bytebase.store.MaskingAlgorithmSetting.Algorithm.RangeMask.Slice+ 4, // 37: bytebase.store.MaskingAlgorithmSetting.Algorithm.InnerOuterMask.type:type_name -> bytebase.store.MaskingAlgorithmSetting.Algorithm.InnerOuterMask.MaskType+ 38, // [38:38] is the sub-list for method output_type+ 38, // [38:38] is the sub-list for method input_type+ 38, // [38:38] is the sub-list for extension type_name+ 38, // [38:38] is the sub-list for extension extendee+ 0, // [0:38] is the sub-list for field type_name}func init() { file_store_setting_proto_init() }@@ -3516,7 +3518,6 @@ func file_store_setting_proto_init() {}}}- file_store_setting_proto_msgTypes[14].OneofWrappers = []any{}file_store_setting_proto_msgTypes[22].OneofWrappers = []any{}file_store_setting_proto_msgTypes[25].OneofWrappers = []any{(*MaskingAlgorithmSetting_Algorithm_FullMask_)(nil),diff --git a/proto/generated-go/v1/auth_service.pb.go b/proto/generated-go/v1/auth_service.pb.goindex 6d4f1c796c..da4b8a640b 100644--- a/proto/generated-go/v1/auth_service.pb.go+++ b/proto/generated-go/v1/auth_service.pb.go@@ -770,8 +770,9 @@ type LoginResponse struct {sizeCache protoimpl.SizeCacheunknownFields protoimpl.UnknownFields- Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`- MfaTempToken *string `protobuf:"bytes,2,opt,name=mfa_temp_token,json=mfaTempToken,proto3,oneof" json:"mfa_temp_token,omitempty"`+ Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`+ MfaTempToken *string `protobuf:"bytes,2,opt,name=mfa_temp_token,json=mfaTempToken,proto3,oneof" json:"mfa_temp_token,omitempty"`+ RequireResetPassword bool `protobuf:"varint,3,opt,name=require_reset_password,json=requireResetPassword,proto3" json:"require_reset_password,omitempty"`}func (x *LoginResponse) Reset() {@@ -820,6 +821,13 @@ func (x *LoginResponse) GetMfaTempToken() string {return ""}+func (x *LoginResponse) GetRequireResetPassword() bool {+ if x != nil {+ return x.RequireResetPassword+ }+ return false+}+type LogoutRequest struct {state protoimpl.MessageStatesizeCache protoimpl.SizeCache@@ -1099,102 +1107,106 @@ var file_v1_auth_service_proto_rawDesc = []byte{0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x63,0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22,0x1d, 0x0a, 0x1b, 0x4f, 0x49, 0x44, 0x43, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50,- 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x63,- 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,- 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,- 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x29, 0x0a, 0x0e, 0x6d, 0x66, 0x61, 0x5f, 0x74, 0x65, 0x6d,- 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,- 0x0c, 0x6d, 0x66, 0x61, 0x54, 0x65, 0x6d, 0x70, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01, 0x01,- 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x6d, 0x66, 0x61, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x5f, 0x74, 0x6f,- 0x6b, 0x65, 0x6e, 0x22, 0x0f, 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71,- 0x75, 0x65, 0x73, 0x74, 0x22, 0x96, 0x03, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x18, 0x0a,- 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01,- 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65,- 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74,- 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,- 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65,- 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x32, 0x0a,- 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e,- 0x32, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55,- 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70,- 0x65, 0x12, 0x20, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x07, 0x20,- 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x04, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77,- 0x6f, 0x72, 0x64, 0x12, 0x25, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6b,- 0x65, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x04, 0x52, 0x0a,- 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x66,- 0x61, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52,- 0x0a, 0x6d, 0x66, 0x61, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6d,- 0x66, 0x61, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52,- 0x09, 0x6d, 0x66, 0x61, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65,- 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03,- 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65,- 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09,- 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x3a, 0x24, 0xea, 0x41, 0x21, 0x0a, 0x11, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x55, 0x73, 0x65, 0x72, 0x12,- 0x0c, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x7d, 0x2a, 0x54, 0x0a,- 0x08, 0x55, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x53, 0x45,- 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,- 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x55, 0x53, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0e,- 0x0a, 0x0a, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x42, 0x4f, 0x54, 0x10, 0x02, 0x12, 0x13,- 0x0a, 0x0f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e,- 0x54, 0x10, 0x03, 0x32, 0xeb, 0x06, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76,- 0x69, 0x63, 0x65, 0x12, 0x60, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1b,- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74,- 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x25,- 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x90, 0xea, 0x30, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02,- 0x14, 0x12, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65,- 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x6a, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65,- 0x72, 0x73, 0x12, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,- 0x74, 0x1a, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,- 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,- 0x65, 0x22, 0x1e, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x90, 0xea, 0x30, 0x02,- 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0b, 0x12, 0x09, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72,- 0x73, 0x12, 0x6b, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12,- 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72,- 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,- 0x11, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73,- 0x65, 0x72, 0x22, 0x2a, 0xda, 0x41, 0x04, 0x75, 0x73, 0x65, 0x72, 0x80, 0xea, 0x30, 0x01, 0x90,- 0xea, 0x30, 0x02, 0x98, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x3a, 0x04, 0x75,- 0x73, 0x65, 0x72, 0x22, 0x09, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x81,- 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e,- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61,- 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e,- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72,- 0x22, 0x40, 0xda, 0x41, 0x10, 0x75, 0x73, 0x65, 0x72, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,- 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x90, 0xea, 0x30, 0x02, 0x98, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4,- 0x93, 0x02, 0x1f, 0x3a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x32, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x7b,- 0x75, 0x73, 0x65, 0x72, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f,- 0x2a, 0x7d, 0x12, 0x6b, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72,- 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44,- 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,+ 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x99,+ 0x01, 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,+ 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,+ 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x29, 0x0a, 0x0e, 0x6d, 0x66, 0x61, 0x5f, 0x74, 0x65,+ 0x6d, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00,+ 0x52, 0x0c, 0x6d, 0x66, 0x61, 0x54, 0x65, 0x6d, 0x70, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x88, 0x01,+ 0x01, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x73,+ 0x65, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,+ 0x08, 0x52, 0x14, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50,+ 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x6d, 0x66, 0x61, 0x5f,+ 0x74, 0x65, 0x6d, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x0f, 0x0a, 0x0d, 0x4c, 0x6f,+ 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x96, 0x03, 0x0a, 0x04,+ 0x55, 0x73, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,+ 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28,+ 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e,+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74,+ 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69,+ 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x14,+ 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74,+ 0x69, 0x74, 0x6c, 0x65, 0x12, 0x32, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70,+ 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08,+ 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73,+ 0x77, 0x6f, 0x72, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x04,+ 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x25, 0x0a, 0x0b, 0x73, 0x65,+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42,+ 0x04, 0xe2, 0x41, 0x01, 0x04, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4b, 0x65,+ 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x66, 0x61, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,+ 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x6d, 0x66, 0x61, 0x45, 0x6e, 0x61, 0x62, 0x6c,+ 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x66, 0x61, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74,+ 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x66, 0x61, 0x53, 0x65, 0x63, 0x72, 0x65,+ 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x63, 0x6f,+ 0x64, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x63, 0x6f, 0x76,+ 0x65, 0x72, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e,+ 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x3a, 0x24,+ 0xea, 0x41, 0x21, 0x0a, 0x11, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x63, 0x6f,+ 0x6d, 0x2f, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x75,+ 0x73, 0x65, 0x72, 0x7d, 0x2a, 0x54, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65,+ 0x12, 0x19, 0x0a, 0x15, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e,+ 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x55,+ 0x53, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f,+ 0x42, 0x4f, 0x54, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45,+ 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x03, 0x32, 0xeb, 0x06, 0x0a, 0x0b, 0x41,+ 0x75, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x60, 0x0a, 0x07, 0x47, 0x65,+ 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65,+ 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,+ 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x25, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x90, 0xea,+ 0x30, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e,+ 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x6a, 0x0a, 0x09,+ 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65,+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72,+ 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73,+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72,+ 0x65, 0x6e, 0x74, 0x90, 0xea, 0x30, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0b, 0x12, 0x09, 0x2f,+ 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x6b, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61,+ 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52,+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x2a, 0xda, 0x41, 0x04, 0x75, 0x73,+ 0x65, 0x72, 0x80, 0xea, 0x30, 0x01, 0x90, 0xea, 0x30, 0x02, 0x98, 0xea, 0x30, 0x01, 0x82, 0xd3,+ 0xe4, 0x93, 0x02, 0x11, 0x3a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x09, 0x2f, 0x76, 0x31, 0x2f,+ 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x81, 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,+ 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,+ 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71,+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,+ 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x40, 0xda, 0x41, 0x10, 0x75, 0x73, 0x65, 0x72,+ 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x90, 0xea, 0x30, 0x02,+ 0x98, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x04, 0x75, 0x73, 0x65, 0x72,+ 0x32, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x6e, 0x61, 0x6d, 0x65,+ 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x6b, 0x0a, 0x0a, 0x44, 0x65, 0x6c,+ 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72,+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22,+ 0x25, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x90, 0xea, 0x30, 0x02, 0x82, 0xd3, 0xe4, 0x93,+ 0x02, 0x14, 0x2a, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73,+ 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x6f, 0x0a, 0x0c, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65,+ 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65,+ 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x2a, 0x90, 0xea, 0x30,+ 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f,+ 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x75,+ 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x61, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e,+ 0x12, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c,+ 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x62, 0x79,+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52,+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x80, 0xea, 0x30, 0x01, 0x98, 0xea, 0x30,+ 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f,+ 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x5c, 0x0a, 0x06, 0x4c, 0x6f,+ 0x67, 0x6f, 0x75, 0x74, 0x12, 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,+ 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,- 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x25, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d,- 0x65, 0x90, 0xea, 0x30, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x2a, 0x12, 0x2f, 0x76, 0x31,- 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12,- 0x6f, 0x0a, 0x0c, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12,- 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e,- 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,- 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,- 0x55, 0x73, 0x65, 0x72, 0x22, 0x2a, 0x90, 0xea, 0x30, 0x02, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20,- 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75,- 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x75, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65,- 0x12, 0x61, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65,- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71,- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,- 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,- 0x22, 0x21, 0x80, 0xea, 0x30, 0x01, 0x98, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13,- 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6c, 0x6f,- 0x67, 0x69, 0x6e, 0x12, 0x5c, 0x0a, 0x06, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x12, 0x1a, 0x2e,- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x6f,- 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67,- 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74,- 0x79, 0x22, 0x1e, 0x80, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a,- 0x22, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6c, 0x6f, 0x67, 0x6f, 0x75,- 0x74, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67,- 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,+ 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1e, 0x80, 0xea, 0x30, 0x01, 0x82, 0xd3,+ 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74,+ 0x68, 0x2f, 0x6c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65,+ 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f,+ 0x74, 0x6f, 0x33,}var (diff --git a/proto/generated-go/v1/setting_service.pb.go b/proto/generated-go/v1/setting_service.pb.goindex 100bcf4ded..05b2a42133 100644--- a/proto/generated-go/v1/setting_service.pb.go+++ b/proto/generated-go/v1/setting_service.pb.go@@ -1881,8 +1881,8 @@ type PasswordRestrictionSetting struct {RequireSpecialCharacter bool `protobuf:"varint,5,opt,name=require_special_character,json=requireSpecialCharacter,proto3" json:"require_special_character,omitempty"`// require_reset_password_for_first_login requires users to reset their password after the 1st login.RequireResetPasswordForFirstLogin bool `protobuf:"varint,6,opt,name=require_reset_password_for_first_login,json=requireResetPasswordForFirstLogin,proto3" json:"require_reset_password_for_first_login,omitempty"`- // rotation_days requires users to reset their password after n days.- RotationDays *int32 `protobuf:"varint,7,opt,name=rotation_days,json=rotationDays,proto3,oneof" json:"rotation_days,omitempty"`+ // password_rotation requires users to reset their password after the duration.+ PasswordRotation *durationpb.Duration `protobuf:"bytes,7,opt,name=password_rotation,json=passwordRotation,proto3" json:"password_rotation,omitempty"`}func (x *PasswordRestrictionSetting) Reset() {@@ -1959,11 +1959,11 @@ func (x *PasswordRestrictionSetting) GetRequireResetPasswordForFirstLogin() boolreturn false}-func (x *PasswordRestrictionSetting) GetRotationDays() int32 {- if x != nil && x.RotationDays != nil {- return *x.RotationDays+func (x *PasswordRestrictionSetting) GetPasswordRotation() *durationpb.Duration {+ if x != nil {+ return x.PasswordRotation}- return 0+ return nil}type AppIMSetting_Slack struct {@@ -3775,7 +3775,7 @@ var file_v1_setting_service_proto_rawDesc = []byte{0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6c, 0x69, 0x6d,0x69, 0x74, 0x22, 0x23, 0x0a, 0x0b, 0x53, 0x43, 0x49, 0x4d, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,0x67, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,- 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x8e, 0x03, 0x0a, 0x1a, 0x50, 0x61, 0x73, 0x73,+ 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x9a, 0x03, 0x0a, 0x1a, 0x50, 0x61, 0x73, 0x73,0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53,0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65,0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4c,@@ -3796,45 +3796,46 @@ var file_v1_setting_service_proto_rawDesc = []byte{0x6f, 0x72, 0x64, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6c, 0x6f,0x67, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x21, 0x72, 0x65, 0x71, 0x75, 0x69,0x72, 0x65, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x46,- 0x6f, 0x72, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x28, 0x0a, 0x0d,- 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x18, 0x07, 0x20,- 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x0c, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44,- 0x61, 0x79, 0x73, 0x88, 0x01, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74,- 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x79, 0x73, 0x2a, 0x54, 0x0a, 0x12, 0x44, 0x61, 0x74, 0x61,- 0x62, 0x61, 0x73, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x24,- 0x0a, 0x20, 0x44, 0x41, 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47,- 0x45, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,- 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45,- 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x44, 0x49, 0x54, 0x4f, 0x52, 0x10, 0x02, 0x32, 0xae,- 0x03, 0x0a, 0x0e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,- 0x65, 0x12, 0x84, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,- 0x67, 0x73, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71,- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,- 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52,- 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xda, 0x41, 0x00, 0x8a, 0xea, 0x30, 0x10,- 0x62, 0x62, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74,- 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x76, 0x31, 0x2f,- 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x7f, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53,- 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52,- 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x3b, 0xda, 0x41,- 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x8a, 0xea, 0x30, 0x0f, 0x62, 0x62, 0x2e, 0x73, 0x65, 0x74, 0x74,- 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x67, 0x65, 0x74, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93,- 0x02, 0x17, 0x12, 0x15, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x73, 0x65,- 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x93, 0x01, 0x0a, 0x0d, 0x55, 0x70,- 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,- 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14,- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74,- 0x74, 0x69, 0x6e, 0x67, 0x22, 0x49, 0x8a, 0xea, 0x30, 0x0f, 0x62, 0x62, 0x2e, 0x73, 0x65, 0x74,- 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x73, 0x65, 0x74, 0x90, 0xea, 0x30, 0x01, 0x98, 0xea, 0x30,- 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,- 0x32, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x6e,- 0x61, 0x6d, 0x65, 0x3d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x42,- 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f,- 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,+ 0x6f, 0x72, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x46, 0x0a, 0x11,+ 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x72, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,+ 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69,+ 0x6f, 0x6e, 0x52, 0x10, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x6f, 0x74, 0x61,+ 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x54, 0x0a, 0x12, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,+ 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x24, 0x0a, 0x20, 0x44, 0x41,+ 0x54, 0x41, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x4d, 0x4f,+ 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00,+ 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x49, 0x50, 0x45, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0a,+ 0x0a, 0x06, 0x45, 0x44, 0x49, 0x54, 0x4f, 0x52, 0x10, 0x02, 0x32, 0xae, 0x03, 0x0a, 0x0e, 0x53,+ 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x84, 0x01,+ 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x20,+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73,+ 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,+ 0x1a, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c,+ 0x69, 0x73, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,+ 0x6e, 0x73, 0x65, 0x22, 0x2f, 0xda, 0x41, 0x00, 0x8a, 0xea, 0x30, 0x10, 0x62, 0x62, 0x2e, 0x73,+ 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x6c, 0x69, 0x73, 0x74, 0x90, 0xea, 0x30, 0x01,+ 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x74, 0x74,+ 0x69, 0x6e, 0x67, 0x73, 0x12, 0x7f, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69,+ 0x6e, 0x67, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,+ 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65,+ 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,+ 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x3b, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d,+ 0x65, 0x8a, 0xea, 0x30, 0x0f, 0x62, 0x62, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73,+ 0x2e, 0x67, 0x65, 0x74, 0x90, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15,+ 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e,+ 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x93, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,+ 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74,+ 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x62, 0x79, 0x74,+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,+ 0x22, 0x49, 0x8a, 0xea, 0x30, 0x0f, 0x62, 0x62, 0x2e, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,+ 0x73, 0x2e, 0x73, 0x65, 0x74, 0x90, 0xea, 0x30, 0x01, 0x98, 0xea, 0x30, 0x01, 0x82, 0xd3, 0xe4,+ 0x93, 0x02, 0x28, 0x3a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x32, 0x1d, 0x2f, 0x76,+ 0x31, 0x2f, 0x7b, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d,+ 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x2a, 0x7d, 0x42, 0x11, 0x5a, 0x0f, 0x67,+ 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06,+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,}var (@@ -3951,35 +3952,36 @@ var file_v1_setting_service_proto_depIdxs = []int32{35, // 37: bytebase.v1.DataClassificationSetting.configs:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig39, // 38: bytebase.v1.SemanticTypeSetting.types:type_name -> bytebase.v1.SemanticTypeSetting.SemanticType40, // 39: bytebase.v1.MaskingAlgorithmSetting.algorithms:type_name -> bytebase.v1.MaskingAlgorithmSetting.Algorithm- 50, // 40: bytebase.v1.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.v1.ApprovalTemplate- 51, // 41: bytebase.v1.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr- 52, // 42: bytebase.v1.SchemaTemplateSetting.FieldTemplate.engine:type_name -> bytebase.v1.Engine- 53, // 43: bytebase.v1.SchemaTemplateSetting.FieldTemplate.column:type_name -> bytebase.v1.ColumnMetadata- 54, // 44: bytebase.v1.SchemaTemplateSetting.FieldTemplate.config:type_name -> bytebase.v1.ColumnConfig- 52, // 45: bytebase.v1.SchemaTemplateSetting.ColumnType.engine:type_name -> bytebase.v1.Engine- 52, // 46: bytebase.v1.SchemaTemplateSetting.TableTemplate.engine:type_name -> bytebase.v1.Engine- 55, // 47: bytebase.v1.SchemaTemplateSetting.TableTemplate.table:type_name -> bytebase.v1.TableMetadata- 56, // 48: bytebase.v1.SchemaTemplateSetting.TableTemplate.config:type_name -> bytebase.v1.TableConfig- 36, // 49: bytebase.v1.DataClassificationSetting.DataClassificationConfig.levels:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level- 38, // 50: bytebase.v1.DataClassificationSetting.DataClassificationConfig.classification:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry- 37, // 51: bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry.value:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification- 41, // 52: bytebase.v1.MaskingAlgorithmSetting.Algorithm.full_mask:type_name -> bytebase.v1.MaskingAlgorithmSetting.Algorithm.FullMask- 42, // 53: bytebase.v1.MaskingAlgorithmSetting.Algorithm.range_mask:type_name -> bytebase.v1.MaskingAlgorithmSetting.Algorithm.RangeMask- 43, // 54: bytebase.v1.MaskingAlgorithmSetting.Algorithm.md5_mask:type_name -> bytebase.v1.MaskingAlgorithmSetting.Algorithm.MD5Mask- 44, // 55: bytebase.v1.MaskingAlgorithmSetting.Algorithm.inner_outer_mask:type_name -> bytebase.v1.MaskingAlgorithmSetting.Algorithm.InnerOuterMask- 45, // 56: bytebase.v1.MaskingAlgorithmSetting.Algorithm.RangeMask.slices:type_name -> bytebase.v1.MaskingAlgorithmSetting.Algorithm.RangeMask.Slice- 4, // 57: bytebase.v1.MaskingAlgorithmSetting.Algorithm.InnerOuterMask.type:type_name -> bytebase.v1.MaskingAlgorithmSetting.Algorithm.InnerOuterMask.MaskType- 5, // 58: bytebase.v1.SettingService.ListSettings:input_type -> bytebase.v1.ListSettingsRequest- 7, // 59: bytebase.v1.SettingService.GetSetting:input_type -> bytebase.v1.GetSettingRequest- 9, // 60: bytebase.v1.SettingService.UpdateSetting:input_type -> bytebase.v1.UpdateSettingRequest- 6, // 61: bytebase.v1.SettingService.ListSettings:output_type -> bytebase.v1.ListSettingsResponse- 10, // 62: bytebase.v1.SettingService.GetSetting:output_type -> bytebase.v1.Setting- 10, // 63: bytebase.v1.SettingService.UpdateSetting:output_type -> bytebase.v1.Setting- 61, // [61:64] is the sub-list for method output_type- 58, // [58:61] is the sub-list for method input_type- 58, // [58:58] is the sub-list for extension type_name- 58, // [58:58] is the sub-list for extension extendee- 0, // [0:58] is the sub-list for field type_name+ 47, // 40: bytebase.v1.PasswordRestrictionSetting.password_rotation:type_name -> google.protobuf.Duration+ 50, // 41: bytebase.v1.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.v1.ApprovalTemplate+ 51, // 42: bytebase.v1.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr+ 52, // 43: bytebase.v1.SchemaTemplateSetting.FieldTemplate.engine:type_name -> bytebase.v1.Engine+ 53, // 44: bytebase.v1.SchemaTemplateSetting.FieldTemplate.column:type_name -> bytebase.v1.ColumnMetadata+ 54, // 45: bytebase.v1.SchemaTemplateSetting.FieldTemplate.config:type_name -> bytebase.v1.ColumnConfig+ 52, // 46: bytebase.v1.SchemaTemplateSetting.ColumnType.engine:type_name -> bytebase.v1.Engine+ 52, // 47: bytebase.v1.SchemaTemplateSetting.TableTemplate.engine:type_name -> bytebase.v1.Engine+ 55, // 48: bytebase.v1.SchemaTemplateSetting.TableTemplate.table:type_name -> bytebase.v1.TableMetadata+ 56, // 49: bytebase.v1.SchemaTemplateSetting.TableTemplate.config:type_name -> bytebase.v1.TableConfig+ 36, // 50: bytebase.v1.DataClassificationSetting.DataClassificationConfig.levels:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level+ 38, // 51: bytebase.v1.DataClassificationSetting.DataClassificationConfig.classification:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry+ 37, // 52: bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry.value:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification+ 41, // 53: bytebase.v1.MaskingAlgorithmSetting.Algorithm.full_mask:type_name -> bytebase.v1.MaskingAlgorithmSetting.Algorithm.FullMask+ 42, // 54: bytebase.v1.MaskingAlgorithmSetting.Algorithm.range_mask:type_name -> bytebase.v1.MaskingAlgorithmSetting.Algorithm.RangeMask+ 43, // 55: bytebase.v1.MaskingAlgorithmSetting.Algorithm.md5_mask:type_name -> bytebase.v1.MaskingAlgorithmSetting.Algorithm.MD5Mask+ 44, // 56: bytebase.v1.MaskingAlgorithmSetting.Algorithm.inner_outer_mask:type_name -> bytebase.v1.MaskingAlgorithmSetting.Algorithm.InnerOuterMask+ 45, // 57: bytebase.v1.MaskingAlgorithmSetting.Algorithm.RangeMask.slices:type_name -> bytebase.v1.MaskingAlgorithmSetting.Algorithm.RangeMask.Slice+ 4, // 58: bytebase.v1.MaskingAlgorithmSetting.Algorithm.InnerOuterMask.type:type_name -> bytebase.v1.MaskingAlgorithmSetting.Algorithm.InnerOuterMask.MaskType+ 5, // 59: bytebase.v1.SettingService.ListSettings:input_type -> bytebase.v1.ListSettingsRequest+ 7, // 60: bytebase.v1.SettingService.GetSetting:input_type -> bytebase.v1.GetSettingRequest+ 9, // 61: bytebase.v1.SettingService.UpdateSetting:input_type -> bytebase.v1.UpdateSettingRequest+ 6, // 62: bytebase.v1.SettingService.ListSettings:output_type -> bytebase.v1.ListSettingsResponse+ 10, // 63: bytebase.v1.SettingService.GetSetting:output_type -> bytebase.v1.Setting+ 10, // 64: bytebase.v1.SettingService.UpdateSetting:output_type -> bytebase.v1.Setting+ 62, // [62:65] is the sub-list for method output_type+ 59, // [59:62] is the sub-list for method input_type+ 59, // [59:59] is the sub-list for extension type_name+ 59, // [59:59] is the sub-list for extension extendee+ 0, // [0:59] is the sub-list for field type_name}func init() { file_v1_setting_service_proto_init() }@@ -4492,7 +4494,6 @@ func file_v1_setting_service_proto_init() {(*Value_PasswordRestrictionSetting)(nil),}file_v1_setting_service_proto_msgTypes[7].OneofWrappers = []any{}- file_v1_setting_service_proto_msgTypes[21].OneofWrappers = []any{}file_v1_setting_service_proto_msgTypes[32].OneofWrappers = []any{}file_v1_setting_service_proto_msgTypes[35].OneofWrappers = []any{(*MaskingAlgorithmSetting_Algorithm_FullMask_)(nil),diff --git a/proto/store/setting.proto b/proto/store/setting.protoindex a5473ec5d4..4c62e10336 100644--- a/proto/store/setting.proto+++ b/proto/store/setting.proto@@ -367,6 +367,6 @@ message PasswordRestrictionSetting {bool require_special_character = 5;// require_reset_password_for_first_login requires users to reset their password after the 1st login.bool require_reset_password_for_first_login = 6;- // rotation_days requires users to reset their password after n days.- optional int32 rotation_days = 7;+ // password_rotation requires users to reset their password after the duration.+ google.protobuf.Duration password_rotation = 7;}diff --git a/proto/v1/auth_service.proto b/proto/v1/auth_service.protoindex 352949be79..bddb23ce0a 100644--- a/proto/v1/auth_service.proto+++ b/proto/v1/auth_service.proto@@ -212,6 +212,8 @@ message LoginResponse {string token = 1;optional string mfa_temp_token = 2;++ bool require_reset_password = 3;}message LogoutRequest {}diff --git a/proto/v1/setting_service.proto b/proto/v1/setting_service.protoindex e066c50f4d..148d315041 100644--- a/proto/v1/setting_service.proto+++ b/proto/v1/setting_service.proto@@ -499,6 +499,6 @@ message PasswordRestrictionSetting {bool require_special_character = 5;// require_reset_password_for_first_login requires users to reset their password after the 1st login.bool require_reset_password_for_first_login = 6;- // rotation_days requires users to reset their password after n days.- optional int32 rotation_days = 7;+ // password_rotation requires users to reset their password after the duration.+ google.protobuf.Duration password_rotation = 7;}