Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat: support smtp email (#19971)
ecmadao725bdc225af0
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yamlindex 25d7f0ff16..e75738207a 100644--- a/backend/api/mcp/gen/openapi.yaml+++ b/backend/api/mcp/gen/openapi.yaml@@ -5783,6 +5783,44 @@ paths:application/json:schema:$ref: '#/components/schemas/bytebase.v1.ListSettingsResponse'+ /bytebase.v1.SettingService/TestEmailSetting:+ post:+ tags:+ - bytebase.v1.SettingService+ summary: TestEmailSetting+ description: |-+ Sends a test email using the provided config (without persisting).+ Permissions required: bb.settings.set+ operationId: bytebase.v1.SettingService.TestEmailSetting+ parameters:+ - name: Connect-Protocol-Version+ in: header+ required: true+ schema:+ $ref: '#/components/schemas/connect-protocol-version'+ - name: Connect-Timeout-Ms+ in: header+ schema:+ $ref: '#/components/schemas/connect-timeout-header'+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.TestEmailSettingRequest'+ required: true+ responses:+ default:+ description: Error+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/connect.error'+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.TestEmailSettingResponse'/bytebase.v1.SettingService/UpdateSetting:post:tags:@@ -10629,6 +10667,77 @@ components:title: DimensionalConfigadditionalProperties: falsedescription: DimensionalConfig defines dimensional and constraint parameters for spatial indexes.+ bytebase.v1.EmailSetting:+ type: object+ allOf:+ - properties:+ from:+ type: string+ title: from+ fromName:+ type: string+ title: from_name+ type:+ title: type+ $ref: '#/components/schemas/bytebase.v1.EmailSetting.Type'+ - oneOf:+ - type: object+ properties:+ smtp:+ title: smtp+ $ref: '#/components/schemas/bytebase.v1.EmailSetting.SMTPConfig'+ title: smtp+ required:+ - smtp+ title: EmailSetting+ additionalProperties: false+ bytebase.v1.EmailSetting.SMTPConfig:+ type: object+ properties:+ host:+ type: string+ title: host+ port:+ type: integer+ title: port+ format: int32+ username:+ type: string+ title: username+ password:+ type: string+ title: password+ encryption:+ title: encryption+ $ref: '#/components/schemas/bytebase.v1.EmailSetting.SMTPConfig.Encryption'+ authentication:+ title: authentication+ $ref: '#/components/schemas/bytebase.v1.EmailSetting.SMTPConfig.Authentication'+ title: SMTPConfig+ additionalProperties: false+ bytebase.v1.EmailSetting.SMTPConfig.Authentication:+ type: string+ title: Authentication+ enum:+ - AUTHENTICATION_UNSPECIFIED+ - AUTHENTICATION_NONE+ - PLAIN+ - LOGIN+ - CRAM_MD5+ bytebase.v1.EmailSetting.SMTPConfig.Encryption:+ type: string+ title: Encryption+ enum:+ - ENCRYPTION_UNSPECIFIED+ - ENCRYPTION_NONE+ - STARTTLS+ - SSL_TLS+ bytebase.v1.EmailSetting.Type:+ type: string+ title: Type+ enum:+ - TYPE_UNSPECIFIED+ - SMTPbytebase.v1.Engine:type: stringtitle: Engine@@ -17145,6 +17254,7 @@ components:- DATA_CLASSIFICATION- SEMANTIC_TYPES- ENVIRONMENTbytebase.v1.SettingValue:type: objectoneOf:@@ -17172,6 +17282,14 @@ components:title: data_classificationrequired:- dataClassification+ - type: object+ properties:+ email:+ title: email+ $ref: '#/components/schemas/bytebase.v1.EmailSetting'+ title: email+ required:- type: objectproperties:environment:@@ -18638,6 +18756,31 @@ components:title: TessellationConfigadditionalProperties: falsedescription: TessellationConfig defines tessellation parameters for spatial indexes.+ bytebase.v1.TestEmailSettingRequest:+ type: object+ properties:+ parent:+ type: string+ title: parent+ emailSetting:+ title: email_setting+ $ref: '#/components/schemas/bytebase.v1.EmailSetting'+ to:+ type: string+ title: to+ title: TestEmailSettingRequest+ additionalProperties: false+ bytebase.v1.TestEmailSettingResponse:+ type: object+ properties:+ success:+ type: boolean+ title: success+ error:+ type: string+ title: error+ title: TestEmailSettingResponse+ additionalProperties: falsebytebase.v1.TestIdentityProviderRequest:type: objectallOf:diff --git a/backend/api/v1/auth_service.go b/backend/api/v1/auth_service.goindex 397d92e06b..7afbd4e165 100644--- a/backend/api/v1/auth_service.go+++ b/backend/api/v1/auth_service.go@@ -5,6 +5,7 @@ import ("crypto/subtle""fmt""log/slog"+ "os""slices""strings""time"@@ -1392,19 +1393,32 @@ func getAccountRestriction(// getAdditionalWorkspaceSettings returns extra settings to inject during workspace creation.// In SaaS mode with Gemini API key configured, injects AI settings.-func (s *AuthService) getAdditionalWorkspaceSettings() []store.AdditionalSetting {+func (*AuthService) getAdditionalWorkspaceSettings() []store.AdditionalSetting {var settings []store.AdditionalSetting- if s.profile.GeminiAPIKey != "" {+ if geminiAPIKey := os.Getenv("GEMINI_API_KEY"); geminiAPIKey != "" {settings = append(settings, store.AdditionalSetting{Name: storepb.SettingName_AI,Payload: &storepb.AISetting{Enabled: true,Provider: storepb.AISetting_GEMINI,- ApiKey: s.profile.GeminiAPIKey,+ ApiKey: geminiAPIKey,Endpoint: "https://generativelanguage.googleapis.com/v1beta",Model: "gemini-2.5-pro",},})}+ if raw := os.Getenv("EMAIL_CONFIG"); raw != "" { //nolint:nestif+ emailSetting := &storepb.EmailSetting{}+ if err := common.ProtojsonUnmarshaler.Unmarshal([]byte(raw), emailSetting); err != nil {+ slog.Error("failed to parse EMAIL_CONFIG env var", log.BBError(err))+ } else if err := validateEmailSetting(emailSetting); err != nil {+ slog.Error("invalid EMAIL_CONFIG env var", log.BBError(err))+ } else {+ settings = append(settings, store.AdditionalSetting{+ Name: storepb.SettingName_EMAIL,+ Payload: emailSetting,+ })+ }+ }return settings}diff --git a/backend/api/v1/setting_service.go b/backend/api/v1/setting_service.goindex 7c6eadebea..f5198752ff 100644--- a/backend/api/v1/setting_service.go+++ b/backend/api/v1/setting_service.go@@ -23,6 +23,7 @@ import (storepb "github.com/bytebase/bytebase/backend/generated-go/store"v1pb "github.com/bytebase/bytebase/backend/generated-go/v1""github.com/bytebase/bytebase/backend/generated-go/v1/v1connect"+ "github.com/bytebase/bytebase/backend/plugin/mailer""github.com/bytebase/bytebase/backend/plugin/webhook/dingtalk""github.com/bytebase/bytebase/backend/plugin/webhook/feishu""github.com/bytebase/bytebase/backend/plugin/webhook/lark"@@ -608,6 +609,53 @@ func (s *SettingService) UpdateSetting(ctx context.Context, request *connect.Req}storeSettingValue = environmentSetting+ case storepb.SettingName_EMAIL:+ if request.Msg.UpdateMask == nil {+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("update mask is required"))+ }+ payload := convertEmailSetting(request.Msg.Setting.Value.GetEmail())+ if payload == nil {+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("email setting is required"))+ }++ oldEmailSetting := &storepb.EmailSetting{}+ if existing, err := s.store.GetSetting(ctx, workspaceID, storepb.SettingName_EMAIL); err != nil {+ return nil, connect.NewError(connect.CodeInternal, errors.Errorf("failed to get email setting: %v", err))+ } else if existing != nil {+ oldEmailSetting = proto.CloneOf(existing.Value.(*storepb.EmailSetting))+ }++ for _, path := range request.Msg.UpdateMask.Paths {+ switch path {+ case "value.email.from":+ oldEmailSetting.From = payload.From+ case "value.email.from_name":+ oldEmailSetting.FromName = payload.FromName+ case "value.email.type":+ oldEmailSetting.Type = payload.Type+ case "value.email.smtp":+ newSMTP := payload.GetSmtp()+ if newSMTP == nil {+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("smtp config is required when updating smtp"))+ }+ // Preserve existing password if new password is empty.+ if newSMTP.Password == "" {+ if oldSMTP := oldEmailSetting.GetSmtp(); oldSMTP != nil {+ newSMTP.Password = oldSMTP.Password+ }+ }+ oldEmailSetting.Config = &storepb.EmailSetting_Smtp{Smtp: newSMTP}+ default:+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("invalid update mask path %v", path))+ }+ }++ // Validate the final state.+ if err := validateEmailSetting(oldEmailSetting); err != nil {+ return nil, connect.NewError(connect.CodeInvalidArgument, err)+ }++ storeSettingValue = oldEmailSettingdefault:return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("unsupported setting %v", storeSettingName))}@@ -676,6 +724,50 @@ func (s *SettingService) UpdateSetting(ctx context.Context, request *connect.Reqreturn connect.NewResponse(settingMessage), nil}+// TestEmailSetting sends a test email using the provided config.+func (s *SettingService) TestEmailSetting(ctx context.Context, req *connect.Request[v1pb.TestEmailSettingRequest]) (*connect.Response[v1pb.TestEmailSettingResponse], error) {+ emailSetting := convertEmailSetting(req.Msg.EmailSetting)+ if emailSetting == nil {+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("email_setting is required"))+ }++ // Substitute stored password if not provided.+ if smtp := emailSetting.GetSmtp(); smtp != nil && smtp.Password == "" {+ workspaceID := common.GetWorkspaceIDFromContext(ctx)+ if existing, err := s.store.GetSetting(ctx, workspaceID, storepb.SettingName_EMAIL); err == nil && existing != nil {+ if oldEmail, ok := existing.Value.(*storepb.EmailSetting); ok {+ if oldSMTP := oldEmail.GetSmtp(); oldSMTP != nil {+ smtp.Password = oldSMTP.Password+ }+ }+ }+ }++ sender, err := mailer.NewSender(emailSetting)+ if err != nil {+ return connect.NewResponse(&v1pb.TestEmailSettingResponse{ //nolint:nilerr+ Success: false,+ Error: err.Error(),+ }), nil+ }++ err = sender.Send(ctx, &mailer.SendRequest{+ To: []string{req.Msg.To},+ Subject: "Bytebase email config test",+ TextBody: "This is a test email from Bytebase to verify your email configuration.",+ })+ if err != nil {+ return connect.NewResponse(&v1pb.TestEmailSettingResponse{ //nolint:nilerr+ Success: false,+ Error: err.Error(),+ }), nil+ }++ return connect.NewResponse(&v1pb.TestEmailSettingResponse{+ Success: true,+ }), nil+}+func (s *SettingService) checkSettingPermission(ctx context.Context, req connect.AnyRequest, perm permission.Permission) error {user, ok := GetUserFromContext(ctx)if !ok {@@ -774,3 +866,25 @@ func (s *SettingService) validateEnvironments(ctx context.Context, workspaceID s}return nil}++func validateEmailSetting(setting *storepb.EmailSetting) error {+ if setting.From == "" {+ return errors.Errorf("from address is required")+ }+ switch setting.Type {+ case storepb.EmailSetting_SMTP:+ smtp := setting.GetSmtp()+ if smtp == nil {+ return errors.Errorf("smtp config is required when type is SMTP")+ }+ if smtp.Host == "" {+ return errors.Errorf("smtp host is required")+ }+ if smtp.Port <= 0 {+ return errors.Errorf("smtp port must be positive")+ }+ default:+ return errors.Errorf("unsupported email type: %v", setting.Type)+ }+ return nil+}diff --git a/backend/api/v1/setting_service_converter.go b/backend/api/v1/setting_service_converter.goindex 0eb0308856..ab792e7cb5 100644--- a/backend/api/v1/setting_service_converter.go+++ b/backend/api/v1/setting_service_converter.go@@ -118,6 +118,19 @@ func convertToSettingMessage(setting *store.SettingMessage) (*v1pb.Setting, erro},},}, nil+ case storepb.SettingName_EMAIL:+ storeValue, ok := setting.Value.(*storepb.EmailSetting)+ if !ok {+ return nil, connect.NewError(connect.CodeInternal, errors.Errorf("invalid setting value type for %s", setting.Name))+ }+ return &v1pb.Setting{+ Name: settingName,+ Value: &v1pb.SettingValue{+ Value: &v1pb.SettingValue_Email{+ Email: convertToEmailSetting(storeValue),+ },+ },+ }, nildefault:return nil, connect.NewError(connect.CodeInternal, errors.Errorf("unsupported setting %v", setting.Name))}@@ -157,6 +170,8 @@ func convertStoreSettingNameToV1(storeName storepb.SettingName) v1pb.Setting_Setreturn v1pb.Setting_SEMANTIC_TYPEScase storepb.SettingName_ENVIRONMENT:return v1pb.Setting_ENVIRONMENT+ case storepb.SettingName_EMAIL:+ return v1pb.Setting_EMAILcase storepb.SettingName_SYSTEM:// Backend-only setting, not exposed in v1 APIdefault:@@ -184,6 +199,8 @@ func convertV1SettingNameToStore(v1Name v1pb.Setting_SettingName) storepb.Settinreturn storepb.SettingName_SEMANTIC_TYPEScase v1pb.Setting_ENVIRONMENT:return storepb.SettingName_ENVIRONMENT+ case v1pb.Setting_EMAIL:+ return storepb.SettingName_EMAILdefault:return storepb.SettingName_SETTING_NAME_UNSPECIFIED}@@ -772,3 +789,51 @@ func convertToAISetting(storeSetting *storepb.AISetting) *v1pb.AISetting {Version: storeSetting.Version,}}++func convertEmailSetting(v1Setting *v1pb.EmailSetting) *storepb.EmailSetting {+ if v1Setting == nil {+ return nil+ }+ storeSetting := &storepb.EmailSetting{+ From: v1Setting.From,+ FromName: v1Setting.FromName,+ Type: storepb.EmailSetting_Type(v1Setting.Type),+ }+ if v1SMTP := v1Setting.GetSmtp(); v1SMTP != nil {+ storeSetting.Config = &storepb.EmailSetting_Smtp{+ Smtp: &storepb.EmailSetting_SMTPConfig{+ Host: v1SMTP.Host,+ Port: v1SMTP.Port,+ Username: v1SMTP.Username,+ Password: v1SMTP.Password,+ Encryption: storepb.EmailSetting_SMTPConfig_Encryption(v1SMTP.Encryption),+ Authentication: storepb.EmailSetting_SMTPConfig_Authentication(v1SMTP.Authentication),+ },+ }+ }+ return storeSetting+}++func convertToEmailSetting(storeSetting *storepb.EmailSetting) *v1pb.EmailSetting {+ if storeSetting == nil {+ return nil+ }+ v1Setting := &v1pb.EmailSetting{+ From: storeSetting.From,+ FromName: storeSetting.FromName,+ Type: v1pb.EmailSetting_Type(storeSetting.Type),+ }+ if storeSMTP := storeSetting.GetSmtp(); storeSMTP != nil {+ v1Setting.Config = &v1pb.EmailSetting_Smtp{+ Smtp: &v1pb.EmailSetting_SMTPConfig{+ Host: storeSMTP.Host,+ Port: storeSMTP.Port,+ Username: storeSMTP.Username,+ Password: "", // INPUT_ONLY: never return password+ Encryption: v1pb.EmailSetting_SMTPConfig_Encryption(storeSMTP.Encryption),+ Authentication: v1pb.EmailSetting_SMTPConfig_Authentication(storeSMTP.Authentication),+ },+ }+ }+ return v1Setting+}diff --git a/backend/api/v1/workspace_service.go b/backend/api/v1/workspace_service.goindex 7e19472dc7..80cead88e0 100644--- a/backend/api/v1/workspace_service.go+++ b/backend/api/v1/workspace_service.go@@ -2,19 +2,23 @@ package v1import ("context"+ "fmt""log/slog"+ "strings""connectrpc.com/connect""github.com/pkg/errors""google.golang.org/protobuf/encoding/protojson""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/enterprise"storepb "github.com/bytebase/bytebase/backend/generated-go/store"v1pb "github.com/bytebase/bytebase/backend/generated-go/v1""github.com/bytebase/bytebase/backend/generated-go/v1/v1connect"+ "github.com/bytebase/bytebase/backend/plugin/mailer""github.com/bytebase/bytebase/backend/store""github.com/bytebase/bytebase/backend/utils")@@ -270,8 +274,9 @@ func (s *WorkspaceService) SetIamPolicy(ctx context.Context, req *connect.Requesreturn nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to find iam policy"))}+ deltas := findIamPolicyDeltas(policyMessage.Policy, policy.Policy)+if setServiceData, ok := common.GetSetServiceDataFromContext(ctx); ok {- deltas := findIamPolicyDeltas(policyMessage.Policy, policy.Policy)p, err := convertToProtoAny(deltas)if err != nil {slog.Warn("audit: failed to convert to anypb.Any")@@ -279,6 +284,9 @@ func (s *WorkspaceService) SetIamPolicy(ctx context.Context, req *connect.RequessetServiceData(p)}+ // send invite emails to newly added members.+ go s.sendInviteEmails(context.WithoutCancel(ctx), workspaceID, policyMessage.Policy, deltas)+v1Policy, err := convertToV1IamPolicy(policy)if err != nil {return nil, err@@ -287,6 +295,111 @@ func (s *WorkspaceService) SetIamPolicy(ctx context.Context, req *connect.Requesreturn connect.NewResponse(v1Policy), nil}+// sendInviteEmails sends invite emails to newly added members. Errors are logged, never returned.+func (s *WorkspaceService) sendInviteEmails(ctx context.Context, workspaceID string, oldPolicy *storepb.IamPolicy, deltas []*v1pb.BindingDelta) {+ // Load email config.+ emailSettingMsg, err := s.store.GetSetting(ctx, workspaceID, storepb.SettingName_EMAIL)+ if err != nil || emailSettingMsg == nil {+ return+ }+ emailSetting, ok := emailSettingMsg.Value.(*storepb.EmailSetting)+ if !ok || emailSetting == nil {+ return+ }++ sender, err := mailer.NewSender(emailSetting)+ if err != nil {+ slog.Warn("failed to create mail sender for invite emails", log.BBError(err))+ return+ }++ // Get workspace URL and title.+ externalURL, err := utils.GetEffectiveExternalURL(ctx, s.store, s.profile, workspaceID)+ if err != nil {+ slog.Warn("failed to get external URL for invite emails", log.BBError(err))+ return+ }+ if externalURL == "" {+ slog.Warn("empty external URL, skip send invite emails")+ return+ }+ workspaceTitle := workspaceID+ if ws, err := s.store.GetWorkspaceByID(ctx, workspaceID); err == nil && ws != nil && ws.Payload.GetTitle() != "" {+ workspaceTitle = ws.Payload.GetTitle()+ }++ // Build set of members who already existed in the old policy (any role).+ existingMembers := make(map[string]bool)+ for _, binding := range oldPolicy.GetBindings() {+ for _, member := range binding.Members {+ if email, ok := strings.CutPrefix(member, common.UserNamePrefix); ok {+ existingMembers[email] = true+ } else if groupName, ok := strings.CutPrefix(member, common.GroupPrefix); ok {+ // Expand group to individual members.+ group, err := s.store.GetGroupByName(ctx, workspaceID, common.GroupPrefix+groupName)+ if err != nil || group == nil || group.Payload == nil {+ continue+ }+ for _, m := range group.Payload.Members {+ if email, ok := strings.CutPrefix(m.Member, common.UserNamePrefix); ok {+ existingMembers[email] = true+ }+ }+ }+ }+ }++ // Collect truly new user emails and their roles. Map deduplicates by email.+ invites := make(map[string]string) // email -> roleName+ for _, delta := range deltas {+ if delta.Action != v1pb.BindingDelta_ADD {+ continue+ }+ roleName := delta.Role+ if role, err := s.store.GetRole(ctx, &store.FindRoleMessage{Workspace: workspaceID, ResourceID: &delta.Role}); err == nil && role != nil {+ roleName = role.Name+ }++ // Direct user member.+ if email, ok := strings.CutPrefix(delta.Member, common.UserNamePrefix); ok {+ if !existingMembers[email] {+ invites[email] = roleName+ }+ continue+ }+ // Group member — expand to individual users.+ if groupName, ok := strings.CutPrefix(delta.Member, common.GroupPrefix); ok {+ group, err := s.store.GetGroupByName(ctx, workspaceID, common.GroupPrefix+groupName)+ if err != nil || group == nil || group.Payload == nil {+ continue+ }+ for _, m := range group.Payload.Members {+ if email, ok := strings.CutPrefix(m.Member, common.UserNamePrefix); ok {+ if !existingMembers[email] {+ invites[email] = roleName+ }+ }+ }+ }+ }+ if len(invites) == 0 {+ return+ }++ workspaceLink := fmt.Sprintf("%s?workspace=%s", externalURL, workspaceID)+ for email, roleName := range invites {+ subject := fmt.Sprintf("[Bytebase] You've been invited to workspace %q", workspaceTitle)+ body := fmt.Sprintf("Hi,\n\nYou've been added to the Bytebase workspace %q as %s.\n\nSign in to get started:\n%s\n\n— Bytebase", workspaceTitle, roleName, workspaceLink)+ if err := sender.Send(ctx, &mailer.SendRequest{+ To: []string{email},+ Subject: subject,+ TextBody: body,+ }); err != nil {+ slog.Warn("failed to send invite email", slog.String("to", email), log.BBError(err))+ }+ }+}+func containsActiveEndUser(users []*store.UserMessage) bool {for _, user := range users {if user.Type == storepb.PrincipalType_END_USER && !user.MemberDeleted {diff --git a/backend/bin/server/cmd/profile.go b/backend/bin/server/cmd/profile.goindex 755dedc1ea..0d18a6ddb7 100644--- a/backend/bin/server/cmd/profile.go+++ b/backend/bin/server/cmd/profile.go@@ -27,7 +27,6 @@ func getBaseProfile(dataDir string) *config.Profile {StripeAPISecret: os.Getenv("STRIPE_API_SECRET"),StripeWebhookSecret: os.Getenv("STRIPE_WEBHOOK_SECRET"),LicensePrivateKey: os.Getenv("LICENSE_PRIVATE_KEY"),- GeminiAPIKey: os.Getenv("GEMINI_API_KEY"),}config.LastActiveTS.Store(time.Now().Unix())diff --git a/backend/component/config/profile.go b/backend/component/config/profile.goindex 96a28f6ddd..68cb8507e9 100644--- a/backend/component/config/profile.go+++ b/backend/component/config/profile.go@@ -26,8 +26,6 @@ type Profile struct {StripeWebhookSecret string// LicensePrivateKey is the PEM-encoded RSA private key for signing license JWTs (SaaS only).LicensePrivateKey string- // GeminiAPIKey is the API key for Gemini AI. Only used when SaaS is true.- GeminiAPIKey string// DataDir is the directory stores the data including Bytebase's own database, backups, etc.DataDir string// Demo mode.diff --git a/backend/generated-go/store/setting.pb.go b/backend/generated-go/store/setting.pb.goindex 6793fa575b..d72db4626c 100644--- a/backend/generated-go/store/setting.pb.go+++ b/backend/generated-go/store/setting.pb.go@@ -36,6 +36,7 @@ const (SettingName_DATA_CLASSIFICATION SettingName = 6SettingName_SEMANTIC_TYPES SettingName = 7SettingName_ENVIRONMENT SettingName = 8+ SettingName_EMAIL SettingName = 9)// Enum value maps for SettingName.@@ -50,6 +51,7 @@ var (6: "DATA_CLASSIFICATION",7: "SEMANTIC_TYPES",8: "ENVIRONMENT",+ 9: "EMAIL",}SettingName_value = map[string]int32{"SETTING_NAME_UNSPECIFIED": 0,@@ -61,6 +63,7 @@ var ("DATA_CLASSIFICATION": 6,"SEMANTIC_TYPES": 7,"ENVIRONMENT": 8,+ "EMAIL": 9,})@@ -358,6 +361,159 @@ func (AISetting_Provider) EnumDescriptor() ([]byte, []int) {return file_store_setting_proto_rawDescGZIP(), []int{7, 0}}+type EmailSetting_Type int32++const (+ EmailSetting_TYPE_UNSPECIFIED EmailSetting_Type = 0+ EmailSetting_SMTP EmailSetting_Type = 1+)++// Enum value maps for EmailSetting_Type.+var (+ EmailSetting_Type_name = map[int32]string{+ 0: "TYPE_UNSPECIFIED",+ 1: "SMTP",+ }+ EmailSetting_Type_value = map[string]int32{+ "TYPE_UNSPECIFIED": 0,+ "SMTP": 1,+ }+)++func (x EmailSetting_Type) Enum() *EmailSetting_Type {+ p := new(EmailSetting_Type)+ *p = x+ return p+}++func (x EmailSetting_Type) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (EmailSetting_Type) Descriptor() protoreflect.EnumDescriptor {+ return file_store_setting_proto_enumTypes[6].Descriptor()+}++func (EmailSetting_Type) Type() protoreflect.EnumType {+ return &file_store_setting_proto_enumTypes[6]+}++func (x EmailSetting_Type) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use EmailSetting_Type.Descriptor instead.+func (EmailSetting_Type) EnumDescriptor() ([]byte, []int) {+ return file_store_setting_proto_rawDescGZIP(), []int{9, 0}+}++type EmailSetting_SMTPConfig_Encryption int32++const (+ EmailSetting_SMTPConfig_ENCRYPTION_UNSPECIFIED EmailSetting_SMTPConfig_Encryption = 0+ EmailSetting_SMTPConfig_ENCRYPTION_NONE EmailSetting_SMTPConfig_Encryption = 1+ EmailSetting_SMTPConfig_STARTTLS EmailSetting_SMTPConfig_Encryption = 2+ EmailSetting_SMTPConfig_SSL_TLS EmailSetting_SMTPConfig_Encryption = 3+)++// Enum value maps for EmailSetting_SMTPConfig_Encryption.+var (+ EmailSetting_SMTPConfig_Encryption_name = map[int32]string{+ 0: "ENCRYPTION_UNSPECIFIED",+ 1: "ENCRYPTION_NONE",+ 2: "STARTTLS",+ 3: "SSL_TLS",+ }+ EmailSetting_SMTPConfig_Encryption_value = map[string]int32{+ "ENCRYPTION_UNSPECIFIED": 0,+ "ENCRYPTION_NONE": 1,+ "STARTTLS": 2,+ "SSL_TLS": 3,+ }+)++func (x EmailSetting_SMTPConfig_Encryption) Enum() *EmailSetting_SMTPConfig_Encryption {+ p := new(EmailSetting_SMTPConfig_Encryption)+ *p = x+ return p+}++func (x EmailSetting_SMTPConfig_Encryption) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (EmailSetting_SMTPConfig_Encryption) Descriptor() protoreflect.EnumDescriptor {+ return file_store_setting_proto_enumTypes[7].Descriptor()+}++func (EmailSetting_SMTPConfig_Encryption) Type() protoreflect.EnumType {+ return &file_store_setting_proto_enumTypes[7]+}++func (x EmailSetting_SMTPConfig_Encryption) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use EmailSetting_SMTPConfig_Encryption.Descriptor instead.+func (EmailSetting_SMTPConfig_Encryption) EnumDescriptor() ([]byte, []int) {+ return file_store_setting_proto_rawDescGZIP(), []int{9, 0, 0}+}++type EmailSetting_SMTPConfig_Authentication int32++const (+ EmailSetting_SMTPConfig_AUTHENTICATION_UNSPECIFIED EmailSetting_SMTPConfig_Authentication = 0+ EmailSetting_SMTPConfig_AUTHENTICATION_NONE EmailSetting_SMTPConfig_Authentication = 1+ EmailSetting_SMTPConfig_PLAIN EmailSetting_SMTPConfig_Authentication = 2+ EmailSetting_SMTPConfig_LOGIN EmailSetting_SMTPConfig_Authentication = 3+ EmailSetting_SMTPConfig_CRAM_MD5 EmailSetting_SMTPConfig_Authentication = 4+)++// Enum value maps for EmailSetting_SMTPConfig_Authentication.+var (+ EmailSetting_SMTPConfig_Authentication_name = map[int32]string{+ 0: "AUTHENTICATION_UNSPECIFIED",+ 1: "AUTHENTICATION_NONE",+ 2: "PLAIN",+ 3: "LOGIN",+ 4: "CRAM_MD5",+ }+ EmailSetting_SMTPConfig_Authentication_value = map[string]int32{+ "AUTHENTICATION_UNSPECIFIED": 0,+ "AUTHENTICATION_NONE": 1,+ "PLAIN": 2,+ "LOGIN": 3,+ "CRAM_MD5": 4,+ }+)++func (x EmailSetting_SMTPConfig_Authentication) Enum() *EmailSetting_SMTPConfig_Authentication {+ p := new(EmailSetting_SMTPConfig_Authentication)+ *p = x+ return p+}++func (x EmailSetting_SMTPConfig_Authentication) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (EmailSetting_SMTPConfig_Authentication) Descriptor() protoreflect.EnumDescriptor {+ return file_store_setting_proto_enumTypes[8].Descriptor()+}++func (EmailSetting_SMTPConfig_Authentication) Type() protoreflect.EnumType {+ return &file_store_setting_proto_enumTypes[8]+}++func (x EmailSetting_SMTPConfig_Authentication) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use EmailSetting_SMTPConfig_Authentication.Descriptor instead.+func (EmailSetting_SMTPConfig_Authentication) EnumDescriptor() ([]byte, []int) {+ return file_store_setting_proto_rawDescGZIP(), []int{9, 0, 1}+}+type SystemSetting struct {state protoimpl.MessageState `protogen:"open.v1"`// Enterprise license JWT token.@@ -1040,6 +1196,96 @@ func (x *EnvironmentSetting) GetEnvironments() []*EnvironmentSetting_Environmentreturn nil}+type EmailSetting struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`+ FromName string `protobuf:"bytes,2,opt,name=from_name,json=fromName,proto3" json:"from_name,omitempty"`+ Type EmailSetting_Type `protobuf:"varint,3,opt,name=type,proto3,enum=bytebase.store.EmailSetting_Type" json:"type,omitempty"`+ // Types that are valid to be assigned to Config:+ //+ // *EmailSetting_Smtp+ Config isEmailSetting_Config `protobuf_oneof:"config"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *EmailSetting) Reset() {+ *x = EmailSetting{}+ mi := &file_store_setting_proto_msgTypes[9]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *EmailSetting) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*EmailSetting) ProtoMessage() {}++func (x *EmailSetting) ProtoReflect() protoreflect.Message {+ mi := &file_store_setting_proto_msgTypes[9]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use EmailSetting.ProtoReflect.Descriptor instead.+func (*EmailSetting) Descriptor() ([]byte, []int) {+ return file_store_setting_proto_rawDescGZIP(), []int{9}+}++func (x *EmailSetting) GetFrom() string {+ if x != nil {+ return x.From+ }+ return ""+}++func (x *EmailSetting) GetFromName() string {+ if x != nil {+ return x.FromName+ }+ return ""+}++func (x *EmailSetting) GetType() EmailSetting_Type {+ if x != nil {+ return x.Type+ }+ return EmailSetting_TYPE_UNSPECIFIED+}++func (x *EmailSetting) GetConfig() isEmailSetting_Config {+ if x != nil {+ return x.Config+ }+ return nil+}++func (x *EmailSetting) GetSmtp() *EmailSetting_SMTPConfig {+ if x != nil {+ if x, ok := x.Config.(*EmailSetting_Smtp); ok {+ return x.Smtp+ }+ }+ return nil+}++type isEmailSetting_Config interface {+ isEmailSetting_Config()+}++type EmailSetting_Smtp struct {+ Smtp *EmailSetting_SMTPConfig `protobuf:"bytes,4,opt,name=smtp,proto3,oneof"`+}++func (*EmailSetting_Smtp) isEmailSetting_Config() {}+type WorkspaceProfileSetting_Announcement struct {state protoimpl.MessageState `protogen:"open.v1"`// The alert level of the announcement.@@ -1054,7 +1300,7 @@ type WorkspaceProfileSetting_Announcement struct {func (x *WorkspaceProfileSetting_Announcement) Reset() {*x = WorkspaceProfileSetting_Announcement{}- mi := &file_store_setting_proto_msgTypes[9]+ mi := &file_store_setting_proto_msgTypes[10]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1066,7 +1312,7 @@ func (x *WorkspaceProfileSetting_Announcement) String() string {func (*WorkspaceProfileSetting_Announcement) ProtoMessage() {}func (x *WorkspaceProfileSetting_Announcement) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[9]+ mi := &file_store_setting_proto_msgTypes[10]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1125,7 +1371,7 @@ type WorkspaceProfileSetting_PasswordRestriction struct {func (x *WorkspaceProfileSetting_PasswordRestriction) Reset() {*x = WorkspaceProfileSetting_PasswordRestriction{}- mi := &file_store_setting_proto_msgTypes[10]+ mi := &file_store_setting_proto_msgTypes[11]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1137,7 +1383,7 @@ func (x *WorkspaceProfileSetting_PasswordRestriction) String() string {func (*WorkspaceProfileSetting_PasswordRestriction) ProtoMessage() {}func (x *WorkspaceProfileSetting_PasswordRestriction) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[10]+ mi := &file_store_setting_proto_msgTypes[11]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1213,7 +1459,7 @@ type WorkspaceApprovalSetting_Rule struct {func (x *WorkspaceApprovalSetting_Rule) Reset() {*x = WorkspaceApprovalSetting_Rule{}- mi := &file_store_setting_proto_msgTypes[11]+ mi := &file_store_setting_proto_msgTypes[12]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1225,7 +1471,7 @@ func (x *WorkspaceApprovalSetting_Rule) String() string {func (*WorkspaceApprovalSetting_Rule) ProtoMessage() {}func (x *WorkspaceApprovalSetting_Rule) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[11]+ mi := &file_store_setting_proto_msgTypes[12]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1279,7 +1525,7 @@ type DataClassificationSetting_DataClassificationConfig struct {func (x *DataClassificationSetting_DataClassificationConfig) Reset() {*x = DataClassificationSetting_DataClassificationConfig{}- mi := &file_store_setting_proto_msgTypes[12]+ mi := &file_store_setting_proto_msgTypes[13]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1291,7 +1537,7 @@ func (x *DataClassificationSetting_DataClassificationConfig) String() string {func (*DataClassificationSetting_DataClassificationConfig) ProtoMessage() {}func (x *DataClassificationSetting_DataClassificationConfig) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[12]+ mi := &file_store_setting_proto_msgTypes[13]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1346,7 +1592,7 @@ type DataClassificationSetting_DataClassificationConfig_Level struct {func (x *DataClassificationSetting_DataClassificationConfig_Level) Reset() {*x = DataClassificationSetting_DataClassificationConfig_Level{}- mi := &file_store_setting_proto_msgTypes[13]+ mi := &file_store_setting_proto_msgTypes[14]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1358,7 +1604,7 @@ func (x *DataClassificationSetting_DataClassificationConfig_Level) String() strifunc (*DataClassificationSetting_DataClassificationConfig_Level) ProtoMessage() {}func (x *DataClassificationSetting_DataClassificationConfig_Level) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[13]+ mi := &file_store_setting_proto_msgTypes[14]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1401,7 +1647,7 @@ type DataClassificationSetting_DataClassificationConfig_DataClassification strucfunc (x *DataClassificationSetting_DataClassificationConfig_DataClassification) Reset() {*x = DataClassificationSetting_DataClassificationConfig_DataClassification{}- mi := &file_store_setting_proto_msgTypes[14]+ mi := &file_store_setting_proto_msgTypes[15]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1413,7 +1659,7 @@ func (x *DataClassificationSetting_DataClassificationConfig_DataClassification)func (*DataClassificationSetting_DataClassificationConfig_DataClassification) ProtoMessage() {}func (x *DataClassificationSetting_DataClassificationConfig_DataClassification) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[14]+ mi := &file_store_setting_proto_msgTypes[15]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1461,7 +1707,7 @@ type Algorithm_FullMask struct {func (x *Algorithm_FullMask) Reset() {*x = Algorithm_FullMask{}- mi := &file_store_setting_proto_msgTypes[16]+ mi := &file_store_setting_proto_msgTypes[17]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1473,7 +1719,7 @@ func (x *Algorithm_FullMask) String() string {func (*Algorithm_FullMask) ProtoMessage() {}func (x *Algorithm_FullMask) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[16]+ mi := &file_store_setting_proto_msgTypes[17]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1507,7 +1753,7 @@ type Algorithm_RangeMask struct {func (x *Algorithm_RangeMask) Reset() {*x = Algorithm_RangeMask{}- mi := &file_store_setting_proto_msgTypes[17]+ mi := &file_store_setting_proto_msgTypes[18]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1519,7 +1765,7 @@ func (x *Algorithm_RangeMask) String() string {func (*Algorithm_RangeMask) ProtoMessage() {}func (x *Algorithm_RangeMask) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[17]+ mi := &file_store_setting_proto_msgTypes[18]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1552,7 +1798,7 @@ type Algorithm_MD5Mask struct {func (x *Algorithm_MD5Mask) Reset() {*x = Algorithm_MD5Mask{}- mi := &file_store_setting_proto_msgTypes[18]+ mi := &file_store_setting_proto_msgTypes[19]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1564,7 +1810,7 @@ func (x *Algorithm_MD5Mask) String() string {func (*Algorithm_MD5Mask) ProtoMessage() {}func (x *Algorithm_MD5Mask) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[18]+ mi := &file_store_setting_proto_msgTypes[19]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1599,7 +1845,7 @@ type Algorithm_InnerOuterMask struct {func (x *Algorithm_InnerOuterMask) Reset() {*x = Algorithm_InnerOuterMask{}- mi := &file_store_setting_proto_msgTypes[19]+ mi := &file_store_setting_proto_msgTypes[20]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1611,7 +1857,7 @@ func (x *Algorithm_InnerOuterMask) String() string {func (*Algorithm_InnerOuterMask) ProtoMessage() {}func (x *Algorithm_InnerOuterMask) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[19]+ mi := &file_store_setting_proto_msgTypes[20]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1672,7 +1918,7 @@ type Algorithm_RangeMask_Slice struct {func (x *Algorithm_RangeMask_Slice) Reset() {*x = Algorithm_RangeMask_Slice{}- mi := &file_store_setting_proto_msgTypes[20]+ mi := &file_store_setting_proto_msgTypes[21]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1684,7 +1930,7 @@ func (x *Algorithm_RangeMask_Slice) String() string {func (*Algorithm_RangeMask_Slice) ProtoMessage() {}func (x *Algorithm_RangeMask_Slice) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[20]+ mi := &file_store_setting_proto_msgTypes[21]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1738,7 +1984,7 @@ type SemanticTypeSetting_SemanticType struct {func (x *SemanticTypeSetting_SemanticType) Reset() {*x = SemanticTypeSetting_SemanticType{}- mi := &file_store_setting_proto_msgTypes[21]+ mi := &file_store_setting_proto_msgTypes[22]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1750,7 +1996,7 @@ func (x *SemanticTypeSetting_SemanticType) String() string {func (*SemanticTypeSetting_SemanticType) ProtoMessage() {}func (x *SemanticTypeSetting_SemanticType) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[21]+ mi := &file_store_setting_proto_msgTypes[22]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1810,7 +2056,7 @@ type AppIMSetting_Slack struct {func (x *AppIMSetting_Slack) Reset() {*x = AppIMSetting_Slack{}- mi := &file_store_setting_proto_msgTypes[22]+ mi := &file_store_setting_proto_msgTypes[23]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1822,7 +2068,7 @@ func (x *AppIMSetting_Slack) String() string {func (*AppIMSetting_Slack) ProtoMessage() {}func (x *AppIMSetting_Slack) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[22]+ mi := &file_store_setting_proto_msgTypes[23]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1855,7 +2101,7 @@ type AppIMSetting_Feishu struct {func (x *AppIMSetting_Feishu) Reset() {*x = AppIMSetting_Feishu{}- mi := &file_store_setting_proto_msgTypes[23]+ mi := &file_store_setting_proto_msgTypes[24]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1867,7 +2113,7 @@ func (x *AppIMSetting_Feishu) String() string {func (*AppIMSetting_Feishu) ProtoMessage() {}func (x *AppIMSetting_Feishu) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[23]+ mi := &file_store_setting_proto_msgTypes[24]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1908,7 +2154,7 @@ type AppIMSetting_Wecom struct {func (x *AppIMSetting_Wecom) Reset() {*x = AppIMSetting_Wecom{}- mi := &file_store_setting_proto_msgTypes[24]+ mi := &file_store_setting_proto_msgTypes[25]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1920,7 +2166,7 @@ func (x *AppIMSetting_Wecom) String() string {func (*AppIMSetting_Wecom) ProtoMessage() {}func (x *AppIMSetting_Wecom) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[24]+ mi := &file_store_setting_proto_msgTypes[25]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1967,7 +2213,7 @@ type AppIMSetting_Lark struct {func (x *AppIMSetting_Lark) Reset() {*x = AppIMSetting_Lark{}- mi := &file_store_setting_proto_msgTypes[25]+ mi := &file_store_setting_proto_msgTypes[26]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1979,7 +2225,7 @@ func (x *AppIMSetting_Lark) String() string {func (*AppIMSetting_Lark) ProtoMessage() {}func (x *AppIMSetting_Lark) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[25]+ mi := &file_store_setting_proto_msgTypes[26]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2020,7 +2266,7 @@ type AppIMSetting_DingTalk struct {func (x *AppIMSetting_DingTalk) Reset() {*x = AppIMSetting_DingTalk{}- mi := &file_store_setting_proto_msgTypes[26]+ mi := &file_store_setting_proto_msgTypes[27]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2032,7 +2278,7 @@ func (x *AppIMSetting_DingTalk) String() string {func (*AppIMSetting_DingTalk) ProtoMessage() {}func (x *AppIMSetting_DingTalk) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[26]+ mi := &file_store_setting_proto_msgTypes[27]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2083,7 +2329,7 @@ type AppIMSetting_Teams struct {func (x *AppIMSetting_Teams) Reset() {*x = AppIMSetting_Teams{}- mi := &file_store_setting_proto_msgTypes[27]+ mi := &file_store_setting_proto_msgTypes[28]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2095,7 +2341,7 @@ func (x *AppIMSetting_Teams) String() string {func (*AppIMSetting_Teams) ProtoMessage() {}func (x *AppIMSetting_Teams) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[27]+ mi := &file_store_setting_proto_msgTypes[28]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2150,7 +2396,7 @@ type AppIMSetting_IMSetting struct {func (x *AppIMSetting_IMSetting) Reset() {*x = AppIMSetting_IMSetting{}- mi := &file_store_setting_proto_msgTypes[28]+ mi := &file_store_setting_proto_msgTypes[29]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2162,7 +2408,7 @@ func (x *AppIMSetting_IMSetting) String() string {func (*AppIMSetting_IMSetting) ProtoMessage() {}func (x *AppIMSetting_IMSetting) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[28]+ mi := &file_store_setting_proto_msgTypes[29]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2303,7 +2549,7 @@ type EnvironmentSetting_Environment struct {func (x *EnvironmentSetting_Environment) Reset() {*x = EnvironmentSetting_Environment{}- mi := &file_store_setting_proto_msgTypes[29]+ mi := &file_store_setting_proto_msgTypes[30]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2315,7 +2561,7 @@ func (x *EnvironmentSetting_Environment) String() string {func (*EnvironmentSetting_Environment) ProtoMessage() {}func (x *EnvironmentSetting_Environment) ProtoReflect() protoreflect.Message {- mi := &file_store_setting_proto_msgTypes[29]+ mi := &file_store_setting_proto_msgTypes[30]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2366,6 +2612,90 @@ func (x *EnvironmentSetting_Environment) GetColor() string {return ""}+type EmailSetting_SMTPConfig struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`+ Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`+ Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`+ Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"`+ Encryption EmailSetting_SMTPConfig_Encryption `protobuf:"varint,5,opt,name=encryption,proto3,enum=bytebase.store.EmailSetting_SMTPConfig_Encryption" json:"encryption,omitempty"`+ Authentication EmailSetting_SMTPConfig_Authentication `protobuf:"varint,6,opt,name=authentication,proto3,enum=bytebase.store.EmailSetting_SMTPConfig_Authentication" json:"authentication,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *EmailSetting_SMTPConfig) Reset() {+ *x = EmailSetting_SMTPConfig{}+ mi := &file_store_setting_proto_msgTypes[32]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *EmailSetting_SMTPConfig) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*EmailSetting_SMTPConfig) ProtoMessage() {}++func (x *EmailSetting_SMTPConfig) ProtoReflect() protoreflect.Message {+ mi := &file_store_setting_proto_msgTypes[32]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use EmailSetting_SMTPConfig.ProtoReflect.Descriptor instead.+func (*EmailSetting_SMTPConfig) Descriptor() ([]byte, []int) {+ return file_store_setting_proto_rawDescGZIP(), []int{9, 0}+}++func (x *EmailSetting_SMTPConfig) GetHost() string {+ if x != nil {+ return x.Host+ }+ return ""+}++func (x *EmailSetting_SMTPConfig) GetPort() int32 {+ if x != nil {+ return x.Port+ }+ return 0+}++func (x *EmailSetting_SMTPConfig) GetUsername() string {+ if x != nil {+ return x.Username+ }+ return ""+}++func (x *EmailSetting_SMTPConfig) GetPassword() string {+ if x != nil {+ return x.Password+ }+ return ""+}++func (x *EmailSetting_SMTPConfig) GetEncryption() EmailSetting_SMTPConfig_Encryption {+ if x != nil {+ return x.Encryption+ }+ return EmailSetting_SMTPConfig_ENCRYPTION_UNSPECIFIED+}++func (x *EmailSetting_SMTPConfig) GetAuthentication() EmailSetting_SMTPConfig_Authentication {+ if x != nil {+ return x.Authentication+ }+ return EmailSetting_SMTPConfig_AUTHENTICATION_UNSPECIFIED+}+var File_store_setting_proto protoreflect.FileDescriptorconst file_store_setting_proto_rawDesc = "" +@@ -2546,7 +2876,38 @@ const file_store_setting_proto_rawDesc = "" +"\x05color\x18\x05 \x01(\tR\x05color\x1a7\n" +"\tTagsEntry\x12\x10\n" +"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +- "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01*\xb8\x01\n" ++ "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xd3\x05\n" ++ "\fEmailSetting\x12\x12\n" ++ "\x04from\x18\x01 \x01(\tR\x04from\x12\x1b\n" ++ "\tfrom_name\x18\x02 \x01(\tR\bfromName\x125\n" ++ "\x04type\x18\x03 \x01(\x0e2!.bytebase.store.EmailSetting.TypeR\x04type\x12=\n" ++ "\x04smtp\x18\x04 \x01(\v2'.bytebase.store.EmailSetting.SMTPConfigH\x00R\x04smtp\x1a\xe9\x03\n" ++ "\n" ++ "SMTPConfig\x12\x12\n" ++ "\x04host\x18\x01 \x01(\tR\x04host\x12\x12\n" ++ "\x04port\x18\x02 \x01(\x05R\x04port\x12\x1a\n" ++ "\busername\x18\x03 \x01(\tR\busername\x12\x1a\n" ++ "\bpassword\x18\x04 \x01(\tR\bpassword\x12R\n" ++ "\n" ++ "encryption\x18\x05 \x01(\x0e22.bytebase.store.EmailSetting.SMTPConfig.EncryptionR\n" ++ "encryption\x12^\n" ++ "\x0eauthentication\x18\x06 \x01(\x0e26.bytebase.store.EmailSetting.SMTPConfig.AuthenticationR\x0eauthentication\"X\n" ++ "\n" ++ "Encryption\x12\x1a\n" ++ "\x16ENCRYPTION_UNSPECIFIED\x10\x00\x12\x13\n" ++ "\x0fENCRYPTION_NONE\x10\x01\x12\f\n" ++ "\bSTARTTLS\x10\x02\x12\v\n" ++ "\aSSL_TLS\x10\x03\"m\n" ++ "\x0eAuthentication\x12\x1e\n" ++ "\x1aAUTHENTICATION_UNSPECIFIED\x10\x00\x12\x17\n" ++ "\x13AUTHENTICATION_NONE\x10\x01\x12\t\n" ++ "\x05PLAIN\x10\x02\x12\t\n" ++ "\x05LOGIN\x10\x03\x12\f\n" ++ "\bCRAM_MD5\x10\x04\"&\n" ++ "\x04Type\x12\x14\n" ++ "\x10TYPE_UNSPECIFIED\x10\x00\x12\b\n" ++ "\x04SMTP\x10\x01B\b\n" ++ "\x06config*\xc3\x01\n" +"\vSettingName\x12\x1c\n" +"\x18SETTING_NAME_UNSPECIFIED\x10\x00\x12\n" +"\n" +@@ -2558,7 +2919,8 @@ const file_store_setting_proto_rawDesc = "" +"\x02AI\x10\x05\x12\x17\n" +"\x13DATA_CLASSIFICATION\x10\x06\x12\x12\n" +"\x0eSEMANTIC_TYPES\x10\a\x12\x0f\n" +- "\vENVIRONMENT\x10\bB\x8f\x01\n" ++ "\vENVIRONMENT\x10\b\x12\t\n" ++ "\x05EMAIL\x10\tB\x8f\x01\n" +"\x12com.bytebase.storeB\fSettingProtoP\x01Z\x12generated-go/store\xa2\x02\x03BSX\xaa\x02\x0eBytebase.Store\xca\x02\x0eBytebase\\Store\xe2\x02\x1aBytebase\\Store\\GPBMetadata\xea\x02\x0fBytebase::Storeb\x06proto3"var (@@ -2573,8 +2935,8 @@ func file_store_setting_proto_rawDescGZIP() []byte {return file_store_setting_proto_rawDescData}-var file_store_setting_proto_enumTypes = make([]protoimpl.EnumInfo, 6)-var file_store_setting_proto_msgTypes = make([]protoimpl.MessageInfo, 31)+var file_store_setting_proto_enumTypes = make([]protoimpl.EnumInfo, 9)+var file_store_setting_proto_msgTypes = make([]protoimpl.MessageInfo, 33)var file_store_setting_proto_goTypes = []any{(SettingName)(0), // 0: bytebase.store.SettingName(WorkspaceProfileSetting_DatabaseChangeMode)(0), // 1: bytebase.store.WorkspaceProfileSetting.DatabaseChangeMode@@ -2582,85 +2944,94 @@ var file_store_setting_proto_goTypes = []any{(WorkspaceApprovalSetting_Rule_Source)(0), // 3: bytebase.store.WorkspaceApprovalSetting.Rule.Source(Algorithm_InnerOuterMask_MaskType)(0), // 4: bytebase.store.Algorithm.InnerOuterMask.MaskType(AISetting_Provider)(0), // 5: bytebase.store.AISetting.Provider- (*SystemSetting)(nil), // 6: bytebase.store.SystemSetting- (*WorkspaceProfileSetting)(nil), // 7: bytebase.store.WorkspaceProfileSetting- (*WorkspaceApprovalSetting)(nil), // 8: bytebase.store.WorkspaceApprovalSetting- (*DataClassificationSetting)(nil), // 9: bytebase.store.DataClassificationSetting- (*Algorithm)(nil), // 10: bytebase.store.Algorithm- (*SemanticTypeSetting)(nil), // 11: bytebase.store.SemanticTypeSetting- (*AppIMSetting)(nil), // 12: bytebase.store.AppIMSetting- (*AISetting)(nil), // 13: bytebase.store.AISetting- (*EnvironmentSetting)(nil), // 14: bytebase.store.EnvironmentSetting- (*WorkspaceProfileSetting_Announcement)(nil), // 15: bytebase.store.WorkspaceProfileSetting.Announcement- (*WorkspaceProfileSetting_PasswordRestriction)(nil), // 16: bytebase.store.WorkspaceProfileSetting.PasswordRestriction- (*WorkspaceApprovalSetting_Rule)(nil), // 17: bytebase.store.WorkspaceApprovalSetting.Rule- (*DataClassificationSetting_DataClassificationConfig)(nil), // 18: bytebase.store.DataClassificationSetting.DataClassificationConfig- (*DataClassificationSetting_DataClassificationConfig_Level)(nil), // 19: bytebase.store.DataClassificationSetting.DataClassificationConfig.Level- (*DataClassificationSetting_DataClassificationConfig_DataClassification)(nil), // 20: bytebase.store.DataClassificationSetting.DataClassificationConfig.DataClassification- nil, // 21: bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry- (*Algorithm_FullMask)(nil), // 22: bytebase.store.Algorithm.FullMask- (*Algorithm_RangeMask)(nil), // 23: bytebase.store.Algorithm.RangeMask- (*Algorithm_MD5Mask)(nil), // 24: bytebase.store.Algorithm.MD5Mask- (*Algorithm_InnerOuterMask)(nil), // 25: bytebase.store.Algorithm.InnerOuterMask- (*Algorithm_RangeMask_Slice)(nil), // 26: bytebase.store.Algorithm.RangeMask.Slice- (*SemanticTypeSetting_SemanticType)(nil), // 27: bytebase.store.SemanticTypeSetting.SemanticType- (*AppIMSetting_Slack)(nil), // 28: bytebase.store.AppIMSetting.Slack- (*AppIMSetting_Feishu)(nil), // 29: bytebase.store.AppIMSetting.Feishu- (*AppIMSetting_Wecom)(nil), // 30: bytebase.store.AppIMSetting.Wecom- (*AppIMSetting_Lark)(nil), // 31: bytebase.store.AppIMSetting.Lark- (*AppIMSetting_DingTalk)(nil), // 32: bytebase.store.AppIMSetting.DingTalk- (*AppIMSetting_Teams)(nil), // 33: bytebase.store.AppIMSetting.Teams- (*AppIMSetting_IMSetting)(nil), // 34: bytebase.store.AppIMSetting.IMSetting- (*EnvironmentSetting_Environment)(nil), // 35: bytebase.store.EnvironmentSetting.Environment- nil, // 36: bytebase.store.EnvironmentSetting.Environment.TagsEntry- (*durationpb.Duration)(nil), // 37: google.protobuf.Duration- (*ApprovalTemplate)(nil), // 38: bytebase.store.ApprovalTemplate- (*expr.Expr)(nil), // 39: google.type.Expr- (WebhookType)(0), // 40: bytebase.store.WebhookType+ (EmailSetting_Type)(0), // 6: bytebase.store.EmailSetting.Type+ (EmailSetting_SMTPConfig_Encryption)(0), // 7: bytebase.store.EmailSetting.SMTPConfig.Encryption+ (EmailSetting_SMTPConfig_Authentication)(0), // 8: bytebase.store.EmailSetting.SMTPConfig.Authentication+ (*SystemSetting)(nil), // 9: bytebase.store.SystemSetting+ (*WorkspaceProfileSetting)(nil), // 10: bytebase.store.WorkspaceProfileSetting+ (*WorkspaceApprovalSetting)(nil), // 11: bytebase.store.WorkspaceApprovalSetting+ (*DataClassificationSetting)(nil), // 12: bytebase.store.DataClassificationSetting+ (*Algorithm)(nil), // 13: bytebase.store.Algorithm+ (*SemanticTypeSetting)(nil), // 14: bytebase.store.SemanticTypeSetting+ (*AppIMSetting)(nil), // 15: bytebase.store.AppIMSetting+ (*AISetting)(nil), // 16: bytebase.store.AISetting+ (*EnvironmentSetting)(nil), // 17: bytebase.store.EnvironmentSetting+ (*EmailSetting)(nil), // 18: bytebase.store.EmailSetting+ (*WorkspaceProfileSetting_Announcement)(nil), // 19: bytebase.store.WorkspaceProfileSetting.Announcement+ (*WorkspaceProfileSetting_PasswordRestriction)(nil), // 20: bytebase.store.WorkspaceProfileSetting.PasswordRestriction+ (*WorkspaceApprovalSetting_Rule)(nil), // 21: bytebase.store.WorkspaceApprovalSetting.Rule+ (*DataClassificationSetting_DataClassificationConfig)(nil), // 22: bytebase.store.DataClassificationSetting.DataClassificationConfig+ (*DataClassificationSetting_DataClassificationConfig_Level)(nil), // 23: bytebase.store.DataClassificationSetting.DataClassificationConfig.Level+ (*DataClassificationSetting_DataClassificationConfig_DataClassification)(nil), // 24: bytebase.store.DataClassificationSetting.DataClassificationConfig.DataClassification+ nil, // 25: bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry+ (*Algorithm_FullMask)(nil), // 26: bytebase.store.Algorithm.FullMask+ (*Algorithm_RangeMask)(nil), // 27: bytebase.store.Algorithm.RangeMask+ (*Algorithm_MD5Mask)(nil), // 28: bytebase.store.Algorithm.MD5Mask+ (*Algorithm_InnerOuterMask)(nil), // 29: bytebase.store.Algorithm.InnerOuterMask+ (*Algorithm_RangeMask_Slice)(nil), // 30: bytebase.store.Algorithm.RangeMask.Slice+ (*SemanticTypeSetting_SemanticType)(nil), // 31: bytebase.store.SemanticTypeSetting.SemanticType+ (*AppIMSetting_Slack)(nil), // 32: bytebase.store.AppIMSetting.Slack+ (*AppIMSetting_Feishu)(nil), // 33: bytebase.store.AppIMSetting.Feishu+ (*AppIMSetting_Wecom)(nil), // 34: bytebase.store.AppIMSetting.Wecom+ (*AppIMSetting_Lark)(nil), // 35: bytebase.store.AppIMSetting.Lark+ (*AppIMSetting_DingTalk)(nil), // 36: bytebase.store.AppIMSetting.DingTalk+ (*AppIMSetting_Teams)(nil), // 37: bytebase.store.AppIMSetting.Teams+ (*AppIMSetting_IMSetting)(nil), // 38: bytebase.store.AppIMSetting.IMSetting+ (*EnvironmentSetting_Environment)(nil), // 39: bytebase.store.EnvironmentSetting.Environment+ nil, // 40: bytebase.store.EnvironmentSetting.Environment.TagsEntry+ (*EmailSetting_SMTPConfig)(nil), // 41: bytebase.store.EmailSetting.SMTPConfig+ (*durationpb.Duration)(nil), // 42: google.protobuf.Duration+ (*ApprovalTemplate)(nil), // 43: bytebase.store.ApprovalTemplate+ (*expr.Expr)(nil), // 44: google.type.Expr+ (WebhookType)(0), // 45: bytebase.store.WebhookType}var file_store_setting_proto_depIdxs = []int32{- 37, // 0: bytebase.store.WorkspaceProfileSetting.refresh_token_duration:type_name -> google.protobuf.Duration- 15, // 1: bytebase.store.WorkspaceProfileSetting.announcement:type_name -> bytebase.store.WorkspaceProfileSetting.Announcement- 37, // 2: bytebase.store.WorkspaceProfileSetting.maximum_role_expiration:type_name -> google.protobuf.Duration+ 42, // 0: bytebase.store.WorkspaceProfileSetting.refresh_token_duration:type_name -> google.protobuf.Duration+ 19, // 1: bytebase.store.WorkspaceProfileSetting.announcement:type_name -> bytebase.store.WorkspaceProfileSetting.Announcement+ 42, // 2: bytebase.store.WorkspaceProfileSetting.maximum_role_expiration:type_name -> google.protobuf.Duration1, // 3: bytebase.store.WorkspaceProfileSetting.database_change_mode:type_name -> bytebase.store.WorkspaceProfileSetting.DatabaseChangeMode- 37, // 4: bytebase.store.WorkspaceProfileSetting.inactive_session_timeout:type_name -> google.protobuf.Duration- 16, // 5: bytebase.store.WorkspaceProfileSetting.password_restriction:type_name -> bytebase.store.WorkspaceProfileSetting.PasswordRestriction- 37, // 6: bytebase.store.WorkspaceProfileSetting.access_token_duration:type_name -> google.protobuf.Duration- 37, // 7: bytebase.store.WorkspaceProfileSetting.query_timeout:type_name -> google.protobuf.Duration- 17, // 8: bytebase.store.WorkspaceApprovalSetting.rules:type_name -> bytebase.store.WorkspaceApprovalSetting.Rule- 18, // 9: bytebase.store.DataClassificationSetting.configs:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig- 22, // 10: bytebase.store.Algorithm.full_mask:type_name -> bytebase.store.Algorithm.FullMask- 23, // 11: bytebase.store.Algorithm.range_mask:type_name -> bytebase.store.Algorithm.RangeMask- 24, // 12: bytebase.store.Algorithm.md5_mask:type_name -> bytebase.store.Algorithm.MD5Mask- 25, // 13: bytebase.store.Algorithm.inner_outer_mask:type_name -> bytebase.store.Algorithm.InnerOuterMask- 27, // 14: bytebase.store.SemanticTypeSetting.types:type_name -> bytebase.store.SemanticTypeSetting.SemanticType- 34, // 15: bytebase.store.AppIMSetting.settings:type_name -> bytebase.store.AppIMSetting.IMSetting+ 42, // 4: bytebase.store.WorkspaceProfileSetting.inactive_session_timeout:type_name -> google.protobuf.Duration+ 20, // 5: bytebase.store.WorkspaceProfileSetting.password_restriction:type_name -> bytebase.store.WorkspaceProfileSetting.PasswordRestriction+ 42, // 6: bytebase.store.WorkspaceProfileSetting.access_token_duration:type_name -> google.protobuf.Duration+ 42, // 7: bytebase.store.WorkspaceProfileSetting.query_timeout:type_name -> google.protobuf.Duration+ 21, // 8: bytebase.store.WorkspaceApprovalSetting.rules:type_name -> bytebase.store.WorkspaceApprovalSetting.Rule+ 22, // 9: bytebase.store.DataClassificationSetting.configs:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig+ 26, // 10: bytebase.store.Algorithm.full_mask:type_name -> bytebase.store.Algorithm.FullMask+ 27, // 11: bytebase.store.Algorithm.range_mask:type_name -> bytebase.store.Algorithm.RangeMask+ 28, // 12: bytebase.store.Algorithm.md5_mask:type_name -> bytebase.store.Algorithm.MD5Mask+ 29, // 13: bytebase.store.Algorithm.inner_outer_mask:type_name -> bytebase.store.Algorithm.InnerOuterMask+ 31, // 14: bytebase.store.SemanticTypeSetting.types:type_name -> bytebase.store.SemanticTypeSetting.SemanticType+ 38, // 15: bytebase.store.AppIMSetting.settings:type_name -> bytebase.store.AppIMSetting.IMSetting5, // 16: bytebase.store.AISetting.provider:type_name -> bytebase.store.AISetting.Provider- 35, // 17: bytebase.store.EnvironmentSetting.environments:type_name -> bytebase.store.EnvironmentSetting.Environment- 2, // 18: bytebase.store.WorkspaceProfileSetting.Announcement.level:type_name -> bytebase.store.WorkspaceProfileSetting.Announcement.AlertLevel- 37, // 19: bytebase.store.WorkspaceProfileSetting.PasswordRestriction.password_rotation:type_name -> google.protobuf.Duration- 38, // 20: bytebase.store.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.store.ApprovalTemplate- 39, // 21: bytebase.store.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr- 3, // 22: bytebase.store.WorkspaceApprovalSetting.Rule.source:type_name -> bytebase.store.WorkspaceApprovalSetting.Rule.Source- 19, // 23: bytebase.store.DataClassificationSetting.DataClassificationConfig.levels:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.Level- 21, // 24: bytebase.store.DataClassificationSetting.DataClassificationConfig.classification:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry- 20, // 25: bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry.value:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.DataClassification- 26, // 26: bytebase.store.Algorithm.RangeMask.slices:type_name -> bytebase.store.Algorithm.RangeMask.Slice- 4, // 27: bytebase.store.Algorithm.InnerOuterMask.type:type_name -> bytebase.store.Algorithm.InnerOuterMask.MaskType- 10, // 28: bytebase.store.SemanticTypeSetting.SemanticType.algorithm:type_name -> bytebase.store.Algorithm- 40, // 29: bytebase.store.AppIMSetting.IMSetting.type:type_name -> bytebase.store.WebhookType- 28, // 30: bytebase.store.AppIMSetting.IMSetting.slack:type_name -> bytebase.store.AppIMSetting.Slack- 29, // 31: bytebase.store.AppIMSetting.IMSetting.feishu:type_name -> bytebase.store.AppIMSetting.Feishu- 30, // 32: bytebase.store.AppIMSetting.IMSetting.wecom:type_name -> bytebase.store.AppIMSetting.Wecom- 31, // 33: bytebase.store.AppIMSetting.IMSetting.lark:type_name -> bytebase.store.AppIMSetting.Lark- 32, // 34: bytebase.store.AppIMSetting.IMSetting.dingtalk:type_name -> bytebase.store.AppIMSetting.DingTalk- 33, // 35: bytebase.store.AppIMSetting.IMSetting.teams:type_name -> bytebase.store.AppIMSetting.Teams- 36, // 36: bytebase.store.EnvironmentSetting.Environment.tags:type_name -> bytebase.store.EnvironmentSetting.Environment.TagsEntry- 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, // 17: bytebase.store.EnvironmentSetting.environments:type_name -> bytebase.store.EnvironmentSetting.Environment+ 6, // 18: bytebase.store.EmailSetting.type:type_name -> bytebase.store.EmailSetting.Type+ 41, // 19: bytebase.store.EmailSetting.smtp:type_name -> bytebase.store.EmailSetting.SMTPConfig+ 2, // 20: bytebase.store.WorkspaceProfileSetting.Announcement.level:type_name -> bytebase.store.WorkspaceProfileSetting.Announcement.AlertLevel+ 42, // 21: bytebase.store.WorkspaceProfileSetting.PasswordRestriction.password_rotation:type_name -> google.protobuf.Duration+ 43, // 22: bytebase.store.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.store.ApprovalTemplate+ 44, // 23: bytebase.store.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr+ 3, // 24: bytebase.store.WorkspaceApprovalSetting.Rule.source:type_name -> bytebase.store.WorkspaceApprovalSetting.Rule.Source+ 23, // 25: bytebase.store.DataClassificationSetting.DataClassificationConfig.levels:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.Level+ 25, // 26: bytebase.store.DataClassificationSetting.DataClassificationConfig.classification:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry+ 24, // 27: bytebase.store.DataClassificationSetting.DataClassificationConfig.ClassificationEntry.value:type_name -> bytebase.store.DataClassificationSetting.DataClassificationConfig.DataClassification+ 30, // 28: bytebase.store.Algorithm.RangeMask.slices:type_name -> bytebase.store.Algorithm.RangeMask.Slice+ 4, // 29: bytebase.store.Algorithm.InnerOuterMask.type:type_name -> bytebase.store.Algorithm.InnerOuterMask.MaskType+ 13, // 30: bytebase.store.SemanticTypeSetting.SemanticType.algorithm:type_name -> bytebase.store.Algorithm+ 45, // 31: bytebase.store.AppIMSetting.IMSetting.type:type_name -> bytebase.store.WebhookType+ 32, // 32: bytebase.store.AppIMSetting.IMSetting.slack:type_name -> bytebase.store.AppIMSetting.Slack+ 33, // 33: bytebase.store.AppIMSetting.IMSetting.feishu:type_name -> bytebase.store.AppIMSetting.Feishu+ 34, // 34: bytebase.store.AppIMSetting.IMSetting.wecom:type_name -> bytebase.store.AppIMSetting.Wecom+ 35, // 35: bytebase.store.AppIMSetting.IMSetting.lark:type_name -> bytebase.store.AppIMSetting.Lark+ 36, // 36: bytebase.store.AppIMSetting.IMSetting.dingtalk:type_name -> bytebase.store.AppIMSetting.DingTalk+ 37, // 37: bytebase.store.AppIMSetting.IMSetting.teams:type_name -> bytebase.store.AppIMSetting.Teams+ 40, // 38: bytebase.store.EnvironmentSetting.Environment.tags:type_name -> bytebase.store.EnvironmentSetting.Environment.TagsEntry+ 7, // 39: bytebase.store.EmailSetting.SMTPConfig.encryption:type_name -> bytebase.store.EmailSetting.SMTPConfig.Encryption+ 8, // 40: bytebase.store.EmailSetting.SMTPConfig.authentication:type_name -> bytebase.store.EmailSetting.SMTPConfig.Authentication+ 41, // [41:41] is the sub-list for method output_type+ 41, // [41:41] is the sub-list for method input_type+ 41, // [41:41] is the sub-list for extension type_name+ 41, // [41:41] is the sub-list for extension extendee+ 0, // [0:41] is the sub-list for field type_name}func init() { file_store_setting_proto_init() }@@ -2676,8 +3047,11 @@ func file_store_setting_proto_init() {(*Algorithm_Md5Mask)(nil),(*Algorithm_InnerOuterMask_)(nil),}- file_store_setting_proto_msgTypes[14].OneofWrappers = []any{}- file_store_setting_proto_msgTypes[28].OneofWrappers = []any{+ file_store_setting_proto_msgTypes[9].OneofWrappers = []any{+ (*EmailSetting_Smtp)(nil),+ }+ file_store_setting_proto_msgTypes[15].OneofWrappers = []any{}+ file_store_setting_proto_msgTypes[29].OneofWrappers = []any{(*AppIMSetting_IMSetting_Slack)(nil),(*AppIMSetting_IMSetting_Feishu)(nil),(*AppIMSetting_IMSetting_Wecom)(nil),@@ -2690,8 +3064,8 @@ func file_store_setting_proto_init() {File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_setting_proto_rawDesc), len(file_store_setting_proto_rawDesc)),- NumEnums: 6,- NumMessages: 31,+ NumEnums: 9,+ NumMessages: 33,NumExtensions: 0,NumServices: 0,},diff --git a/backend/generated-go/store/setting_equal.pb.go b/backend/generated-go/store/setting_equal.pb.goindex d44cea32d5..774be888cc 100644--- a/backend/generated-go/store/setting_equal.pb.go+++ b/backend/generated-go/store/setting_equal.pb.go@@ -654,3 +654,53 @@ func (x *EnvironmentSetting) Equal(y *EnvironmentSetting) bool {}return true}++func (x *EmailSetting_SMTPConfig) Equal(y *EmailSetting_SMTPConfig) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.Host != y.Host {+ return false+ }+ if x.Port != y.Port {+ return false+ }+ if x.Username != y.Username {+ return false+ }+ if x.Password != y.Password {+ return false+ }+ if x.Encryption != y.Encryption {+ return false+ }+ if x.Authentication != y.Authentication {+ return false+ }+ return true+}++func (x *EmailSetting) Equal(y *EmailSetting) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.From != y.From {+ return false+ }+ if x.FromName != y.FromName {+ return false+ }+ if x.Type != y.Type {+ return false+ }+ if !x.GetSmtp().Equal(y.GetSmtp()) {+ return false+ }+ return true+}diff --git a/backend/generated-go/v1/setting_service.pb.go b/backend/generated-go/v1/setting_service.pb.goindex 7c027e2254..f718aa54a7 100644--- a/backend/generated-go/v1/setting_service.pb.go+++ b/backend/generated-go/v1/setting_service.pb.go@@ -88,6 +88,7 @@ const (Setting_DATA_CLASSIFICATION Setting_SettingName = 5Setting_SEMANTIC_TYPES Setting_SettingName = 6Setting_ENVIRONMENT Setting_SettingName = 7+ Setting_EMAIL Setting_SettingName = 8)// Enum value maps for Setting_SettingName.@@ -101,6 +102,7 @@ var (5: "DATA_CLASSIFICATION",6: "SEMANTIC_TYPES",7: "ENVIRONMENT",+ 8: "EMAIL",}Setting_SettingName_value = map[string]int32{"SETTING_NAME_UNSPECIFIED": 0,@@ -111,6 +113,7 @@ var ("DATA_CLASSIFICATION": 5,"SEMANTIC_TYPES": 6,"ENVIRONMENT": 7,+ "EMAIL": 8,})@@ -356,6 +359,159 @@ func (AISetting_Provider) EnumDescriptor() ([]byte, []int) {return file_v1_setting_service_proto_rawDescGZIP(), []int{14, 0}}+type EmailSetting_Type int32++const (+ EmailSetting_TYPE_UNSPECIFIED EmailSetting_Type = 0+ EmailSetting_SMTP EmailSetting_Type = 1+)++// Enum value maps for EmailSetting_Type.+var (+ EmailSetting_Type_name = map[int32]string{+ 0: "TYPE_UNSPECIFIED",+ 1: "SMTP",+ }+ EmailSetting_Type_value = map[string]int32{+ "TYPE_UNSPECIFIED": 0,+ "SMTP": 1,+ }+)++func (x EmailSetting_Type) Enum() *EmailSetting_Type {+ p := new(EmailSetting_Type)+ *p = x+ return p+}++func (x EmailSetting_Type) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (EmailSetting_Type) Descriptor() protoreflect.EnumDescriptor {+ return file_v1_setting_service_proto_enumTypes[6].Descriptor()+}++func (EmailSetting_Type) Type() protoreflect.EnumType {+ return &file_v1_setting_service_proto_enumTypes[6]+}++func (x EmailSetting_Type) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use EmailSetting_Type.Descriptor instead.+func (EmailSetting_Type) EnumDescriptor() ([]byte, []int) {+ return file_v1_setting_service_proto_rawDescGZIP(), []int{16, 0}+}++type EmailSetting_SMTPConfig_Encryption int32++const (+ EmailSetting_SMTPConfig_ENCRYPTION_UNSPECIFIED EmailSetting_SMTPConfig_Encryption = 0+ EmailSetting_SMTPConfig_ENCRYPTION_NONE EmailSetting_SMTPConfig_Encryption = 1+ EmailSetting_SMTPConfig_STARTTLS EmailSetting_SMTPConfig_Encryption = 2+ EmailSetting_SMTPConfig_SSL_TLS EmailSetting_SMTPConfig_Encryption = 3+)++// Enum value maps for EmailSetting_SMTPConfig_Encryption.+var (+ EmailSetting_SMTPConfig_Encryption_name = map[int32]string{+ 0: "ENCRYPTION_UNSPECIFIED",+ 1: "ENCRYPTION_NONE",+ 2: "STARTTLS",+ 3: "SSL_TLS",+ }+ EmailSetting_SMTPConfig_Encryption_value = map[string]int32{+ "ENCRYPTION_UNSPECIFIED": 0,+ "ENCRYPTION_NONE": 1,+ "STARTTLS": 2,+ "SSL_TLS": 3,+ }+)++func (x EmailSetting_SMTPConfig_Encryption) Enum() *EmailSetting_SMTPConfig_Encryption {+ p := new(EmailSetting_SMTPConfig_Encryption)+ *p = x+ return p+}++func (x EmailSetting_SMTPConfig_Encryption) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (EmailSetting_SMTPConfig_Encryption) Descriptor() protoreflect.EnumDescriptor {+ return file_v1_setting_service_proto_enumTypes[7].Descriptor()+}++func (EmailSetting_SMTPConfig_Encryption) Type() protoreflect.EnumType {+ return &file_v1_setting_service_proto_enumTypes[7]+}++func (x EmailSetting_SMTPConfig_Encryption) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use EmailSetting_SMTPConfig_Encryption.Descriptor instead.+func (EmailSetting_SMTPConfig_Encryption) EnumDescriptor() ([]byte, []int) {+ return file_v1_setting_service_proto_rawDescGZIP(), []int{16, 0, 0}+}++type EmailSetting_SMTPConfig_Authentication int32++const (+ EmailSetting_SMTPConfig_AUTHENTICATION_UNSPECIFIED EmailSetting_SMTPConfig_Authentication = 0+ EmailSetting_SMTPConfig_AUTHENTICATION_NONE EmailSetting_SMTPConfig_Authentication = 1+ EmailSetting_SMTPConfig_PLAIN EmailSetting_SMTPConfig_Authentication = 2+ EmailSetting_SMTPConfig_LOGIN EmailSetting_SMTPConfig_Authentication = 3+ EmailSetting_SMTPConfig_CRAM_MD5 EmailSetting_SMTPConfig_Authentication = 4+)++// Enum value maps for EmailSetting_SMTPConfig_Authentication.+var (+ EmailSetting_SMTPConfig_Authentication_name = map[int32]string{+ 0: "AUTHENTICATION_UNSPECIFIED",+ 1: "AUTHENTICATION_NONE",+ 2: "PLAIN",+ 3: "LOGIN",+ 4: "CRAM_MD5",+ }+ EmailSetting_SMTPConfig_Authentication_value = map[string]int32{+ "AUTHENTICATION_UNSPECIFIED": 0,+ "AUTHENTICATION_NONE": 1,+ "PLAIN": 2,+ "LOGIN": 3,+ "CRAM_MD5": 4,+ }+)++func (x EmailSetting_SMTPConfig_Authentication) Enum() *EmailSetting_SMTPConfig_Authentication {+ p := new(EmailSetting_SMTPConfig_Authentication)+ *p = x+ return p+}++func (x EmailSetting_SMTPConfig_Authentication) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (EmailSetting_SMTPConfig_Authentication) Descriptor() protoreflect.EnumDescriptor {+ return file_v1_setting_service_proto_enumTypes[8].Descriptor()+}++func (EmailSetting_SMTPConfig_Authentication) Type() protoreflect.EnumType {+ return &file_v1_setting_service_proto_enumTypes[8]+}++func (x EmailSetting_SMTPConfig_Authentication) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use EmailSetting_SMTPConfig_Authentication.Descriptor instead.+func (EmailSetting_SMTPConfig_Authentication) EnumDescriptor() ([]byte, []int) {+ return file_v1_setting_service_proto_rawDescGZIP(), []int{16, 0, 1}+}+type ListSettingsRequest struct {state protoimpl.MessageState `protogen:"open.v1"`unknownFields protoimpl.UnknownFields@@ -669,6 +825,7 @@ type SettingValue struct {// *SettingValue_SemanticType// *SettingValue_Ai// *SettingValue_Environment+ // *SettingValue_EmailValue isSettingValue_Value `protobuf_oneof:"value"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache@@ -774,6 +931,15 @@ func (x *SettingValue) GetEnvironment() *EnvironmentSetting {return nil}+func (x *SettingValue) GetEmail() *EmailSetting {+ if x != nil {+ if x, ok := x.Value.(*SettingValue_Email); ok {+ return x.Email+ }+ }+ return nil+}+type isSettingValue_Value interface {isSettingValue_Value()}@@ -806,6 +972,10 @@ type SettingValue_Environment struct {Environment *EnvironmentSetting `protobuf:"bytes,7,opt,name=environment,proto3,oneof"`}+type SettingValue_Email struct {+ Email *EmailSetting `protobuf:"bytes,8,opt,name=email,proto3,oneof"`+}+func (*SettingValue_AppIm) isSettingValue_Value() {}func (*SettingValue_WorkspaceProfile) isSettingValue_Value() {}@@ -820,6 +990,8 @@ func (*SettingValue_Ai) isSettingValue_Value() {}func (*SettingValue_Environment) isSettingValue_Value() {}+func (*SettingValue_Email) isSettingValue_Value() {}+type AppIMSetting struct {state protoimpl.MessageState `protogen:"open.v1"`Settings []*AppIMSetting_IMSetting `protobuf:"bytes,1,rep,name=settings,proto3" json:"settings,omitempty"`@@ -1520,6 +1692,208 @@ func (x *EnvironmentSetting) GetEnvironments() []*EnvironmentSetting_Environmentreturn nil}+type EmailSetting struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`+ FromName string `protobuf:"bytes,2,opt,name=from_name,json=fromName,proto3" json:"from_name,omitempty"`+ Type EmailSetting_Type `protobuf:"varint,3,opt,name=type,proto3,enum=bytebase.v1.EmailSetting_Type" json:"type,omitempty"`+ // Types that are valid to be assigned to Config:+ //+ // *EmailSetting_Smtp+ Config isEmailSetting_Config `protobuf_oneof:"config"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *EmailSetting) Reset() {+ *x = EmailSetting{}+ mi := &file_v1_setting_service_proto_msgTypes[16]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *EmailSetting) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*EmailSetting) ProtoMessage() {}++func (x *EmailSetting) ProtoReflect() protoreflect.Message {+ mi := &file_v1_setting_service_proto_msgTypes[16]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use EmailSetting.ProtoReflect.Descriptor instead.+func (*EmailSetting) Descriptor() ([]byte, []int) {+ return file_v1_setting_service_proto_rawDescGZIP(), []int{16}+}++func (x *EmailSetting) GetFrom() string {+ if x != nil {+ return x.From+ }+ return ""+}++func (x *EmailSetting) GetFromName() string {+ if x != nil {+ return x.FromName+ }+ return ""+}++func (x *EmailSetting) GetType() EmailSetting_Type {+ if x != nil {+ return x.Type+ }+ return EmailSetting_TYPE_UNSPECIFIED+}++func (x *EmailSetting) GetConfig() isEmailSetting_Config {+ if x != nil {+ return x.Config+ }+ return nil+}++func (x *EmailSetting) GetSmtp() *EmailSetting_SMTPConfig {+ if x != nil {+ if x, ok := x.Config.(*EmailSetting_Smtp); ok {+ return x.Smtp+ }+ }+ return nil+}++type isEmailSetting_Config interface {+ isEmailSetting_Config()+}++type EmailSetting_Smtp struct {+ Smtp *EmailSetting_SMTPConfig `protobuf:"bytes,4,opt,name=smtp,proto3,oneof"`+}++func (*EmailSetting_Smtp) isEmailSetting_Config() {}++type TestEmailSettingRequest struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`+ EmailSetting *EmailSetting `protobuf:"bytes,2,opt,name=email_setting,json=emailSetting,proto3" json:"email_setting,omitempty"`+ To string `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *TestEmailSettingRequest) Reset() {+ *x = TestEmailSettingRequest{}+ mi := &file_v1_setting_service_proto_msgTypes[17]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *TestEmailSettingRequest) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*TestEmailSettingRequest) ProtoMessage() {}++func (x *TestEmailSettingRequest) ProtoReflect() protoreflect.Message {+ mi := &file_v1_setting_service_proto_msgTypes[17]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use TestEmailSettingRequest.ProtoReflect.Descriptor instead.+func (*TestEmailSettingRequest) Descriptor() ([]byte, []int) {+ return file_v1_setting_service_proto_rawDescGZIP(), []int{17}+}++func (x *TestEmailSettingRequest) GetParent() string {+ if x != nil {+ return x.Parent+ }+ return ""+}++func (x *TestEmailSettingRequest) GetEmailSetting() *EmailSetting {+ if x != nil {+ return x.EmailSetting+ }+ return nil+}++func (x *TestEmailSettingRequest) GetTo() string {+ if x != nil {+ return x.To+ }+ return ""+}++type TestEmailSettingResponse struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`+ Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *TestEmailSettingResponse) Reset() {+ *x = TestEmailSettingResponse{}+ mi := &file_v1_setting_service_proto_msgTypes[18]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *TestEmailSettingResponse) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*TestEmailSettingResponse) ProtoMessage() {}++func (x *TestEmailSettingResponse) ProtoReflect() protoreflect.Message {+ mi := &file_v1_setting_service_proto_msgTypes[18]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use TestEmailSettingResponse.ProtoReflect.Descriptor instead.+func (*TestEmailSettingResponse) Descriptor() ([]byte, []int) {+ return file_v1_setting_service_proto_rawDescGZIP(), []int{18}+}++func (x *TestEmailSettingResponse) GetSuccess() bool {+ if x != nil {+ return x.Success+ }+ return false+}++func (x *TestEmailSettingResponse) GetError() string {+ if x != nil {+ return x.Error+ }+ return ""+}+type AppIMSetting_Slack struct {state protoimpl.MessageState `protogen:"open.v1"`Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`@@ -1529,7 +1903,7 @@ type AppIMSetting_Slack struct {func (x *AppIMSetting_Slack) Reset() {*x = AppIMSetting_Slack{}- mi := &file_v1_setting_service_proto_msgTypes[16]+ mi := &file_v1_setting_service_proto_msgTypes[19]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1541,7 +1915,7 @@ func (x *AppIMSetting_Slack) String() string {func (*AppIMSetting_Slack) ProtoMessage() {}func (x *AppIMSetting_Slack) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[16]+ mi := &file_v1_setting_service_proto_msgTypes[19]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1574,7 +1948,7 @@ type AppIMSetting_Feishu struct {func (x *AppIMSetting_Feishu) Reset() {*x = AppIMSetting_Feishu{}- mi := &file_v1_setting_service_proto_msgTypes[17]+ mi := &file_v1_setting_service_proto_msgTypes[20]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1586,7 +1960,7 @@ func (x *AppIMSetting_Feishu) String() string {func (*AppIMSetting_Feishu) ProtoMessage() {}func (x *AppIMSetting_Feishu) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[17]+ mi := &file_v1_setting_service_proto_msgTypes[20]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1627,7 +2001,7 @@ type AppIMSetting_Wecom struct {func (x *AppIMSetting_Wecom) Reset() {*x = AppIMSetting_Wecom{}- mi := &file_v1_setting_service_proto_msgTypes[18]+ mi := &file_v1_setting_service_proto_msgTypes[21]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1639,7 +2013,7 @@ func (x *AppIMSetting_Wecom) String() string {func (*AppIMSetting_Wecom) ProtoMessage() {}func (x *AppIMSetting_Wecom) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[18]+ mi := &file_v1_setting_service_proto_msgTypes[21]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1686,7 +2060,7 @@ type AppIMSetting_Lark struct {func (x *AppIMSetting_Lark) Reset() {*x = AppIMSetting_Lark{}- mi := &file_v1_setting_service_proto_msgTypes[19]+ mi := &file_v1_setting_service_proto_msgTypes[22]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1698,7 +2072,7 @@ func (x *AppIMSetting_Lark) String() string {func (*AppIMSetting_Lark) ProtoMessage() {}func (x *AppIMSetting_Lark) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[19]+ mi := &file_v1_setting_service_proto_msgTypes[22]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1739,7 +2113,7 @@ type AppIMSetting_DingTalk struct {func (x *AppIMSetting_DingTalk) Reset() {*x = AppIMSetting_DingTalk{}- mi := &file_v1_setting_service_proto_msgTypes[20]+ mi := &file_v1_setting_service_proto_msgTypes[23]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1751,7 +2125,7 @@ func (x *AppIMSetting_DingTalk) String() string {func (*AppIMSetting_DingTalk) ProtoMessage() {}func (x *AppIMSetting_DingTalk) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[20]+ mi := &file_v1_setting_service_proto_msgTypes[23]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1802,7 +2176,7 @@ type AppIMSetting_Teams struct {func (x *AppIMSetting_Teams) Reset() {*x = AppIMSetting_Teams{}- mi := &file_v1_setting_service_proto_msgTypes[21]+ mi := &file_v1_setting_service_proto_msgTypes[24]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1814,7 +2188,7 @@ func (x *AppIMSetting_Teams) String() string {func (*AppIMSetting_Teams) ProtoMessage() {}func (x *AppIMSetting_Teams) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[21]+ mi := &file_v1_setting_service_proto_msgTypes[24]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1869,7 +2243,7 @@ type AppIMSetting_IMSetting struct {func (x *AppIMSetting_IMSetting) Reset() {*x = AppIMSetting_IMSetting{}- mi := &file_v1_setting_service_proto_msgTypes[22]+ mi := &file_v1_setting_service_proto_msgTypes[25]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1881,7 +2255,7 @@ func (x *AppIMSetting_IMSetting) String() string {func (*AppIMSetting_IMSetting) ProtoMessage() {}func (x *AppIMSetting_IMSetting) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[22]+ mi := &file_v1_setting_service_proto_msgTypes[25]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2027,7 +2401,7 @@ type WorkspaceProfileSetting_PasswordRestriction struct {func (x *WorkspaceProfileSetting_PasswordRestriction) Reset() {*x = WorkspaceProfileSetting_PasswordRestriction{}- mi := &file_v1_setting_service_proto_msgTypes[23]+ mi := &file_v1_setting_service_proto_msgTypes[26]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2039,7 +2413,7 @@ func (x *WorkspaceProfileSetting_PasswordRestriction) String() string {func (*WorkspaceProfileSetting_PasswordRestriction) ProtoMessage() {}func (x *WorkspaceProfileSetting_PasswordRestriction) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[23]+ mi := &file_v1_setting_service_proto_msgTypes[26]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2143,7 +2517,7 @@ type WorkspaceApprovalSetting_Rule struct {func (x *WorkspaceApprovalSetting_Rule) Reset() {*x = WorkspaceApprovalSetting_Rule{}- mi := &file_v1_setting_service_proto_msgTypes[24]+ mi := &file_v1_setting_service_proto_msgTypes[27]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2155,7 +2529,7 @@ func (x *WorkspaceApprovalSetting_Rule) String() string {func (*WorkspaceApprovalSetting_Rule) ProtoMessage() {}func (x *WorkspaceApprovalSetting_Rule) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[24]+ mi := &file_v1_setting_service_proto_msgTypes[27]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2208,7 +2582,7 @@ type DataClassificationSetting_DataClassificationConfig struct {func (x *DataClassificationSetting_DataClassificationConfig) Reset() {*x = DataClassificationSetting_DataClassificationConfig{}- mi := &file_v1_setting_service_proto_msgTypes[25]+ mi := &file_v1_setting_service_proto_msgTypes[28]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2220,7 +2594,7 @@ func (x *DataClassificationSetting_DataClassificationConfig) String() string {func (*DataClassificationSetting_DataClassificationConfig) ProtoMessage() {}func (x *DataClassificationSetting_DataClassificationConfig) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[25]+ mi := &file_v1_setting_service_proto_msgTypes[28]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2275,7 +2649,7 @@ type DataClassificationSetting_DataClassificationConfig_Level struct {func (x *DataClassificationSetting_DataClassificationConfig_Level) Reset() {*x = DataClassificationSetting_DataClassificationConfig_Level{}- mi := &file_v1_setting_service_proto_msgTypes[26]+ mi := &file_v1_setting_service_proto_msgTypes[29]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2287,7 +2661,7 @@ func (x *DataClassificationSetting_DataClassificationConfig_Level) String() strifunc (*DataClassificationSetting_DataClassificationConfig_Level) ProtoMessage() {}func (x *DataClassificationSetting_DataClassificationConfig_Level) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[26]+ mi := &file_v1_setting_service_proto_msgTypes[29]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2330,7 +2704,7 @@ type DataClassificationSetting_DataClassificationConfig_DataClassification strucfunc (x *DataClassificationSetting_DataClassificationConfig_DataClassification) Reset() {*x = DataClassificationSetting_DataClassificationConfig_DataClassification{}- mi := &file_v1_setting_service_proto_msgTypes[27]+ mi := &file_v1_setting_service_proto_msgTypes[30]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2342,7 +2716,7 @@ func (x *DataClassificationSetting_DataClassificationConfig_DataClassification)func (*DataClassificationSetting_DataClassificationConfig_DataClassification) ProtoMessage() {}func (x *DataClassificationSetting_DataClassificationConfig_DataClassification) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[27]+ mi := &file_v1_setting_service_proto_msgTypes[30]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2396,7 +2770,7 @@ type SemanticTypeSetting_SemanticType struct {func (x *SemanticTypeSetting_SemanticType) Reset() {*x = SemanticTypeSetting_SemanticType{}- mi := &file_v1_setting_service_proto_msgTypes[29]+ mi := &file_v1_setting_service_proto_msgTypes[32]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2408,7 +2782,7 @@ func (x *SemanticTypeSetting_SemanticType) String() string {func (*SemanticTypeSetting_SemanticType) ProtoMessage() {}func (x *SemanticTypeSetting_SemanticType) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[29]+ mi := &file_v1_setting_service_proto_msgTypes[32]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2470,7 +2844,7 @@ type Algorithm_FullMask struct {func (x *Algorithm_FullMask) Reset() {*x = Algorithm_FullMask{}- mi := &file_v1_setting_service_proto_msgTypes[30]+ mi := &file_v1_setting_service_proto_msgTypes[33]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2482,7 +2856,7 @@ func (x *Algorithm_FullMask) String() string {func (*Algorithm_FullMask) ProtoMessage() {}func (x *Algorithm_FullMask) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[30]+ mi := &file_v1_setting_service_proto_msgTypes[33]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2516,7 +2890,7 @@ type Algorithm_RangeMask struct {func (x *Algorithm_RangeMask) Reset() {*x = Algorithm_RangeMask{}- mi := &file_v1_setting_service_proto_msgTypes[31]+ mi := &file_v1_setting_service_proto_msgTypes[34]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2528,7 +2902,7 @@ func (x *Algorithm_RangeMask) String() string {func (*Algorithm_RangeMask) ProtoMessage() {}func (x *Algorithm_RangeMask) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[31]+ mi := &file_v1_setting_service_proto_msgTypes[34]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2561,7 +2935,7 @@ type Algorithm_MD5Mask struct {func (x *Algorithm_MD5Mask) Reset() {*x = Algorithm_MD5Mask{}- mi := &file_v1_setting_service_proto_msgTypes[32]+ mi := &file_v1_setting_service_proto_msgTypes[35]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2573,7 +2947,7 @@ func (x *Algorithm_MD5Mask) String() string {func (*Algorithm_MD5Mask) ProtoMessage() {}func (x *Algorithm_MD5Mask) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[32]+ mi := &file_v1_setting_service_proto_msgTypes[35]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2608,7 +2982,7 @@ type Algorithm_InnerOuterMask struct {func (x *Algorithm_InnerOuterMask) Reset() {*x = Algorithm_InnerOuterMask{}- mi := &file_v1_setting_service_proto_msgTypes[33]+ mi := &file_v1_setting_service_proto_msgTypes[36]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2620,7 +2994,7 @@ func (x *Algorithm_InnerOuterMask) String() string {func (*Algorithm_InnerOuterMask) ProtoMessage() {}func (x *Algorithm_InnerOuterMask) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[33]+ mi := &file_v1_setting_service_proto_msgTypes[36]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2681,7 +3055,7 @@ type Algorithm_RangeMask_Slice struct {func (x *Algorithm_RangeMask_Slice) Reset() {*x = Algorithm_RangeMask_Slice{}- mi := &file_v1_setting_service_proto_msgTypes[34]+ mi := &file_v1_setting_service_proto_msgTypes[37]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2693,7 +3067,7 @@ func (x *Algorithm_RangeMask_Slice) String() string {func (*Algorithm_RangeMask_Slice) ProtoMessage() {}func (x *Algorithm_RangeMask_Slice) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[34]+ mi := &file_v1_setting_service_proto_msgTypes[37]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2750,7 +3124,7 @@ type EnvironmentSetting_Environment struct {func (x *EnvironmentSetting_Environment) Reset() {*x = EnvironmentSetting_Environment{}- mi := &file_v1_setting_service_proto_msgTypes[35]+ mi := &file_v1_setting_service_proto_msgTypes[38]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -2762,7 +3136,7 @@ func (x *EnvironmentSetting_Environment) String() string {func (*EnvironmentSetting_Environment) ProtoMessage() {}func (x *EnvironmentSetting_Environment) ProtoReflect() protoreflect.Message {- mi := &file_v1_setting_service_proto_msgTypes[35]+ mi := &file_v1_setting_service_proto_msgTypes[38]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -2813,6 +3187,90 @@ func (x *EnvironmentSetting_Environment) GetColor() string {return ""}+type EmailSetting_SMTPConfig struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`+ Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`+ Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`+ Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"`+ Encryption EmailSetting_SMTPConfig_Encryption `protobuf:"varint,5,opt,name=encryption,proto3,enum=bytebase.v1.EmailSetting_SMTPConfig_Encryption" json:"encryption,omitempty"`+ Authentication EmailSetting_SMTPConfig_Authentication `protobuf:"varint,6,opt,name=authentication,proto3,enum=bytebase.v1.EmailSetting_SMTPConfig_Authentication" json:"authentication,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *EmailSetting_SMTPConfig) Reset() {+ *x = EmailSetting_SMTPConfig{}+ mi := &file_v1_setting_service_proto_msgTypes[40]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *EmailSetting_SMTPConfig) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*EmailSetting_SMTPConfig) ProtoMessage() {}++func (x *EmailSetting_SMTPConfig) ProtoReflect() protoreflect.Message {+ mi := &file_v1_setting_service_proto_msgTypes[40]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use EmailSetting_SMTPConfig.ProtoReflect.Descriptor instead.+func (*EmailSetting_SMTPConfig) Descriptor() ([]byte, []int) {+ return file_v1_setting_service_proto_rawDescGZIP(), []int{16, 0}+}++func (x *EmailSetting_SMTPConfig) GetHost() string {+ if x != nil {+ return x.Host+ }+ return ""+}++func (x *EmailSetting_SMTPConfig) GetPort() int32 {+ if x != nil {+ return x.Port+ }+ return 0+}++func (x *EmailSetting_SMTPConfig) GetUsername() string {+ if x != nil {+ return x.Username+ }+ return ""+}++func (x *EmailSetting_SMTPConfig) GetPassword() string {+ if x != nil {+ return x.Password+ }+ return ""+}++func (x *EmailSetting_SMTPConfig) GetEncryption() EmailSetting_SMTPConfig_Encryption {+ if x != nil {+ return x.Encryption+ }+ return EmailSetting_SMTPConfig_ENCRYPTION_UNSPECIFIED+}++func (x *EmailSetting_SMTPConfig) GetAuthentication() EmailSetting_SMTPConfig_Authentication {+ if x != nil {+ return x.Authentication+ }+ return EmailSetting_SMTPConfig_AUTHENTICATION_UNSPECIFIED+}+var File_v1_setting_service_proto protoreflect.FileDescriptorconst file_v1_setting_service_proto_rawDesc = "" +@@ -2831,10 +3289,10 @@ const file_v1_setting_service_proto_rawDesc = "" +"\rvalidate_only\x18\x02 \x01(\bR\fvalidateOnly\x12#\n" +"\rallow_missing\x18\x03 \x01(\bR\fallowMissing\x12;\n" +"\vupdate_mask\x18\x04 \x01(\v2\x1a.google.protobuf.FieldMaskR\n" +- "updateMask\"\xb6\x02\n" ++ "updateMask\"\xc1\x02\n" +"\aSetting\x12\x17\n" +"\x04name\x18\x01 \x01(\tB\x03\xe0A\bR\x04name\x124\n" +- "\x05value\x18\x02 \x01(\v2\x19.bytebase.v1.SettingValueB\x03\xe0A\x02R\x05value\"\xac\x01\n" ++ "\x05value\x18\x02 \x01(\v2\x19.bytebase.v1.SettingValueB\x03\xe0A\x02R\x05value\"\xb7\x01\n" +"\vSettingName\x12\x1c\n" +"\x18SETTING_NAME_UNSPECIFIED\x10\x00\x12\x15\n" +"\x11WORKSPACE_PROFILE\x10\x01\x12\x16\n" +@@ -2844,8 +3302,9 @@ const file_v1_setting_service_proto_rawDesc = "" +"\x02AI\x10\x04\x12\x17\n" +"\x13DATA_CLASSIFICATION\x10\x05\x12\x12\n" +"\x0eSEMANTIC_TYPES\x10\x06\x12\x0f\n" +- "\vENVIRONMENT\x10\a:-\xeaA*\n" +- "\x14bytebase.com/Setting\x12\x12settings/{setting}\"\x8b\x04\n" ++ "\vENVIRONMENT\x10\a\x12\t\n" ++ "\x05EMAIL\x10\b:-\xeaA*\n" ++ "\x14bytebase.com/Setting\x12\x12settings/{setting}\"\xbe\x04\n" +"\fSettingValue\x122\n" +"\x06app_im\x18\x01 \x01(\v2\x19.bytebase.v1.AppIMSettingH\x00R\x05appIm\x12S\n" +"\x11workspace_profile\x18\x02 \x01(\v2$.bytebase.v1.WorkspaceProfileSettingH\x00R\x10workspaceProfile\x12V\n" +@@ -2853,7 +3312,8 @@ const file_v1_setting_service_proto_rawDesc = "" +"\x13data_classification\x18\x04 \x01(\v2&.bytebase.v1.DataClassificationSettingH\x00R\x12dataClassification\x12G\n" +"\rsemantic_type\x18\x05 \x01(\v2 .bytebase.v1.SemanticTypeSettingH\x00R\fsemanticType\x12(\n" +"\x02ai\x18\x06 \x01(\v2\x16.bytebase.v1.AISettingH\x00R\x02ai\x12C\n" +- "\venvironment\x18\a \x01(\v2\x1f.bytebase.v1.EnvironmentSettingH\x00R\venvironmentB\a\n" ++ "\venvironment\x18\a \x01(\v2\x1f.bytebase.v1.EnvironmentSettingH\x00R\venvironment\x121\n" ++ "\x05email\x18\b \x01(\v2\x19.bytebase.v1.EmailSettingH\x00R\x05emailB\a\n" +"\x05value\"\x82\b\n" +"\fAppIMSetting\x12?\n" +"\bsettings\x18\x01 \x03(\v2#.bytebase.v1.AppIMSetting.IMSettingR\bsettings\x1a\"\n" +@@ -3023,17 +3483,56 @@ const file_v1_setting_service_proto_rawDesc = "" +"\x05color\x18\x05 \x01(\tR\x05color\x1a7\n" +"\tTagsEntry\x12\x10\n" +"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +- "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01*T\n" ++ "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xcc\x05\n" ++ "\fEmailSetting\x12\x12\n" ++ "\x04from\x18\x01 \x01(\tR\x04from\x12\x1b\n" ++ "\tfrom_name\x18\x02 \x01(\tR\bfromName\x122\n" ++ "\x04type\x18\x03 \x01(\x0e2\x1e.bytebase.v1.EmailSetting.TypeR\x04type\x12:\n" ++ "\x04smtp\x18\x04 \x01(\v2$.bytebase.v1.EmailSetting.SMTPConfigH\x00R\x04smtp\x1a\xe8\x03\n" ++ "\n" ++ "SMTPConfig\x12\x12\n" ++ "\x04host\x18\x01 \x01(\tR\x04host\x12\x12\n" ++ "\x04port\x18\x02 \x01(\x05R\x04port\x12\x1a\n" ++ "\busername\x18\x03 \x01(\tR\busername\x12\x1f\n" ++ "\bpassword\x18\x04 \x01(\tB\x03\xe0A\x04R\bpassword\x12O\n" ++ "\n" ++ "encryption\x18\x05 \x01(\x0e2/.bytebase.v1.EmailSetting.SMTPConfig.EncryptionR\n" ++ "encryption\x12[\n" ++ "\x0eauthentication\x18\x06 \x01(\x0e23.bytebase.v1.EmailSetting.SMTPConfig.AuthenticationR\x0eauthentication\"X\n" ++ "\n" ++ "Encryption\x12\x1a\n" ++ "\x16ENCRYPTION_UNSPECIFIED\x10\x00\x12\x13\n" ++ "\x0fENCRYPTION_NONE\x10\x01\x12\f\n" ++ "\bSTARTTLS\x10\x02\x12\v\n" ++ "\aSSL_TLS\x10\x03\"m\n" ++ "\x0eAuthentication\x12\x1e\n" ++ "\x1aAUTHENTICATION_UNSPECIFIED\x10\x00\x12\x17\n" ++ "\x13AUTHENTICATION_NONE\x10\x01\x12\t\n" ++ "\x05PLAIN\x10\x02\x12\t\n" ++ "\x05LOGIN\x10\x03\x12\f\n" ++ "\bCRAM_MD5\x10\x04\"&\n" ++ "\x04Type\x12\x14\n" ++ "\x10TYPE_UNSPECIFIED\x10\x00\x12\b\n" ++ "\x04SMTP\x10\x01B\b\n" ++ "\x06config\"\x90\x01\n" ++ "\x17TestEmailSettingRequest\x12\x1b\n" ++ "\x06parent\x18\x01 \x01(\tB\x03\xe0A\x02R\x06parent\x12C\n" ++ "\remail_setting\x18\x02 \x01(\v2\x19.bytebase.v1.EmailSettingB\x03\xe0A\x02R\femailSetting\x12\x13\n" ++ "\x02to\x18\x03 \x01(\tB\x03\xe0A\x02R\x02to\"J\n" ++ "\x18TestEmailSettingResponse\x12\x18\n" ++ "\asuccess\x18\x01 \x01(\bR\asuccess\x12\x14\n" ++ "\x05error\x18\x02 \x01(\tR\x05error*T\n" +"\x12DatabaseChangeMode\x12$\n" +" DATABASE_CHANGE_MODE_UNSPECIFIED\x10\x00\x12\f\n" +"\bPIPELINE\x10\x01\x12\n" +"\n" +- "\x06EDITOR\x10\x022\xae\x03\n" ++ "\x06EDITOR\x10\x022\xe1\x04\n" +"\x0eSettingService\x12\x84\x01\n" +"\fListSettings\x12 .bytebase.v1.ListSettingsRequest\x1a!.bytebase.v1.ListSettingsResponse\"/\xdaA\x00\x8a\xea0\x10bb.settings.list\x90\xea0\x01\x82\xd3\xe4\x93\x02\x0e\x12\f/v1/settings\x12\x7f\n" +"\n" +"GetSetting\x12\x1e.bytebase.v1.GetSettingRequest\x1a\x14.bytebase.v1.Setting\";\xdaA\x04name\x8a\xea0\x0fbb.settings.get\x90\xea0\x02\x82\xd3\xe4\x93\x02\x17\x12\x15/v1/{name=settings/*}\x12\x93\x01\n" +- "\rUpdateSetting\x12!.bytebase.v1.UpdateSettingRequest\x1a\x14.bytebase.v1.Setting\"I\x8a\xea0\x0fbb.settings.set\x90\xea0\x02\x98\xea0\x01\x82\xd3\xe4\x93\x02(:\asetting2\x1d/v1/{setting.name=settings/*}B\xa9\x01\n" ++ "\rUpdateSetting\x12!.bytebase.v1.UpdateSettingRequest\x1a\x14.bytebase.v1.Setting\"I\x8a\xea0\x0fbb.settings.set\x90\xea0\x02\x98\xea0\x01\x82\xd3\xe4\x93\x02(:\asetting2\x1d/v1/{setting.name=settings/*}\x12\xb0\x01\n" ++ "\x10TestEmailSetting\x12$.bytebase.v1.TestEmailSettingRequest\x1a%.bytebase.v1.TestEmailSettingResponse\"O\x8a\xea0\x0fbb.settings.set\x90\xea0\x01\x82\xd3\xe4\x93\x022:\x01*\"-/v1/{parent=workspaces/*}/settings/EMAIL:testB\xa9\x01\n" +"\x0fcom.bytebase.v1B\x13SettingServiceProtoP\x01Z4github.com/bytebase/bytebase/backend/generated-go/v1\xa2\x02\x03BXX\xaa\x02\vBytebase.V1\xca\x02\vBytebase\\V1\xe2\x02\x17Bytebase\\V1\\GPBMetadata\xea\x02\fBytebase::V1b\x06proto3"var (@@ -3048,8 +3547,8 @@ func file_v1_setting_service_proto_rawDescGZIP() []byte {return file_v1_setting_service_proto_rawDescData}-var file_v1_setting_service_proto_enumTypes = make([]protoimpl.EnumInfo, 6)-var file_v1_setting_service_proto_msgTypes = make([]protoimpl.MessageInfo, 37)+var file_v1_setting_service_proto_enumTypes = make([]protoimpl.EnumInfo, 9)+var file_v1_setting_service_proto_msgTypes = make([]protoimpl.MessageInfo, 41)var file_v1_setting_service_proto_goTypes = []any{(DatabaseChangeMode)(0), // 0: bytebase.v1.DatabaseChangeMode(Setting_SettingName)(0), // 1: bytebase.v1.Setting.SettingName@@ -3057,110 +3556,125 @@ var file_v1_setting_service_proto_goTypes = []any{(WorkspaceApprovalSetting_Rule_Source)(0), // 3: bytebase.v1.WorkspaceApprovalSetting.Rule.Source(Algorithm_InnerOuterMask_MaskType)(0), // 4: bytebase.v1.Algorithm.InnerOuterMask.MaskType(AISetting_Provider)(0), // 5: bytebase.v1.AISetting.Provider- (*ListSettingsRequest)(nil), // 6: bytebase.v1.ListSettingsRequest- (*ListSettingsResponse)(nil), // 7: bytebase.v1.ListSettingsResponse- (*GetSettingRequest)(nil), // 8: bytebase.v1.GetSettingRequest- (*GetSettingResponse)(nil), // 9: bytebase.v1.GetSettingResponse- (*UpdateSettingRequest)(nil), // 10: bytebase.v1.UpdateSettingRequest- (*Setting)(nil), // 11: bytebase.v1.Setting- (*SettingValue)(nil), // 12: bytebase.v1.SettingValue- (*AppIMSetting)(nil), // 13: bytebase.v1.AppIMSetting- (*WorkspaceProfileSetting)(nil), // 14: bytebase.v1.WorkspaceProfileSetting- (*Announcement)(nil), // 15: bytebase.v1.Announcement- (*WorkspaceApprovalSetting)(nil), // 16: bytebase.v1.WorkspaceApprovalSetting- (*DataClassificationSetting)(nil), // 17: bytebase.v1.DataClassificationSetting- (*SemanticTypeSetting)(nil), // 18: bytebase.v1.SemanticTypeSetting- (*Algorithm)(nil), // 19: bytebase.v1.Algorithm- (*AISetting)(nil), // 20: bytebase.v1.AISetting- (*EnvironmentSetting)(nil), // 21: bytebase.v1.EnvironmentSetting- (*AppIMSetting_Slack)(nil), // 22: bytebase.v1.AppIMSetting.Slack- (*AppIMSetting_Feishu)(nil), // 23: bytebase.v1.AppIMSetting.Feishu- (*AppIMSetting_Wecom)(nil), // 24: bytebase.v1.AppIMSetting.Wecom- (*AppIMSetting_Lark)(nil), // 25: bytebase.v1.AppIMSetting.Lark- (*AppIMSetting_DingTalk)(nil), // 26: bytebase.v1.AppIMSetting.DingTalk- (*AppIMSetting_Teams)(nil), // 27: bytebase.v1.AppIMSetting.Teams- (*AppIMSetting_IMSetting)(nil), // 28: bytebase.v1.AppIMSetting.IMSetting- (*WorkspaceProfileSetting_PasswordRestriction)(nil), // 29: bytebase.v1.WorkspaceProfileSetting.PasswordRestriction- (*WorkspaceApprovalSetting_Rule)(nil), // 30: bytebase.v1.WorkspaceApprovalSetting.Rule- (*DataClassificationSetting_DataClassificationConfig)(nil), // 31: bytebase.v1.DataClassificationSetting.DataClassificationConfig- (*DataClassificationSetting_DataClassificationConfig_Level)(nil), // 32: bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level- (*DataClassificationSetting_DataClassificationConfig_DataClassification)(nil), // 33: bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification- nil, // 34: bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry- (*SemanticTypeSetting_SemanticType)(nil), // 35: bytebase.v1.SemanticTypeSetting.SemanticType- (*Algorithm_FullMask)(nil), // 36: bytebase.v1.Algorithm.FullMask- (*Algorithm_RangeMask)(nil), // 37: bytebase.v1.Algorithm.RangeMask- (*Algorithm_MD5Mask)(nil), // 38: bytebase.v1.Algorithm.MD5Mask- (*Algorithm_InnerOuterMask)(nil), // 39: bytebase.v1.Algorithm.InnerOuterMask- (*Algorithm_RangeMask_Slice)(nil), // 40: bytebase.v1.Algorithm.RangeMask.Slice- (*EnvironmentSetting_Environment)(nil), // 41: bytebase.v1.EnvironmentSetting.Environment- nil, // 42: bytebase.v1.EnvironmentSetting.Environment.TagsEntry- (*fieldmaskpb.FieldMask)(nil), // 43: google.protobuf.FieldMask- (*durationpb.Duration)(nil), // 44: google.protobuf.Duration- (WebhookType)(0), // 45: bytebase.v1.WebhookType- (*ApprovalTemplate)(nil), // 46: bytebase.v1.ApprovalTemplate- (*expr.Expr)(nil), // 47: google.type.Expr+ (EmailSetting_Type)(0), // 6: bytebase.v1.EmailSetting.Type+ (EmailSetting_SMTPConfig_Encryption)(0), // 7: bytebase.v1.EmailSetting.SMTPConfig.Encryption+ (EmailSetting_SMTPConfig_Authentication)(0), // 8: bytebase.v1.EmailSetting.SMTPConfig.Authentication+ (*ListSettingsRequest)(nil), // 9: bytebase.v1.ListSettingsRequest+ (*ListSettingsResponse)(nil), // 10: bytebase.v1.ListSettingsResponse+ (*GetSettingRequest)(nil), // 11: bytebase.v1.GetSettingRequest+ (*GetSettingResponse)(nil), // 12: bytebase.v1.GetSettingResponse+ (*UpdateSettingRequest)(nil), // 13: bytebase.v1.UpdateSettingRequest+ (*Setting)(nil), // 14: bytebase.v1.Setting+ (*SettingValue)(nil), // 15: bytebase.v1.SettingValue+ (*AppIMSetting)(nil), // 16: bytebase.v1.AppIMSetting+ (*WorkspaceProfileSetting)(nil), // 17: bytebase.v1.WorkspaceProfileSetting+ (*Announcement)(nil), // 18: bytebase.v1.Announcement+ (*WorkspaceApprovalSetting)(nil), // 19: bytebase.v1.WorkspaceApprovalSetting+ (*DataClassificationSetting)(nil), // 20: bytebase.v1.DataClassificationSetting+ (*SemanticTypeSetting)(nil), // 21: bytebase.v1.SemanticTypeSetting+ (*Algorithm)(nil), // 22: bytebase.v1.Algorithm+ (*AISetting)(nil), // 23: bytebase.v1.AISetting+ (*EnvironmentSetting)(nil), // 24: bytebase.v1.EnvironmentSetting+ (*EmailSetting)(nil), // 25: bytebase.v1.EmailSetting+ (*TestEmailSettingRequest)(nil), // 26: bytebase.v1.TestEmailSettingRequest+ (*TestEmailSettingResponse)(nil), // 27: bytebase.v1.TestEmailSettingResponse+ (*AppIMSetting_Slack)(nil), // 28: bytebase.v1.AppIMSetting.Slack+ (*AppIMSetting_Feishu)(nil), // 29: bytebase.v1.AppIMSetting.Feishu+ (*AppIMSetting_Wecom)(nil), // 30: bytebase.v1.AppIMSetting.Wecom+ (*AppIMSetting_Lark)(nil), // 31: bytebase.v1.AppIMSetting.Lark+ (*AppIMSetting_DingTalk)(nil), // 32: bytebase.v1.AppIMSetting.DingTalk+ (*AppIMSetting_Teams)(nil), // 33: bytebase.v1.AppIMSetting.Teams+ (*AppIMSetting_IMSetting)(nil), // 34: bytebase.v1.AppIMSetting.IMSetting+ (*WorkspaceProfileSetting_PasswordRestriction)(nil), // 35: bytebase.v1.WorkspaceProfileSetting.PasswordRestriction+ (*WorkspaceApprovalSetting_Rule)(nil), // 36: bytebase.v1.WorkspaceApprovalSetting.Rule+ (*DataClassificationSetting_DataClassificationConfig)(nil), // 37: bytebase.v1.DataClassificationSetting.DataClassificationConfig+ (*DataClassificationSetting_DataClassificationConfig_Level)(nil), // 38: bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level+ (*DataClassificationSetting_DataClassificationConfig_DataClassification)(nil), // 39: bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification+ nil, // 40: bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry+ (*SemanticTypeSetting_SemanticType)(nil), // 41: bytebase.v1.SemanticTypeSetting.SemanticType+ (*Algorithm_FullMask)(nil), // 42: bytebase.v1.Algorithm.FullMask+ (*Algorithm_RangeMask)(nil), // 43: bytebase.v1.Algorithm.RangeMask+ (*Algorithm_MD5Mask)(nil), // 44: bytebase.v1.Algorithm.MD5Mask+ (*Algorithm_InnerOuterMask)(nil), // 45: bytebase.v1.Algorithm.InnerOuterMask+ (*Algorithm_RangeMask_Slice)(nil), // 46: bytebase.v1.Algorithm.RangeMask.Slice+ (*EnvironmentSetting_Environment)(nil), // 47: bytebase.v1.EnvironmentSetting.Environment+ nil, // 48: bytebase.v1.EnvironmentSetting.Environment.TagsEntry+ (*EmailSetting_SMTPConfig)(nil), // 49: bytebase.v1.EmailSetting.SMTPConfig+ (*fieldmaskpb.FieldMask)(nil), // 50: google.protobuf.FieldMask+ (*durationpb.Duration)(nil), // 51: google.protobuf.Duration+ (WebhookType)(0), // 52: bytebase.v1.WebhookType+ (*ApprovalTemplate)(nil), // 53: bytebase.v1.ApprovalTemplate+ (*expr.Expr)(nil), // 54: google.type.Expr}var file_v1_setting_service_proto_depIdxs = []int32{- 11, // 0: bytebase.v1.ListSettingsResponse.settings:type_name -> bytebase.v1.Setting- 11, // 1: bytebase.v1.GetSettingResponse.setting:type_name -> bytebase.v1.Setting- 11, // 2: bytebase.v1.UpdateSettingRequest.setting:type_name -> bytebase.v1.Setting- 43, // 3: bytebase.v1.UpdateSettingRequest.update_mask:type_name -> google.protobuf.FieldMask- 12, // 4: bytebase.v1.Setting.value:type_name -> bytebase.v1.SettingValue- 13, // 5: bytebase.v1.SettingValue.app_im:type_name -> bytebase.v1.AppIMSetting- 14, // 6: bytebase.v1.SettingValue.workspace_profile:type_name -> bytebase.v1.WorkspaceProfileSetting- 16, // 7: bytebase.v1.SettingValue.workspace_approval:type_name -> bytebase.v1.WorkspaceApprovalSetting- 17, // 8: bytebase.v1.SettingValue.data_classification:type_name -> bytebase.v1.DataClassificationSetting- 18, // 9: bytebase.v1.SettingValue.semantic_type:type_name -> bytebase.v1.SemanticTypeSetting- 20, // 10: bytebase.v1.SettingValue.ai:type_name -> bytebase.v1.AISetting- 21, // 11: bytebase.v1.SettingValue.environment:type_name -> bytebase.v1.EnvironmentSetting- 28, // 12: bytebase.v1.AppIMSetting.settings:type_name -> bytebase.v1.AppIMSetting.IMSetting- 44, // 13: bytebase.v1.WorkspaceProfileSetting.refresh_token_duration:type_name -> google.protobuf.Duration- 15, // 14: bytebase.v1.WorkspaceProfileSetting.announcement:type_name -> bytebase.v1.Announcement- 44, // 15: bytebase.v1.WorkspaceProfileSetting.maximum_role_expiration:type_name -> google.protobuf.Duration- 0, // 16: bytebase.v1.WorkspaceProfileSetting.database_change_mode:type_name -> bytebase.v1.DatabaseChangeMode- 44, // 17: bytebase.v1.WorkspaceProfileSetting.inactive_session_timeout:type_name -> google.protobuf.Duration- 29, // 18: bytebase.v1.WorkspaceProfileSetting.password_restriction:type_name -> bytebase.v1.WorkspaceProfileSetting.PasswordRestriction- 44, // 19: bytebase.v1.WorkspaceProfileSetting.access_token_duration:type_name -> google.protobuf.Duration- 44, // 20: bytebase.v1.WorkspaceProfileSetting.query_timeout:type_name -> google.protobuf.Duration- 2, // 21: bytebase.v1.Announcement.level:type_name -> bytebase.v1.Announcement.AlertLevel- 30, // 22: bytebase.v1.WorkspaceApprovalSetting.rules:type_name -> bytebase.v1.WorkspaceApprovalSetting.Rule- 31, // 23: bytebase.v1.DataClassificationSetting.configs:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig- 35, // 24: bytebase.v1.SemanticTypeSetting.types:type_name -> bytebase.v1.SemanticTypeSetting.SemanticType- 36, // 25: bytebase.v1.Algorithm.full_mask:type_name -> bytebase.v1.Algorithm.FullMask- 37, // 26: bytebase.v1.Algorithm.range_mask:type_name -> bytebase.v1.Algorithm.RangeMask- 38, // 27: bytebase.v1.Algorithm.md5_mask:type_name -> bytebase.v1.Algorithm.MD5Mask- 39, // 28: bytebase.v1.Algorithm.inner_outer_mask:type_name -> bytebase.v1.Algorithm.InnerOuterMask- 5, // 29: bytebase.v1.AISetting.provider:type_name -> bytebase.v1.AISetting.Provider- 41, // 30: bytebase.v1.EnvironmentSetting.environments:type_name -> bytebase.v1.EnvironmentSetting.Environment- 45, // 31: bytebase.v1.AppIMSetting.IMSetting.type:type_name -> bytebase.v1.WebhookType- 22, // 32: bytebase.v1.AppIMSetting.IMSetting.slack:type_name -> bytebase.v1.AppIMSetting.Slack- 23, // 33: bytebase.v1.AppIMSetting.IMSetting.feishu:type_name -> bytebase.v1.AppIMSetting.Feishu- 24, // 34: bytebase.v1.AppIMSetting.IMSetting.wecom:type_name -> bytebase.v1.AppIMSetting.Wecom- 25, // 35: bytebase.v1.AppIMSetting.IMSetting.lark:type_name -> bytebase.v1.AppIMSetting.Lark- 26, // 36: bytebase.v1.AppIMSetting.IMSetting.dingtalk:type_name -> bytebase.v1.AppIMSetting.DingTalk- 27, // 37: bytebase.v1.AppIMSetting.IMSetting.teams:type_name -> bytebase.v1.AppIMSetting.Teams- 44, // 38: bytebase.v1.WorkspaceProfileSetting.PasswordRestriction.password_rotation:type_name -> google.protobuf.Duration- 46, // 39: bytebase.v1.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.v1.ApprovalTemplate- 47, // 40: bytebase.v1.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr- 3, // 41: bytebase.v1.WorkspaceApprovalSetting.Rule.source:type_name -> bytebase.v1.WorkspaceApprovalSetting.Rule.Source- 32, // 42: bytebase.v1.DataClassificationSetting.DataClassificationConfig.levels:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level- 34, // 43: bytebase.v1.DataClassificationSetting.DataClassificationConfig.classification:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry- 33, // 44: bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry.value:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification- 19, // 45: bytebase.v1.SemanticTypeSetting.SemanticType.algorithm:type_name -> bytebase.v1.Algorithm- 40, // 46: bytebase.v1.Algorithm.RangeMask.slices:type_name -> bytebase.v1.Algorithm.RangeMask.Slice- 4, // 47: bytebase.v1.Algorithm.InnerOuterMask.type:type_name -> bytebase.v1.Algorithm.InnerOuterMask.MaskType- 42, // 48: bytebase.v1.EnvironmentSetting.Environment.tags:type_name -> bytebase.v1.EnvironmentSetting.Environment.TagsEntry- 6, // 49: bytebase.v1.SettingService.ListSettings:input_type -> bytebase.v1.ListSettingsRequest- 8, // 50: bytebase.v1.SettingService.GetSetting:input_type -> bytebase.v1.GetSettingRequest- 10, // 51: bytebase.v1.SettingService.UpdateSetting:input_type -> bytebase.v1.UpdateSettingRequest- 7, // 52: bytebase.v1.SettingService.ListSettings:output_type -> bytebase.v1.ListSettingsResponse- 11, // 53: bytebase.v1.SettingService.GetSetting:output_type -> bytebase.v1.Setting- 11, // 54: bytebase.v1.SettingService.UpdateSetting:output_type -> bytebase.v1.Setting- 52, // [52:55] is the sub-list for method output_type- 49, // [49:52] is the sub-list for method input_type- 49, // [49:49] is the sub-list for extension type_name- 49, // [49:49] is the sub-list for extension extendee- 0, // [0:49] is the sub-list for field type_name+ 14, // 0: bytebase.v1.ListSettingsResponse.settings:type_name -> bytebase.v1.Setting+ 14, // 1: bytebase.v1.GetSettingResponse.setting:type_name -> bytebase.v1.Setting+ 14, // 2: bytebase.v1.UpdateSettingRequest.setting:type_name -> bytebase.v1.Setting+ 50, // 3: bytebase.v1.UpdateSettingRequest.update_mask:type_name -> google.protobuf.FieldMask+ 15, // 4: bytebase.v1.Setting.value:type_name -> bytebase.v1.SettingValue+ 16, // 5: bytebase.v1.SettingValue.app_im:type_name -> bytebase.v1.AppIMSetting+ 17, // 6: bytebase.v1.SettingValue.workspace_profile:type_name -> bytebase.v1.WorkspaceProfileSetting+ 19, // 7: bytebase.v1.SettingValue.workspace_approval:type_name -> bytebase.v1.WorkspaceApprovalSetting+ 20, // 8: bytebase.v1.SettingValue.data_classification:type_name -> bytebase.v1.DataClassificationSetting+ 21, // 9: bytebase.v1.SettingValue.semantic_type:type_name -> bytebase.v1.SemanticTypeSetting+ 23, // 10: bytebase.v1.SettingValue.ai:type_name -> bytebase.v1.AISetting+ 24, // 11: bytebase.v1.SettingValue.environment:type_name -> bytebase.v1.EnvironmentSetting+ 25, // 12: bytebase.v1.SettingValue.email:type_name -> bytebase.v1.EmailSetting+ 34, // 13: bytebase.v1.AppIMSetting.settings:type_name -> bytebase.v1.AppIMSetting.IMSetting+ 51, // 14: bytebase.v1.WorkspaceProfileSetting.refresh_token_duration:type_name -> google.protobuf.Duration+ 18, // 15: bytebase.v1.WorkspaceProfileSetting.announcement:type_name -> bytebase.v1.Announcement+ 51, // 16: bytebase.v1.WorkspaceProfileSetting.maximum_role_expiration:type_name -> google.protobuf.Duration+ 0, // 17: bytebase.v1.WorkspaceProfileSetting.database_change_mode:type_name -> bytebase.v1.DatabaseChangeMode+ 51, // 18: bytebase.v1.WorkspaceProfileSetting.inactive_session_timeout:type_name -> google.protobuf.Duration+ 35, // 19: bytebase.v1.WorkspaceProfileSetting.password_restriction:type_name -> bytebase.v1.WorkspaceProfileSetting.PasswordRestriction+ 51, // 20: bytebase.v1.WorkspaceProfileSetting.access_token_duration:type_name -> google.protobuf.Duration+ 51, // 21: bytebase.v1.WorkspaceProfileSetting.query_timeout:type_name -> google.protobuf.Duration+ 2, // 22: bytebase.v1.Announcement.level:type_name -> bytebase.v1.Announcement.AlertLevel+ 36, // 23: bytebase.v1.WorkspaceApprovalSetting.rules:type_name -> bytebase.v1.WorkspaceApprovalSetting.Rule+ 37, // 24: bytebase.v1.DataClassificationSetting.configs:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig+ 41, // 25: bytebase.v1.SemanticTypeSetting.types:type_name -> bytebase.v1.SemanticTypeSetting.SemanticType+ 42, // 26: bytebase.v1.Algorithm.full_mask:type_name -> bytebase.v1.Algorithm.FullMask+ 43, // 27: bytebase.v1.Algorithm.range_mask:type_name -> bytebase.v1.Algorithm.RangeMask+ 44, // 28: bytebase.v1.Algorithm.md5_mask:type_name -> bytebase.v1.Algorithm.MD5Mask+ 45, // 29: bytebase.v1.Algorithm.inner_outer_mask:type_name -> bytebase.v1.Algorithm.InnerOuterMask+ 5, // 30: bytebase.v1.AISetting.provider:type_name -> bytebase.v1.AISetting.Provider+ 47, // 31: bytebase.v1.EnvironmentSetting.environments:type_name -> bytebase.v1.EnvironmentSetting.Environment+ 6, // 32: bytebase.v1.EmailSetting.type:type_name -> bytebase.v1.EmailSetting.Type+ 49, // 33: bytebase.v1.EmailSetting.smtp:type_name -> bytebase.v1.EmailSetting.SMTPConfig+ 25, // 34: bytebase.v1.TestEmailSettingRequest.email_setting:type_name -> bytebase.v1.EmailSetting+ 52, // 35: bytebase.v1.AppIMSetting.IMSetting.type:type_name -> bytebase.v1.WebhookType+ 28, // 36: bytebase.v1.AppIMSetting.IMSetting.slack:type_name -> bytebase.v1.AppIMSetting.Slack+ 29, // 37: bytebase.v1.AppIMSetting.IMSetting.feishu:type_name -> bytebase.v1.AppIMSetting.Feishu+ 30, // 38: bytebase.v1.AppIMSetting.IMSetting.wecom:type_name -> bytebase.v1.AppIMSetting.Wecom+ 31, // 39: bytebase.v1.AppIMSetting.IMSetting.lark:type_name -> bytebase.v1.AppIMSetting.Lark+ 32, // 40: bytebase.v1.AppIMSetting.IMSetting.dingtalk:type_name -> bytebase.v1.AppIMSetting.DingTalk+ 33, // 41: bytebase.v1.AppIMSetting.IMSetting.teams:type_name -> bytebase.v1.AppIMSetting.Teams+ 51, // 42: bytebase.v1.WorkspaceProfileSetting.PasswordRestriction.password_rotation:type_name -> google.protobuf.Duration+ 53, // 43: bytebase.v1.WorkspaceApprovalSetting.Rule.template:type_name -> bytebase.v1.ApprovalTemplate+ 54, // 44: bytebase.v1.WorkspaceApprovalSetting.Rule.condition:type_name -> google.type.Expr+ 3, // 45: bytebase.v1.WorkspaceApprovalSetting.Rule.source:type_name -> bytebase.v1.WorkspaceApprovalSetting.Rule.Source+ 38, // 46: bytebase.v1.DataClassificationSetting.DataClassificationConfig.levels:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level+ 40, // 47: bytebase.v1.DataClassificationSetting.DataClassificationConfig.classification:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry+ 39, // 48: bytebase.v1.DataClassificationSetting.DataClassificationConfig.ClassificationEntry.value:type_name -> bytebase.v1.DataClassificationSetting.DataClassificationConfig.DataClassification+ 22, // 49: bytebase.v1.SemanticTypeSetting.SemanticType.algorithm:type_name -> bytebase.v1.Algorithm+ 46, // 50: bytebase.v1.Algorithm.RangeMask.slices:type_name -> bytebase.v1.Algorithm.RangeMask.Slice+ 4, // 51: bytebase.v1.Algorithm.InnerOuterMask.type:type_name -> bytebase.v1.Algorithm.InnerOuterMask.MaskType+ 48, // 52: bytebase.v1.EnvironmentSetting.Environment.tags:type_name -> bytebase.v1.EnvironmentSetting.Environment.TagsEntry+ 7, // 53: bytebase.v1.EmailSetting.SMTPConfig.encryption:type_name -> bytebase.v1.EmailSetting.SMTPConfig.Encryption+ 8, // 54: bytebase.v1.EmailSetting.SMTPConfig.authentication:type_name -> bytebase.v1.EmailSetting.SMTPConfig.Authentication+ 9, // 55: bytebase.v1.SettingService.ListSettings:input_type -> bytebase.v1.ListSettingsRequest+ 11, // 56: bytebase.v1.SettingService.GetSetting:input_type -> bytebase.v1.GetSettingRequest+ 13, // 57: bytebase.v1.SettingService.UpdateSetting:input_type -> bytebase.v1.UpdateSettingRequest+ 26, // 58: bytebase.v1.SettingService.TestEmailSetting:input_type -> bytebase.v1.TestEmailSettingRequest+ 10, // 59: bytebase.v1.SettingService.ListSettings:output_type -> bytebase.v1.ListSettingsResponse+ 14, // 60: bytebase.v1.SettingService.GetSetting:output_type -> bytebase.v1.Setting+ 14, // 61: bytebase.v1.SettingService.UpdateSetting:output_type -> bytebase.v1.Setting+ 27, // 62: bytebase.v1.SettingService.TestEmailSetting:output_type -> bytebase.v1.TestEmailSettingResponse+ 59, // [59:63] is the sub-list for method output_type+ 55, // [55:59] is the sub-list for method input_type+ 55, // [55:55] is the sub-list for extension type_name+ 55, // [55:55] is the sub-list for extension extendee+ 0, // [0:55] is the sub-list for field type_name}func init() { file_v1_setting_service_proto_init() }@@ -3179,6 +3693,7 @@ func file_v1_setting_service_proto_init() {(*SettingValue_SemanticType)(nil),(*SettingValue_Ai)(nil),(*SettingValue_Environment)(nil),+ (*SettingValue_Email)(nil),}file_v1_setting_service_proto_msgTypes[13].OneofWrappers = []any{(*Algorithm_FullMask_)(nil),@@ -3186,7 +3701,10 @@ func file_v1_setting_service_proto_init() {(*Algorithm_Md5Mask)(nil),(*Algorithm_InnerOuterMask_)(nil),}- file_v1_setting_service_proto_msgTypes[22].OneofWrappers = []any{+ file_v1_setting_service_proto_msgTypes[16].OneofWrappers = []any{+ (*EmailSetting_Smtp)(nil),+ }+ file_v1_setting_service_proto_msgTypes[25].OneofWrappers = []any{(*AppIMSetting_IMSetting_Slack)(nil),(*AppIMSetting_IMSetting_Feishu)(nil),(*AppIMSetting_IMSetting_Wecom)(nil),@@ -3194,14 +3712,14 @@ func file_v1_setting_service_proto_init() {(*AppIMSetting_IMSetting_Dingtalk)(nil),(*AppIMSetting_IMSetting_Teams)(nil),}- file_v1_setting_service_proto_msgTypes[27].OneofWrappers = []any{}+ file_v1_setting_service_proto_msgTypes[30].OneofWrappers = []any{}type x struct{}out := protoimpl.TypeBuilder{File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_setting_service_proto_rawDesc), len(file_v1_setting_service_proto_rawDesc)),- NumEnums: 6,- NumMessages: 37,+ NumEnums: 9,+ NumMessages: 41,NumExtensions: 0,NumServices: 1,},diff --git a/backend/generated-go/v1/setting_service.pb.gw.go b/backend/generated-go/v1/setting_service.pb.gw.goindex ebf9665611..dc3f2f3e54 100644--- a/backend/generated-go/v1/setting_service.pb.gw.go+++ b/backend/generated-go/v1/setting_service.pb.gw.go@@ -176,6 +176,51 @@ func local_request_SettingService_UpdateSetting_0(ctx context.Context, marshalerreturn msg, metadata, err}+func request_SettingService_TestEmailSetting_0(ctx context.Context, marshaler runtime.Marshaler, client SettingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq TestEmailSettingRequest+ metadata runtime.ServerMetadata+ err error+ )+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ if req.Body != nil {+ _, _ = io.Copy(io.Discard, req.Body)+ }+ val, ok := pathParams["parent"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")+ }+ protoReq.Parent, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)+ }+ msg, err := client.TestEmailSetting(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))+ return msg, metadata, err+}++func local_request_SettingService_TestEmailSetting_0(ctx context.Context, marshaler runtime.Marshaler, server SettingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {+ var (+ protoReq TestEmailSettingRequest+ metadata runtime.ServerMetadata+ err error+ )+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && !errors.Is(err, io.EOF) {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)+ }+ val, ok := pathParams["parent"]+ if !ok {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "parent")+ }+ protoReq.Parent, err = runtime.String(val)+ if err != nil {+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "parent", err)+ }+ msg, err := server.TestEmailSetting(ctx, &protoReq)+ return msg, metadata, err+}+// RegisterSettingServiceHandlerServer registers the http handlers for service SettingService to "mux".// UnaryRPC :call SettingServiceServer directly.// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.@@ -242,6 +287,26 @@ func RegisterSettingServiceHandlerServer(ctx context.Context, mux *runtime.Serve}forward_SettingService_UpdateSetting_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)})+ mux.Handle(http.MethodPost, pattern_SettingService_TestEmailSetting_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ var stream runtime.ServerTransportStream+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.SettingService/TestEmailSetting", runtime.WithHTTPPathPattern("/v1/{parent=workspaces/*}/settings/EMAIL:test"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := local_request_SettingService_TestEmailSetting_0(annotatedContext, inboundMarshaler, server, req, pathParams)+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_SettingService_TestEmailSetting_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })return nil}@@ -333,17 +398,36 @@ func RegisterSettingServiceHandlerClient(ctx context.Context, mux *runtime.Serve}forward_SettingService_UpdateSetting_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)})+ mux.Handle(http.MethodPost, pattern_SettingService_TestEmailSetting_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {+ ctx, cancel := context.WithCancel(req.Context())+ defer cancel()+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.SettingService/TestEmailSetting", runtime.WithHTTPPathPattern("/v1/{parent=workspaces/*}/settings/EMAIL:test"))+ if err != nil {+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)+ return+ }+ resp, md, err := request_SettingService_TestEmailSetting_0(annotatedContext, inboundMarshaler, client, req, pathParams)+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)+ if err != nil {+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)+ return+ }+ forward_SettingService_TestEmailSetting_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)+ })return nil}var (- pattern_SettingService_ListSettings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "settings"}, ""))- pattern_SettingService_GetSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "settings", "name"}, ""))- pattern_SettingService_UpdateSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "settings", "setting.name"}, ""))+ pattern_SettingService_ListSettings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "settings"}, ""))+ pattern_SettingService_GetSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "settings", "name"}, ""))+ pattern_SettingService_UpdateSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2}, []string{"v1", "settings", "setting.name"}, ""))+ pattern_SettingService_TestEmailSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 2, 5, 2, 2, 3, 2, 4}, []string{"v1", "workspaces", "parent", "settings", "EMAIL"}, "test")))var (- forward_SettingService_ListSettings_0 = runtime.ForwardResponseMessage- forward_SettingService_GetSetting_0 = runtime.ForwardResponseMessage- forward_SettingService_UpdateSetting_0 = runtime.ForwardResponseMessage+ forward_SettingService_ListSettings_0 = runtime.ForwardResponseMessage+ forward_SettingService_GetSetting_0 = runtime.ForwardResponseMessage+ forward_SettingService_UpdateSetting_0 = runtime.ForwardResponseMessage+ forward_SettingService_TestEmailSetting_0 = runtime.ForwardResponseMessage)diff --git a/backend/generated-go/v1/setting_service_equal.pb.go b/backend/generated-go/v1/setting_service_equal.pb.goindex 4519bfa4ec..518eac32d2 100644--- a/backend/generated-go/v1/setting_service_equal.pb.go+++ b/backend/generated-go/v1/setting_service_equal.pb.go@@ -133,6 +133,9 @@ func (x *SettingValue) Equal(y *SettingValue) bool {if !x.GetEnvironment().Equal(y.GetEnvironment()) {return false}+ if !x.GetEmail().Equal(y.GetEmail()) {+ return false+ }return true}@@ -769,3 +772,88 @@ func (x *EnvironmentSetting) Equal(y *EnvironmentSetting) bool {}return true}++func (x *EmailSetting_SMTPConfig) Equal(y *EmailSetting_SMTPConfig) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.Host != y.Host {+ return false+ }+ if x.Port != y.Port {+ return false+ }+ if x.Username != y.Username {+ return false+ }+ if x.Password != y.Password {+ return false+ }+ if x.Encryption != y.Encryption {+ return false+ }+ if x.Authentication != y.Authentication {+ return false+ }+ return true+}++func (x *EmailSetting) Equal(y *EmailSetting) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.From != y.From {+ return false+ }+ if x.FromName != y.FromName {+ return false+ }+ if x.Type != y.Type {+ return false+ }+ if !x.GetSmtp().Equal(y.GetSmtp()) {+ return false+ }+ return true+}++func (x *TestEmailSettingRequest) Equal(y *TestEmailSettingRequest) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.Parent != y.Parent {+ return false+ }+ if !x.EmailSetting.Equal(y.EmailSetting) {+ return false+ }+ if x.To != y.To {+ return false+ }+ return true+}++func (x *TestEmailSettingResponse) Equal(y *TestEmailSettingResponse) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.Success != y.Success {+ return false+ }+ if x.Error != y.Error {+ return false+ }+ return true+}diff --git a/backend/generated-go/v1/setting_service_grpc.pb.go b/backend/generated-go/v1/setting_service_grpc.pb.goindex 93f85754f6..3d2ee439f6 100644--- a/backend/generated-go/v1/setting_service_grpc.pb.go+++ b/backend/generated-go/v1/setting_service_grpc.pb.go@@ -19,9 +19,10 @@ import (const _ = grpc.SupportPackageIsVersion9const (- SettingService_ListSettings_FullMethodName = "/bytebase.v1.SettingService/ListSettings"- SettingService_GetSetting_FullMethodName = "/bytebase.v1.SettingService/GetSetting"- SettingService_UpdateSetting_FullMethodName = "/bytebase.v1.SettingService/UpdateSetting"+ SettingService_ListSettings_FullMethodName = "/bytebase.v1.SettingService/ListSettings"+ SettingService_GetSetting_FullMethodName = "/bytebase.v1.SettingService/GetSetting"+ SettingService_UpdateSetting_FullMethodName = "/bytebase.v1.SettingService/UpdateSetting"+ SettingService_TestEmailSetting_FullMethodName = "/bytebase.v1.SettingService/TestEmailSetting")// SettingServiceClient is the client API for SettingService service.@@ -39,6 +40,9 @@ type SettingServiceClient interface {// Updates a workspace setting.// Permissions required: bb.settings.setUpdateSetting(ctx context.Context, in *UpdateSettingRequest, opts ...grpc.CallOption) (*Setting, error)+ // Sends a test email using the provided config (without persisting).+ // Permissions required: bb.settings.set+ TestEmailSetting(ctx context.Context, in *TestEmailSettingRequest, opts ...grpc.CallOption) (*TestEmailSettingResponse, error)}type settingServiceClient struct {@@ -79,6 +83,16 @@ func (c *settingServiceClient) UpdateSetting(ctx context.Context, in *UpdateSettreturn out, nil}+func (c *settingServiceClient) TestEmailSetting(ctx context.Context, in *TestEmailSettingRequest, opts ...grpc.CallOption) (*TestEmailSettingResponse, error) {+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)+ out := new(TestEmailSettingResponse)+ err := c.cc.Invoke(ctx, SettingService_TestEmailSetting_FullMethodName, in, out, cOpts...)+ if err != nil {+ return nil, err+ }+ return out, nil+}+// SettingServiceServer is the server API for SettingService service.// All implementations must embed UnimplementedSettingServiceServer// for forward compatibility.@@ -94,6 +108,9 @@ type SettingServiceServer interface {// Updates a workspace setting.// Permissions required: bb.settings.setUpdateSetting(context.Context, *UpdateSettingRequest) (*Setting, error)+ // Sends a test email using the provided config (without persisting).+ // Permissions required: bb.settings.set+ TestEmailSetting(context.Context, *TestEmailSettingRequest) (*TestEmailSettingResponse, error)mustEmbedUnimplementedSettingServiceServer()}@@ -113,6 +130,9 @@ func (UnimplementedSettingServiceServer) GetSetting(context.Context, *GetSettingfunc (UnimplementedSettingServiceServer) UpdateSetting(context.Context, *UpdateSettingRequest) (*Setting, error) {return nil, status.Error(codes.Unimplemented, "method UpdateSetting not implemented")}+func (UnimplementedSettingServiceServer) TestEmailSetting(context.Context, *TestEmailSettingRequest) (*TestEmailSettingResponse, error) {+ return nil, status.Error(codes.Unimplemented, "method TestEmailSetting not implemented")+}func (UnimplementedSettingServiceServer) mustEmbedUnimplementedSettingServiceServer() {}func (UnimplementedSettingServiceServer) testEmbeddedByValue() {}@@ -188,6 +208,24 @@ func _SettingService_UpdateSetting_Handler(srv interface{}, ctx context.Context,return interceptor(ctx, in, info, handler)}+func _SettingService_TestEmailSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {+ in := new(TestEmailSettingRequest)+ if err := dec(in); err != nil {+ return nil, err+ }+ if interceptor == nil {+ return srv.(SettingServiceServer).TestEmailSetting(ctx, in)+ }+ info := &grpc.UnaryServerInfo{+ Server: srv,+ FullMethod: SettingService_TestEmailSetting_FullMethodName,+ }+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {+ return srv.(SettingServiceServer).TestEmailSetting(ctx, req.(*TestEmailSettingRequest))+ }+ return interceptor(ctx, in, info, handler)+}+// SettingService_ServiceDesc is the grpc.ServiceDesc for SettingService service.// It's only intended for direct use with grpc.RegisterService,// and not to be introspected or modified (even as a copy)@@ -207,6 +245,10 @@ var SettingService_ServiceDesc = grpc.ServiceDesc{MethodName: "UpdateSetting",Handler: _SettingService_UpdateSetting_Handler,},+ {+ MethodName: "TestEmailSetting",+ Handler: _SettingService_TestEmailSetting_Handler,+ },},Streams: []grpc.StreamDesc{},Metadata: "v1/setting_service.proto",diff --git a/backend/generated-go/v1/v1connect/setting_service.connect.go b/backend/generated-go/v1/v1connect/setting_service.connect.goindex 082eff3766..ab8e80cf02 100644--- a/backend/generated-go/v1/v1connect/setting_service.connect.go+++ b/backend/generated-go/v1/v1connect/setting_service.connect.go@@ -42,6 +42,9 @@ const (// SettingServiceUpdateSettingProcedure is the fully-qualified name of the SettingService's// UpdateSetting RPC.SettingServiceUpdateSettingProcedure = "/bytebase.v1.SettingService/UpdateSetting"+ // SettingServiceTestEmailSettingProcedure is the fully-qualified name of the SettingService's+ // TestEmailSetting RPC.+ SettingServiceTestEmailSettingProcedure = "/bytebase.v1.SettingService/TestEmailSetting")// SettingServiceClient is a client for the bytebase.v1.SettingService service.@@ -55,6 +58,9 @@ type SettingServiceClient interface {// Updates a workspace setting.// Permissions required: bb.settings.setUpdateSetting(context.Context, *connect.Request[v1.UpdateSettingRequest]) (*connect.Response[v1.Setting], error)+ // Sends a test email using the provided config (without persisting).+ // Permissions required: bb.settings.set+ TestEmailSetting(context.Context, *connect.Request[v1.TestEmailSettingRequest]) (*connect.Response[v1.TestEmailSettingResponse], error)}// NewSettingServiceClient constructs a client for the bytebase.v1.SettingService service. By@@ -86,14 +92,21 @@ func NewSettingServiceClient(httpClient connect.HTTPClient, baseURL string, optsconnect.WithSchema(settingServiceMethods.ByName("UpdateSetting")),connect.WithClientOptions(opts...),),+ testEmailSetting: connect.NewClient[v1.TestEmailSettingRequest, v1.TestEmailSettingResponse](+ httpClient,+ baseURL+SettingServiceTestEmailSettingProcedure,+ connect.WithSchema(settingServiceMethods.ByName("TestEmailSetting")),+ connect.WithClientOptions(opts...),+ ),}}// settingServiceClient implements SettingServiceClient.type settingServiceClient struct {- listSettings *connect.Client[v1.ListSettingsRequest, v1.ListSettingsResponse]- getSetting *connect.Client[v1.GetSettingRequest, v1.Setting]- updateSetting *connect.Client[v1.UpdateSettingRequest, v1.Setting]+ listSettings *connect.Client[v1.ListSettingsRequest, v1.ListSettingsResponse]+ getSetting *connect.Client[v1.GetSettingRequest, v1.Setting]+ updateSetting *connect.Client[v1.UpdateSettingRequest, v1.Setting]+ testEmailSetting *connect.Client[v1.TestEmailSettingRequest, v1.TestEmailSettingResponse]}// ListSettings calls bytebase.v1.SettingService.ListSettings.@@ -111,6 +124,11 @@ func (c *settingServiceClient) UpdateSetting(ctx context.Context, req *connect.Rreturn c.updateSetting.CallUnary(ctx, req)}+// TestEmailSetting calls bytebase.v1.SettingService.TestEmailSetting.+func (c *settingServiceClient) TestEmailSetting(ctx context.Context, req *connect.Request[v1.TestEmailSettingRequest]) (*connect.Response[v1.TestEmailSettingResponse], error) {+ return c.testEmailSetting.CallUnary(ctx, req)+}+// SettingServiceHandler is an implementation of the bytebase.v1.SettingService service.type SettingServiceHandler interface {// Lists all workspace settings.@@ -122,6 +140,9 @@ type SettingServiceHandler interface {// Updates a workspace setting.// Permissions required: bb.settings.setUpdateSetting(context.Context, *connect.Request[v1.UpdateSettingRequest]) (*connect.Response[v1.Setting], error)+ // Sends a test email using the provided config (without persisting).+ // Permissions required: bb.settings.set+ TestEmailSetting(context.Context, *connect.Request[v1.TestEmailSettingRequest]) (*connect.Response[v1.TestEmailSettingResponse], error)}// NewSettingServiceHandler builds an HTTP handler from the service implementation. It returns the@@ -149,6 +170,12 @@ func NewSettingServiceHandler(svc SettingServiceHandler, opts ...connect.Handlerconnect.WithSchema(settingServiceMethods.ByName("UpdateSetting")),connect.WithHandlerOptions(opts...),)+ settingServiceTestEmailSettingHandler := connect.NewUnaryHandler(+ SettingServiceTestEmailSettingProcedure,+ svc.TestEmailSetting,+ connect.WithSchema(settingServiceMethods.ByName("TestEmailSetting")),+ connect.WithHandlerOptions(opts...),+ )return "/bytebase.v1.SettingService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {switch r.URL.Path {case SettingServiceListSettingsProcedure:@@ -157,6 +184,8 @@ func NewSettingServiceHandler(svc SettingServiceHandler, opts ...connect.HandlersettingServiceGetSettingHandler.ServeHTTP(w, r)case SettingServiceUpdateSettingProcedure:settingServiceUpdateSettingHandler.ServeHTTP(w, r)+ case SettingServiceTestEmailSettingProcedure:+ settingServiceTestEmailSettingHandler.ServeHTTP(w, r)default:http.NotFound(w, r)}@@ -177,3 +206,7 @@ func (UnimplementedSettingServiceHandler) GetSetting(context.Context, *connect.Rfunc (UnimplementedSettingServiceHandler) UpdateSetting(context.Context, *connect.Request[v1.UpdateSettingRequest]) (*connect.Response[v1.Setting], error) {return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.SettingService.UpdateSetting is not implemented"))}++func (UnimplementedSettingServiceHandler) TestEmailSetting(context.Context, *connect.Request[v1.TestEmailSettingRequest]) (*connect.Response[v1.TestEmailSettingResponse], error) {+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.SettingService.TestEmailSetting is not implemented"))+}diff --git a/backend/plugin/mailer/mail.go b/backend/plugin/mailer/mail.gonew file mode 100644index 0000000000..8e3ec6e496--- /dev/null+++ b/backend/plugin/mailer/mail.go@@ -0,0 +1,39 @@+package mailer++import (+ "context"++ "github.com/pkg/errors"++ storepb "github.com/bytebase/bytebase/backend/generated-go/store"+)++// Sender sends emails.+type Sender interface {+ Send(ctx context.Context, req *SendRequest) error+}++// SendRequest is the request to send an email.+type SendRequest struct {+ To []string+ Subject string+ TextBody string+ HTMLBody string+}++// NewSender creates a Sender from the stored email configuration.+func NewSender(cfg *storepb.EmailSetting) (Sender, error) {+ if cfg == nil {+ return nil, errors.Errorf("email setting is nil")+ }+ switch cfg.Type {+ case storepb.EmailSetting_SMTP:+ smtp := cfg.GetSmtp()+ if smtp == nil {+ return nil, errors.Errorf("smtp config is nil")+ }+ return newSMTPSender(cfg.From, cfg.FromName, smtp), nil+ default:+ return nil, errors.Errorf("unsupported email type: %v", cfg.Type)+ }+}diff --git a/backend/plugin/mailer/smtp.go b/backend/plugin/mailer/smtp.gonew file mode 100644index 0000000000..ee17948f65--- /dev/null+++ b/backend/plugin/mailer/smtp.go@@ -0,0 +1,163 @@+package mailer++import (+ "context"+ "crypto/tls"+ "fmt"+ "mime"+ "net"+ "net/smtp"+ "strings"+ "time"++ "github.com/pkg/errors"++ storepb "github.com/bytebase/bytebase/backend/generated-go/store"+)++const (+ connectTimeout = 10 * time.Second+)++type smtpSender struct {+ from string+ fromName string+ config *storepb.EmailSetting_SMTPConfig+}++func newSMTPSender(from, fromName string, config *storepb.EmailSetting_SMTPConfig) *smtpSender {+ return &smtpSender{from: from, fromName: fromName, config: config}+}++func (s *smtpSender) Send(_ context.Context, req *SendRequest) error {+ addr := fmt.Sprintf("%s:%d", s.config.Host, s.config.Port)++ client, err := s.dial(addr)+ if err != nil {+ return errors.Wrapf(err, "failed to connect to SMTP server %s", addr)+ }+ defer client.Close()++ if s.config.Encryption == storepb.EmailSetting_SMTPConfig_STARTTLS {+ tlsConfig := &tls.Config{ServerName: s.config.Host}+ if err := client.StartTLS(tlsConfig); err != nil {+ return errors.Wrap(err, "STARTTLS failed")+ }+ }++ if auth := s.auth(); auth != nil {+ if err := client.Auth(auth); err != nil {+ return errors.Wrap(err, "SMTP authentication failed")+ }+ }++ if err := client.Mail(s.from); err != nil {+ return errors.Wrap(err, "MAIL FROM failed")+ }+ for _, to := range req.To {+ if err := client.Rcpt(to); err != nil {+ return errors.Wrapf(err, "RCPT TO %s failed", to)+ }+ }++ w, err := client.Data()+ if err != nil {+ return errors.Wrap(err, "DATA command failed")+ }+ msg := s.buildMessage(req)+ if _, err := w.Write([]byte(msg)); err != nil {+ return errors.Wrap(err, "failed to write message")+ }+ if err := w.Close(); err != nil {+ return errors.Wrap(err, "failed to close data writer")+ }++ return client.Quit()+}++func (s *smtpSender) dial(addr string) (*smtp.Client, error) {+ switch s.config.Encryption {+ case storepb.EmailSetting_SMTPConfig_SSL_TLS:+ tlsConfig := &tls.Config{ServerName: s.config.Host}+ conn, err := tls.DialWithDialer(&net.Dialer{Timeout: connectTimeout}, "tcp", addr, tlsConfig)+ if err != nil {+ return nil, err+ }+ return smtp.NewClient(conn, s.config.Host)+ default:+ conn, err := net.DialTimeout("tcp", addr, connectTimeout)+ if err != nil {+ return nil, err+ }+ return smtp.NewClient(conn, s.config.Host)+ }+}++func (s *smtpSender) auth() smtp.Auth {+ if s.config.Authentication == storepb.EmailSetting_SMTPConfig_AUTHENTICATION_NONE {+ return nil+ }+ if s.config.Username == "" && s.config.Password == "" {+ return nil+ }+ switch s.config.Authentication {+ case storepb.EmailSetting_SMTPConfig_CRAM_MD5:+ return smtp.CRAMMD5Auth(s.config.Username, s.config.Password)+ case storepb.EmailSetting_SMTPConfig_LOGIN:+ return &loginAuth{username: s.config.Username, password: s.config.Password}+ default:+ // PLAIN and UNSPECIFIED use PlainAuth.+ return smtp.PlainAuth("", s.config.Username, s.config.Password, s.config.Host)+ }+}++// loginAuth implements the LOGIN SMTP authentication mechanism.+type loginAuth struct {+ username, password string+}++func (*loginAuth) Start(_ *smtp.ServerInfo) (string, []byte, error) {+ return "LOGIN", nil, nil+}++func (a *loginAuth) Next(fromServer []byte, more bool) ([]byte, error) {+ if more {+ switch strings.ToLower(strings.TrimSpace(string(fromServer))) {+ case "username:":+ return []byte(a.username), nil+ case "password:":+ return []byte(a.password), nil+ }+ }+ return nil, nil+}++func (s *smtpSender) buildMessage(req *SendRequest) string {+ var b strings.Builder++ fromHeader := s.from+ if s.fromName != "" {+ fromHeader = fmt.Sprintf("%s <%s>", mime.QEncoding.Encode("utf-8", s.fromName), s.from)+ }+ fmt.Fprintf(&b, "From: %s\r\n", fromHeader)+ fmt.Fprintf(&b, "To: %s\r\n", strings.Join(req.To, ", "))+ fmt.Fprintf(&b, "Subject: %s\r\n", mime.QEncoding.Encode("utf-8", req.Subject))+ fmt.Fprint(&b, "MIME-Version: 1.0\r\n")++ if req.HTMLBody != "" {+ boundary := "bytebase-email-boundary"+ fmt.Fprintf(&b, "Content-Type: multipart/alternative; boundary=%s\r\n\r\n", boundary)+ fmt.Fprintf(&b, "--%s\r\n", boundary)+ fmt.Fprint(&b, "Content-Type: text/plain; charset=utf-8\r\n\r\n")+ fmt.Fprintf(&b, "%s\r\n", req.TextBody)+ fmt.Fprintf(&b, "--%s\r\n", boundary)+ fmt.Fprint(&b, "Content-Type: text/html; charset=utf-8\r\n\r\n")+ fmt.Fprintf(&b, "%s\r\n", req.HTMLBody)+ fmt.Fprintf(&b, "--%s--\r\n", boundary)+ } else {+ fmt.Fprint(&b, "Content-Type: text/plain; charset=utf-8\r\n\r\n")+ fmt.Fprintf(&b, "%s\r\n", req.TextBody)+ }++ return b.String()+}diff --git a/backend/plugin/mailer/smtp_test.go b/backend/plugin/mailer/smtp_test.gonew file mode 100644index 0000000000..7ca712f624--- /dev/null+++ b/backend/plugin/mailer/smtp_test.go@@ -0,0 +1,116 @@+package mailer++import (+ "context"+ "net"+ "strings"+ "testing"++ "github.com/stretchr/testify/assert"+ "github.com/stretchr/testify/require"++ storepb "github.com/bytebase/bytebase/backend/generated-go/store"+)++func TestBuildMessage_PlainText(t *testing.T) {+ s := &smtpSender{from: "[email protected]", fromName: "Bytebase"}+ msg := s.buildMessage(&SendRequest{+ To: []string{"[email protected]"},+ Subject: "Test Subject",+ TextBody: "Hello, World!",+ })+ assert.Contains(t, msg, "[email protected]")+ assert.Contains(t, msg, "To: [email protected]")+ assert.Contains(t, msg, "Content-Type: text/plain; charset=utf-8")+ assert.Contains(t, msg, "Hello, World!")+ assert.NotContains(t, msg, "multipart")+}++func TestBuildMessage_HTML(t *testing.T) {+ s := &smtpSender{from: "[email protected]", fromName: ""}+ msg := s.buildMessage(&SendRequest{+ To: []string{"[email protected]", "[email protected]"},+ Subject: "HTML Test",+ TextBody: "plain text",+ HTMLBody: "<p>html body</p>",+ })+ assert.Contains(t, msg, "From: [email protected]")+ assert.Contains(t, msg, "To: [email protected], [email protected]")+ assert.Contains(t, msg, "multipart/alternative")+ assert.Contains(t, msg, "plain text")+ assert.Contains(t, msg, "<p>html body</p>")+}++func TestNewSender_SMTP(t *testing.T) {+ sender, err := NewSender(&storepb.EmailSetting{+ From: "[email protected]",+ Type: storepb.EmailSetting_SMTP,+ Config: &storepb.EmailSetting_Smtp{+ Smtp: &storepb.EmailSetting_SMTPConfig{+ Host: "localhost",+ Port: 25,+ Encryption: storepb.EmailSetting_SMTPConfig_ENCRYPTION_NONE,+ },+ },+ })+ require.NoError(t, err)+ assert.NotNil(t, sender)+}++func TestNewSender_NilConfig(t *testing.T) {+ _, err := NewSender(nil)+ assert.Error(t, err)+}++func TestNewSender_UnsupportedType(t *testing.T) {+ _, err := NewSender(&storepb.EmailSetting{+ From: "[email protected]",+ Type: storepb.EmailSetting_TYPE_UNSPECIFIED,+ })+ assert.Error(t, err)+}++func TestSMTPSend_ConnectionRefused(t *testing.T) {+ listener, err := net.Listen("tcp", "127.0.0.1:0")+ require.NoError(t, err)+ port := listener.Addr().(*net.TCPAddr).Port+ listener.Close()++ sender, err := NewSender(&storepb.EmailSetting{+ From: "[email protected]",+ Type: storepb.EmailSetting_SMTP,+ Config: &storepb.EmailSetting_Smtp{+ Smtp: &storepb.EmailSetting_SMTPConfig{+ Host: "127.0.0.1",+ Port: int32(port),+ Encryption: storepb.EmailSetting_SMTPConfig_ENCRYPTION_NONE,+ },+ },+ })+ require.NoError(t, err)++ err = sender.Send(context.Background(), &SendRequest{+ To: []string{"[email protected]"},+ Subject: "Test",+ TextBody: "body",+ })+ assert.Error(t, err)+ assert.True(t, strings.Contains(err.Error(), "connect") || strings.Contains(err.Error(), "refused"))+}++func TestAuth_None(t *testing.T) {+ s := &smtpSender{config: &storepb.EmailSetting_SMTPConfig{+ Authentication: storepb.EmailSetting_SMTPConfig_AUTHENTICATION_NONE,+ }}+ assert.Nil(t, s.auth())+}++func TestAuth_Plain(t *testing.T) {+ s := &smtpSender{config: &storepb.EmailSetting_SMTPConfig{+ Authentication: storepb.EmailSetting_SMTPConfig_PLAIN,+ Username: "user",+ Password: "pass",+ Host: "smtp.example.com",+ }}+ assert.NotNil(t, s.auth())+}diff --git a/backend/store/setting.go b/backend/store/setting.goindex 399d407a22..9f52a6e1d5 100644--- a/backend/store/setting.go+++ b/backend/store/setting.go@@ -39,6 +39,8 @@ func getSettingMessage(name storepb.SettingName) (proto.Message, error) {return &storepb.AISetting{}, nilcase storepb.SettingName_ENVIRONMENT:return &storepb.EnvironmentSetting{}, nil+ case storepb.SettingName_EMAIL:+ return &storepb.EmailSetting{}, nildefault:return nil, errors.Errorf("unknown setting name: %v", name)}diff --git a/docs/superpowers/plans/2026-04-12-email-service-integration.md b/docs/superpowers/plans/2026-04-12-email-service-integration.mdnew file mode 100644index 0000000000..23d153c91e--- /dev/null+++ b/docs/superpowers/plans/2026-04-12-email-service-integration.md@@ -0,0 +1,978 @@+# Email Service Integration Implementation Plan++> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.++**Goal:** Add email (SMTP) configuration as a workspace setting, with a mail sender plugin and test-email endpoint.++**Architecture:** Email config is stored as a new `EMAIL` setting in the existing `setting` table (no new DB table). Global SMTP config is injected from `EMAIL_CONFIG` env var during workspace creation via `getAdditionalWorkspaceSettings()`. A `backend/plugin/mail/` plugin provides the `Sender` interface for sending emails.++**Tech Stack:** Go stdlib `net/smtp` + `crypto/tls`, protobuf, Connect-RPC.++**Spec:** `docs/superpowers/specs/2026-04-12-email-service-integration-design.md`++---++### Task 1: Store proto — add EMAIL setting name and EmailSetting message++**Files:**+- Modify: `proto/store/store/setting.proto:13-23` (SettingName enum) and append after line 342++- [ ] **Step 1: Add EMAIL to SettingName enum**++In `proto/store/store/setting.proto`, add `EMAIL = 9` after `ENVIRONMENT = 8`:++```proto+enum SettingName {+ SETTING_NAME_UNSPECIFIED = 0;+ SYSTEM = 1;+ WORKSPACE_PROFILE = 2;+ WORKSPACE_APPROVAL = 3;+ APP_IM = 4;+ AI = 5;+ DATA_CLASSIFICATION = 6;+ SEMANTIC_TYPES = 7;+ ENVIRONMENT = 8;+ EMAIL = 9;+}+```++- [ ] **Step 2: Add EmailSetting message**++Append after the `EnvironmentSetting` message (after line 342):++```proto+message EmailSetting {+ string from = 1;+ string from_name = 2;++ Type type = 3;++ enum Type {+ TYPE_UNSPECIFIED = 0;+ SMTP = 1;+ }++ oneof config {+ SMTPConfig smtp = 4;+ }++ message SMTPConfig {+ string host = 1;+ int32 port = 2;+ string username = 3;+ string password = 4;+ Encryption encryption = 5;+ Authentication authentication = 6;++ enum Encryption {+ ENCRYPTION_UNSPECIFIED = 0;+ NONE = 1;+ STARTTLS = 2;+ SSL_TLS = 3;+ }++ enum Authentication {+ AUTHENTICATION_UNSPECIFIED = 0;+ NONE = 1;+ PLAIN = 2;+ LOGIN = 3;+ CRAM_MD5 = 4;+ }+ }+}+```++- [ ] **Step 3: Lint proto**++Run: `cd proto && buf format -w . && buf lint`+Expected: No errors.++- [ ] **Step 4: Commit**++```bash+git add proto/store/store/setting.proto+git commit -m "proto(store): add EMAIL setting name and EmailSetting message"+```++---++### Task 2: V1 proto — add EMAIL to SettingValue, EmailSetting message, and TestEmailSetting RPC++**Files:**+- Modify: `proto/v1/v1/setting_service.proto:93-102` (SettingName enum), `:114-124` (SettingValue oneof), `:19-49` (service RPCs), and append messages at EOF++- [ ] **Step 1: Add EMAIL to v1 SettingName enum**++In `proto/v1/v1/setting_service.proto`, add `EMAIL = 8` after `ENVIRONMENT = 7` (line 101):++```proto+ enum SettingName {+ SETTING_NAME_UNSPECIFIED = 0;+ WORKSPACE_PROFILE = 1;+ WORKSPACE_APPROVAL = 2;+ APP_IM = 3;+ AI = 4;+ DATA_CLASSIFICATION = 5;+ SEMANTIC_TYPES = 6;+ ENVIRONMENT = 7;+ EMAIL = 8;+ }+```++- [ ] **Step 2: Add email to SettingValue oneof**++Add `EmailSetting email = 8;` to the `SettingValue` message (after line 122):++```proto+message SettingValue {+ oneof value {+ AppIMSetting app_im = 1;+ WorkspaceProfileSetting workspace_profile = 2;+ WorkspaceApprovalSetting workspace_approval = 3;+ DataClassificationSetting data_classification = 4;+ SemanticTypeSetting semantic_type = 5;+ AISetting ai = 6;+ EnvironmentSetting environment = 7;+ EmailSetting email = 8;+ }+}+```++- [ ] **Step 3: Add TestEmailSetting RPC to SettingService**++Add after the `UpdateSetting` RPC (line 48), before the closing brace:++```proto+ // Sends a test email using the provided config (without persisting).+ // Permissions required: bb.settings.set+ rpc TestEmailSetting(TestEmailSettingRequest) returns (TestEmailSettingResponse) {+ option (google.api.http) = {+ post: "/v1/{parent=workspaces/*}/settings/EMAIL:test"+ body: "*"+ };+ option (bytebase.v1.permission) = "bb.settings.set";+ option (bytebase.v1.auth_method) = IAM;+ }+```++- [ ] **Step 4: Add v1 EmailSetting, TestEmailSettingRequest, TestEmailSettingResponse messages**++Append at the end of `setting_service.proto` (after line 463):++```proto+message EmailSetting {+ string from = 1;+ string from_name = 2;++ Type type = 3;++ enum Type {+ TYPE_UNSPECIFIED = 0;+ SMTP = 1;+ }++ oneof config {+ SMTPConfig smtp = 4;+ }++ message SMTPConfig {+ string host = 1;+ int32 port = 2;+ string username = 3;+ // INPUT_ONLY — never returned in GET responses.+ string password = 4 [(google.api.field_behavior) = INPUT_ONLY];+ Encryption encryption = 5;+ Authentication authentication = 6;++ enum Encryption {+ ENCRYPTION_UNSPECIFIED = 0;+ NONE = 1;+ STARTTLS = 2;+ SSL_TLS = 3;+ }++ enum Authentication {+ AUTHENTICATION_UNSPECIFIED = 0;+ NONE = 1;+ PLAIN = 2;+ LOGIN = 3;+ CRAM_MD5 = 4;+ }+ }+}++message TestEmailSettingRequest {+ // Parent workspace. Format: workspaces/{workspace}+ string parent = 1 [(google.api.field_behavior) = REQUIRED];+ // The email config to test. Not persisted.+ EmailSetting email_setting = 2 [(google.api.field_behavior) = REQUIRED];+ // The recipient to send the test email to.+ string to = 3 [(google.api.field_behavior) = REQUIRED];+}++message TestEmailSettingResponse {+ bool success = 1;+ // Human-readable error if success=false.+ string error = 2;+}+```++- [ ] **Step 5: Format, lint, and generate**++Run:+```bash+cd proto && buf format -w . && buf lint && buf generate+```+Expected: No errors.++- [ ] **Step 6: Commit**++```bash+git add proto/ backend/generated-go/ frontend/src/types/proto-es/+git commit -m "proto(v1): add EMAIL setting, EmailSetting message, and TestEmailSetting RPC"+```++---++### Task 3: Store layer — register EMAIL in getSettingMessage++**Files:**+- Modify: `backend/store/setting.go:24-43` (getSettingMessage switch)++- [ ] **Step 1: Add EMAIL case**++In `backend/store/setting.go`, add a case for `EMAIL` in the `getSettingMessage` function (after the `SettingName_ENVIRONMENT` case, around line 41):++```go+ case storepb.SettingName_ENVIRONMENT:+ return &storepb.EnvironmentSetting{}, nil+ case storepb.SettingName_EMAIL:+ return &storepb.EmailSetting{}, nil+```++- [ ] **Step 2: Build**++Run: `go build ./backend/store/...`+Expected: Success.++- [ ] **Step 3: Commit**++```bash+git add backend/store/setting.go+git commit -m "feat(store): register EMAIL setting name in getSettingMessage"+```++---++### Task 4: Converter — add EMAIL case to setting name converters and value converter++**Files:**+- Modify: `backend/api/v1/setting_service_converter.go:15-124` (convertToSettingMessage), `:140-165` (convertStoreSettingNameToV1), `:167-190` (convertV1SettingNameToStore), and append converter functions at EOF++- [ ] **Step 1: Add EMAIL case to convertToSettingMessage**++In `setting_service_converter.go`, add the EMAIL case before the `default` case (before line 121):++```go+ case storepb.SettingName_EMAIL:+ storeValue, ok := setting.Value.(*storepb.EmailSetting)+ if !ok {+ return nil, connect.NewError(connect.CodeInternal, errors.Errorf("invalid setting value type for %s", setting.Name))+ }+ return &v1pb.Setting{+ Name: settingName,+ Value: &v1pb.SettingValue{+ Value: &v1pb.SettingValue_Email{+ Email: convertToEmailSetting(storeValue),+ },+ },+ }, nil+```++- [ ] **Step 2: Add EMAIL case to convertStoreSettingNameToV1**++In the `convertStoreSettingNameToV1` function (around line 158), add before `case storepb.SettingName_SYSTEM`:++```go+ case storepb.SettingName_EMAIL:+ return v1pb.Setting_EMAIL+```++- [ ] **Step 3: Add EMAIL case to convertV1SettingNameToStore**++In the `convertV1SettingNameToStore` function (around line 186), add before `default`:++```go+ case v1pb.Setting_EMAIL:+ return storepb.SettingName_EMAIL+```++- [ ] **Step 4: Add converter helper functions**++Append at the end of `setting_service_converter.go`:++```go+func convertEmailSetting(v1Setting *v1pb.EmailSetting) *storepb.EmailSetting {+ if v1Setting == nil {+ return nil+ }+ storeSetting := &storepb.EmailSetting{+ From: v1Setting.From,+ FromName: v1Setting.FromName,+ Type: storepb.EmailSetting_Type(v1Setting.Type),+ }+ if v1Smtp := v1Setting.GetSmtp(); v1Smtp != nil {+ storeSetting.Config = &storepb.EmailSetting_Smtp{+ Smtp: &storepb.EmailSetting_SMTPConfig{+ Host: v1Smtp.Host,+ Port: v1Smtp.Port,+ Username: v1Smtp.Username,+ Password: v1Smtp.Password,+ Encryption: storepb.EmailSetting_SMTPConfig_Encryption(v1Smtp.Encryption),+ Authentication: storepb.EmailSetting_SMTPConfig_Authentication(v1Smtp.Authentication),+ },+ }+ }+ return storeSetting+}++func convertToEmailSetting(storeSetting *storepb.EmailSetting) *v1pb.EmailSetting {+ if storeSetting == nil {+ return nil+ }+ v1Setting := &v1pb.EmailSetting{+ From: storeSetting.From,+ FromName: storeSetting.FromName,+ Type: v1pb.EmailSetting_Type(storeSetting.Type),+ }+ if storeSmtp := storeSetting.GetSmtp(); storeSmtp != nil {+ v1Setting.Config = &v1pb.EmailSetting_Smtp{+ Smtp: &v1pb.EmailSetting_SMTPConfig{+ Host: storeSmtp.Host,+ Port: storeSmtp.Port,+ Username: storeSmtp.Username,+ Password: "", // INPUT_ONLY: never return password+ Encryption: v1pb.EmailSetting_SMTPConfig_Encryption(storeSmtp.Encryption),+ Authentication: v1pb.EmailSetting_SMTPConfig_Authentication(storeSmtp.Authentication),+ },+ }+ }+ return v1Setting+}+```++- [ ] **Step 5: Build**++Run: `go build ./backend/api/v1/...`+Expected: Success.++- [ ] **Step 6: Commit**++```bash+git add backend/api/v1/setting_service_converter.go+git commit -m "feat(api): add EMAIL setting converter functions"+```++---++### Task 5: Service layer — add EMAIL validation in UpdateSetting++**Files:**+- Modify: `backend/api/v1/setting_service.go:533-612` (UpdateSetting switch, add case before `default`)++- [ ] **Step 1: Add EMAIL case to UpdateSetting validation**++In `setting_service.go`, add a `case storepb.SettingName_EMAIL:` before the `default:` case (before line 611):++```go+ case storepb.SettingName_EMAIL:+ if request.Msg.UpdateMask == nil {+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("update mask is required"))+ }+ payload := convertEmailSetting(request.Msg.Setting.Value.GetEmail())+ if payload == nil {+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("email setting is required"))+ }++ oldEmailSetting := &storepb.EmailSetting{}+ if existing, err := s.store.GetSetting(ctx, workspaceID, storepb.SettingName_EMAIL); err != nil {+ return nil, connect.NewError(connect.CodeInternal, errors.Errorf("failed to get email setting: %v", err))+ } else if existing != nil {+ oldEmailSetting = proto.CloneOf(existing.Value.(*storepb.EmailSetting))+ }++ for _, path := range request.Msg.UpdateMask.Paths {+ switch path {+ case "value.email.from":+ oldEmailSetting.From = payload.From+ case "value.email.from_name":+ oldEmailSetting.FromName = payload.FromName+ case "value.email.type":+ oldEmailSetting.Type = payload.Type+ case "value.email.smtp":+ newSmtp := payload.GetSmtp()+ if newSmtp == nil {+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("smtp config is required when type is SMTP"))+ }+ // Preserve existing password if new password is empty.+ if newSmtp.Password == "" {+ if oldSmtp := oldEmailSetting.GetSmtp(); oldSmtp != nil {+ newSmtp.Password = oldSmtp.Password+ }+ }+ oldEmailSetting.Config = &storepb.EmailSetting_Smtp{Smtp: newSmtp}+ default:+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("invalid update mask path %v", path))+ }+ }++ // Validate the final state.+ if oldEmailSetting.Type == storepb.EmailSetting_SMTP {+ smtp := oldEmailSetting.GetSmtp()+ if smtp == nil {+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("smtp config is required when type is SMTP"))+ }+ if smtp.Host == "" {+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("smtp host is required"))+ }+ if smtp.Port <= 0 {+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("smtp port must be positive"))+ }+ }+ if oldEmailSetting.From == "" {+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("from address is required"))+ }++ storeSettingValue = oldEmailSetting+```++- [ ] **Step 2: Build and lint**++Run:+```bash+go build ./backend/api/v1/...+golangci-lint run --allow-parallel-runners ./backend/api/v1/...+```+Expected: Success, 0 lint issues.++- [ ] **Step 3: Commit**++```bash+git add backend/api/v1/setting_service.go+git commit -m "feat(api): add EMAIL validation in UpdateSetting"+```++---++### Task 6: Mail sender plugin — SMTP implementation++**Files:**+- Create: `backend/plugin/mail/mail.go`+- Create: `backend/plugin/mail/smtp.go`+- Create: `backend/plugin/mail/smtp_test.go`++- [ ] **Step 1: Create mail plugin interface**++Create `backend/plugin/mail/mail.go`:++```go+package mail++import (+ "context"++ "github.com/pkg/errors"++ storepb "github.com/bytebase/bytebase/backend/generated-go/store"+)++// Sender sends emails.+type Sender interface {+ Send(ctx context.Context, req *SendRequest) error+}++// SendRequest is the request to send an email.+type SendRequest struct {+ To []string+ Subject string+ TextBody string+ HTMLBody string+}++// NewSender creates a Sender from the stored email configuration.+func NewSender(cfg *storepb.EmailSetting) (Sender, error) {+ if cfg == nil {+ return nil, errors.Errorf("email setting is nil")+ }+ switch cfg.Type {+ case storepb.EmailSetting_SMTP:+ smtp := cfg.GetSmtp()+ if smtp == nil {+ return nil, errors.Errorf("smtp config is nil")+ }+ return newSMTPSender(cfg.From, cfg.FromName, smtp), nil+ default:+ return nil, errors.Errorf("unsupported email type: %v", cfg.Type)+ }+}+```++- [ ] **Step 2: Create SMTP sender**++Create `backend/plugin/mail/smtp.go`:++```go+package mail++import (+ "context"+ "crypto/tls"+ "fmt"+ "mime"+ "net"+ "net/smtp"+ "strings"+ "time"++ "github.com/pkg/errors"++ storepb "github.com/bytebase/bytebase/backend/generated-go/store"+)++const (+ connectTimeout = 10 * time.Second+ sendTimeout = 30 * time.Second+)++type smtpSender struct {+ from string+ fromName string+ config *storepb.EmailSetting_SMTPConfig+}++func newSMTPSender(from, fromName string, config *storepb.EmailSetting_SMTPConfig) *smtpSender {+ return &smtpSender{from: from, fromName: fromName, config: config}+}++func (s *smtpSender) Send(ctx context.Context, req *SendRequest) error {+ addr := fmt.Sprintf("%s:%d", s.config.Host, s.config.Port)++ client, err := s.dial(addr)+ if err != nil {+ return errors.Wrapf(err, "failed to connect to SMTP server %s", addr)+ }+ defer client.Close()++ if s.config.Encryption == storepb.EmailSetting_SMTPConfig_STARTTLS {+ tlsConfig := &tls.Config{ServerName: s.config.Host}+ if err := client.StartTLS(tlsConfig); err != nil {+ return errors.Wrap(err, "STARTTLS failed")+ }+ }++ if auth := s.auth(); auth != nil {+ if err := client.Auth(auth); err != nil {+ return errors.Wrap(err, "SMTP authentication failed")+ }+ }++ if err := client.Mail(s.from); err != nil {+ return errors.Wrap(err, "MAIL FROM failed")+ }+ for _, to := range req.To {+ if err := client.Rcpt(to); err != nil {+ return errors.Wrapf(err, "RCPT TO %s failed", to)+ }+ }++ w, err := client.Data()+ if err != nil {+ return errors.Wrap(err, "DATA command failed")+ }+ msg := s.buildMessage(req)+ if _, err := w.Write([]byte(msg)); err != nil {+ return errors.Wrap(err, "failed to write message")+ }+ if err := w.Close(); err != nil {+ return errors.Wrap(err, "failed to close data writer")+ }++ return client.Quit()+}++func (s *smtpSender) dial(addr string) (*smtp.Client, error) {+ switch s.config.Encryption {+ case storepb.EmailSetting_SMTPConfig_SSL_TLS:+ tlsConfig := &tls.Config{ServerName: s.config.Host}+ conn, err := tls.DialWithDialer(&net.Dialer{Timeout: connectTimeout}, "tcp", addr, tlsConfig)+ if err != nil {+ return nil, err+ }+ return smtp.NewClient(conn, s.config.Host)+ default:+ conn, err := net.DialTimeout("tcp", addr, connectTimeout)+ if err != nil {+ return nil, err+ }+ return smtp.NewClient(conn, s.config.Host)+ }+}++func (s *smtpSender) auth() smtp.Auth {+ if s.config.Authentication == storepb.EmailSetting_SMTPConfig_NONE {+ return nil+ }+ if s.config.Username == "" && s.config.Password == "" {+ return nil+ }+ switch s.config.Authentication {+ case storepb.EmailSetting_SMTPConfig_CRAM_MD5:+ return smtp.CRAMMD5Auth(s.config.Username, s.config.Password)+ default:+ // PLAIN, LOGIN, and UNSPECIFIED all use PlainAuth.+ return smtp.PlainAuth("", s.config.Username, s.config.Password, s.config.Host)+ }+}++func (s *smtpSender) buildMessage(req *SendRequest) string {+ var b strings.Builder++ fromHeader := s.from+ if s.fromName != "" {+ fromHeader = fmt.Sprintf("%s <%s>", mime.QEncoding.Encode("utf-8", s.fromName), s.from)+ }+ fmt.Fprintf(&b, "From: %s\r\n", fromHeader)+ fmt.Fprintf(&b, "To: %s\r\n", strings.Join(req.To, ", "))+ fmt.Fprintf(&b, "Subject: %s\r\n", mime.QEncoding.Encode("utf-8", req.Subject))+ fmt.Fprintf(&b, "MIME-Version: 1.0\r\n")++ if req.HTMLBody != "" {+ boundary := "bytebase-email-boundary"+ fmt.Fprintf(&b, "Content-Type: multipart/alternative; boundary=%s\r\n\r\n", boundary)+ fmt.Fprintf(&b, "--%s\r\n", boundary)+ fmt.Fprintf(&b, "Content-Type: text/plain; charset=utf-8\r\n\r\n")+ fmt.Fprintf(&b, "%s\r\n", req.TextBody)+ fmt.Fprintf(&b, "--%s\r\n", boundary)+ fmt.Fprintf(&b, "Content-Type: text/html; charset=utf-8\r\n\r\n")+ fmt.Fprintf(&b, "%s\r\n", req.HTMLBody)+ fmt.Fprintf(&b, "--%s--\r\n", boundary)+ } else {+ fmt.Fprintf(&b, "Content-Type: text/plain; charset=utf-8\r\n\r\n")+ fmt.Fprintf(&b, "%s\r\n", req.TextBody)+ }++ return b.String()+}+```++- [ ] **Step 3: Create SMTP unit test**++Create `backend/plugin/mail/smtp_test.go`:++```go+package mail++import (+ "context"+ "net"+ "strings"+ "testing"++ "github.com/stretchr/testify/assert"+ "github.com/stretchr/testify/require"++ storepb "github.com/bytebase/bytebase/backend/generated-go/store"+)++func TestBuildMessage_PlainText(t *testing.T) {+ s := &smtpSender{from: "[email protected]", fromName: "Bytebase"}+ msg := s.buildMessage(&SendRequest{+ To: []string{"[email protected]"},+ Subject: "Test Subject",+ TextBody: "Hello, World!",+ })+ assert.Contains(t, msg, "From: =?utf-8?q?Bytebase?= <[email protected]>")+ assert.Contains(t, msg, "To: [email protected]")+ assert.Contains(t, msg, "Subject: =?utf-8?q?Test_Subject?=")+ assert.Contains(t, msg, "Content-Type: text/plain; charset=utf-8")+ assert.Contains(t, msg, "Hello, World!")+ assert.NotContains(t, msg, "multipart")+}++func TestBuildMessage_HTML(t *testing.T) {+ s := &smtpSender{from: "[email protected]", fromName: ""}+ msg := s.buildMessage(&SendRequest{+ To: []string{"[email protected]", "[email protected]"},+ Subject: "HTML Test",+ TextBody: "plain text",+ HTMLBody: "<p>html body</p>",+ })+ assert.Contains(t, msg, "From: [email protected]")+ assert.Contains(t, msg, "To: [email protected], [email protected]")+ assert.Contains(t, msg, "multipart/alternative")+ assert.Contains(t, msg, "plain text")+ assert.Contains(t, msg, "<p>html body</p>")+}++func TestNewSender_SMTP(t *testing.T) {+ sender, err := NewSender(&storepb.EmailSetting{+ From: "[email protected]",+ Type: storepb.EmailSetting_SMTP,+ Config: &storepb.EmailSetting_Smtp{+ Smtp: &storepb.EmailSetting_SMTPConfig{+ Host: "localhost",+ Port: 25,+ Encryption: storepb.EmailSetting_SMTPConfig_NONE,+ },+ },+ })+ require.NoError(t, err)+ assert.NotNil(t, sender)+}++func TestNewSender_NilConfig(t *testing.T) {+ _, err := NewSender(nil)+ assert.Error(t, err)+}++func TestNewSender_UnsupportedType(t *testing.T) {+ _, err := NewSender(&storepb.EmailSetting{+ From: "[email protected]",+ Type: storepb.EmailSetting_TYPE_UNSPECIFIED,+ })+ assert.Error(t, err)+}++func TestSMTPSend_ConnectionRefused(t *testing.T) {+ // Find a port that's guaranteed not listening.+ listener, err := net.Listen("tcp", "127.0.0.1:0")+ require.NoError(t, err)+ port := listener.Addr().(*net.TCPAddr).Port+ listener.Close()++ sender, err := NewSender(&storepb.EmailSetting{+ From: "[email protected]",+ Type: storepb.EmailSetting_SMTP,+ Config: &storepb.EmailSetting_Smtp{+ Smtp: &storepb.EmailSetting_SMTPConfig{+ Host: "127.0.0.1",+ Port: int32(port),+ Encryption: storepb.EmailSetting_SMTPConfig_NONE,+ },+ },+ })+ require.NoError(t, err)++ err = sender.Send(context.Background(), &SendRequest{+ To: []string{"[email protected]"},+ Subject: "Test",+ TextBody: "body",+ })+ assert.Error(t, err)+ assert.True(t, strings.Contains(err.Error(), "connect") || strings.Contains(err.Error(), "refused"))+}++func TestAuth_None(t *testing.T) {+ s := &smtpSender{config: &storepb.EmailSetting_SMTPConfig{+ Authentication: storepb.EmailSetting_SMTPConfig_NONE,+ }}+ assert.Nil(t, s.auth())+}++func TestAuth_Plain(t *testing.T) {+ s := &smtpSender{config: &storepb.EmailSetting_SMTPConfig{+ Authentication: storepb.EmailSetting_SMTPConfig_PLAIN,+ Username: "user",+ Password: "pass",+ Host: "smtp.example.com",+ }}+ assert.NotNil(t, s.auth())+}+```++- [ ] **Step 4: Run tests**++Run: `go test -v -count=1 github.com/bytebase/bytebase/backend/plugin/mail`+Expected: All tests pass.++- [ ] **Step 5: Commit**++```bash+git add backend/plugin/mail/+git commit -m "feat(plugin): add mail sender plugin with SMTP implementation"+```++---++### Task 7: TestEmailSetting RPC implementation++**Files:**+- Modify: `backend/api/v1/setting_service.go` (add TestEmailSetting method + import `mail` plugin)++- [ ] **Step 1: Add import for mail plugin**++In `setting_service.go`, add to the imports (around line 26):++```go+ "github.com/bytebase/bytebase/backend/plugin/mail"+```++- [ ] **Step 2: Add TestEmailSetting method**++Add after the `UpdateSetting` method (around line 680):++```go+// TestEmailSetting sends a test email using the provided config.+func (s *SettingService) TestEmailSetting(ctx context.Context, req *connect.Request[v1pb.TestEmailSettingRequest]) (*connect.Response[v1pb.TestEmailSettingResponse], error) {+ emailSetting := convertEmailSetting(req.Msg.EmailSetting)+ if emailSetting == nil {+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("email_setting is required"))+ }++ // Substitute stored password if not provided.+ if smtp := emailSetting.GetSmtp(); smtp != nil && smtp.Password == "" {+ workspaceID := common.GetWorkspaceIDFromContext(ctx)+ if existing, err := s.store.GetSetting(ctx, workspaceID, storepb.SettingName_EMAIL); err == nil && existing != nil {+ if oldEmail, ok := existing.Value.(*storepb.EmailSetting); ok {+ if oldSmtp := oldEmail.GetSmtp(); oldSmtp != nil {+ smtp.Password = oldSmtp.Password+ }+ }+ }+ }++ sender, err := mail.NewSender(emailSetting)+ if err != nil {+ return connect.NewResponse(&v1pb.TestEmailSettingResponse{+ Success: false,+ Error: err.Error(),+ }), nil+ }++ err = sender.Send(ctx, &mail.SendRequest{+ To: []string{req.Msg.To},+ Subject: "Bytebase email config test",+ TextBody: "This is a test email from Bytebase to verify your email configuration.",+ })+ if err != nil {+ return connect.NewResponse(&v1pb.TestEmailSettingResponse{+ Success: false,+ Error: err.Error(),+ }), nil+ }++ return connect.NewResponse(&v1pb.TestEmailSettingResponse{+ Success: true,+ }), nil+}+```++- [ ] **Step 3: Build and lint**++Run:+```bash+go build ./backend/api/v1/...+golangci-lint run --allow-parallel-runners ./backend/api/v1/...+```+Expected: Success, 0 lint issues.++- [ ] **Step 4: Commit**++```bash+git add backend/api/v1/setting_service.go+git commit -m "feat(api): implement TestEmailSetting RPC"+```++---++### Task 8: Workspace creation — inject EMAIL_CONFIG env var++**Files:**+- Modify: `backend/api/v1/auth_service.go:1393-1410` (getAdditionalWorkspaceSettings)++- [ ] **Step 1: Add os and protojson imports**++Ensure these imports are present in `auth_service.go` (they may already be):++```go+ "os"+```++and++```go+ "google.golang.org/protobuf/encoding/protojson"+```++- [ ] **Step 2: Add EMAIL_CONFIG injection**++In `getAdditionalWorkspaceSettings()`, add after the Gemini block (after line 1408):++```go+ if raw := os.Getenv("EMAIL_CONFIG"); raw != "" {+ emailSetting := &storepb.EmailSetting{}+ if err := protojson.Unmarshal([]byte(raw), emailSetting); err != nil {+ slog.Error("failed to parse EMAIL_CONFIG env var", log.BBError(err))+ } else {+ settings = append(settings, store.AdditionalSetting{+ Name: storepb.SettingName_EMAIL,+ Payload: emailSetting,+ })+ }+ }+```++- [ ] **Step 3: Build and lint**++Run:+```bash+go build ./backend/api/v1/...+golangci-lint run --allow-parallel-runners ./backend/api/v1/...+```+Expected: Success, 0 lint issues.++- [ ] **Step 4: Commit**++```bash+git add backend/api/v1/auth_service.go+git commit -m "feat(auth): inject EMAIL_CONFIG env var into workspace settings on creation"+```++---++### Task 9: Frontend fix + type-check + full backend build++**Files:** None new — validation pass.++- [ ] **Step 1: Full backend build**++Run: `go build -ldflags "-w -s" -p=16 -o ./bytebase-build/bytebase ./backend/bin/server/main.go`+Expected: Success.++- [ ] **Step 2: Backend lint (full)**++Run: `golangci-lint run --allow-parallel-runners`+Expected: 0 issues (run repeatedly until clean).++- [ ] **Step 3: Frontend fix**++Run: `pnpm --dir frontend fix`+Expected: No errors.++- [ ] **Step 4: Frontend type-check**++Run: `pnpm --dir frontend type-check`+Expected: Success.++- [ ] **Step 5: Backend tests**++Run: `go test -v -count=1 github.com/bytebase/bytebase/backend/plugin/mail`+Expected: All tests pass.++- [ ] **Step 6: Commit any auto-fixed files**++If `pnpm fix` or `golangci-lint --fix` modified files:+```bash+git add -A+git commit -m "chore: fix lint and formatting"+```diff --git a/docs/superpowers/specs/2026-04-12-email-service-integration-design.md b/docs/superpowers/specs/2026-04-12-email-service-integration-design.mdnew file mode 100644index 0000000000..f9a3f12cbd--- /dev/null+++ b/docs/superpowers/specs/2026-04-12-email-service-integration-design.md@@ -0,0 +1,366 @@+# Email Service Integration Design++**Date**: 2026-04-12+**Status**: Draft+**Scope**: Backend infrastructure for email delivery configuration. No frontend UI, no invite flow (Spec B).++---++## Goal++Allow Bytebase to send transactional emails (workspace invites, notifications). This spec covers the **email service configuration** layer: storing SMTP credentials at the workspace level via the existing `setting` table, injecting global SMTP config from profile env vars on workspace creation, exposing config via existing `GetSetting`/`UpdateSetting` APIs, and providing a mail sender plugin.++## Decisions (from brainstorming)++| Decision | Choice | Rationale |+|----------|--------|-----------|+| Provider scope | SMTP only (day 1) | YAGNI; SMTP covers ~95% of providers. Proto is extensible via `type` enum + `oneof`. |+| Storage | Existing `setting` table with `EMAIL` setting name | No new table/migration. Reuses `UpsertSetting`, caching, `PK(workspace, name)` singleton enforcement. |+| Global config source | Profile env vars, injected on workspace creation | Follows the Gemini/AI pattern (`getAdditionalWorkspaceSettings`). No platform-admin API needed. |+| Resource shape | Singleton via setting table | One EMAIL setting per workspace. Get/Update via existing `SettingService` endpoints. |+| Credentials at rest | Plain JSONB | Consistent with IDP `client_secret` and AI `api_key`. Revisit in a security-hardening pass. |+| Test endpoint | Custom method on `SettingService` | `POST /v1/{parent=workspaces/*}/settings/EMAIL:test`. Keeps everything in one service. |++## Non-goals++- Invite member flow (Spec B).+- Frontend UI for email config.+- Password encryption at rest.+- Email templates / i18n of email bodies.+- Retry / dead-letter queue for failed sends.+- Rate limiting on test endpoint.++---++## 1. Data Model++### Setting table (existing, no changes)++```sql+CREATE TABLE setting (+ name text NOT NULL,+ workspace text NOT NULL REFERENCES workspace(resource_id),+ value jsonb NOT NULL,+ PRIMARY KEY (workspace, name)+);+```++Singleton per workspace is enforced by the composite PK. The new `EMAIL` entry is stored as a `protojson.Marshal`'d `EmailSetting` message in the `value` column.++### SettingName enum addition++In `proto/store/store/setting.proto`:++```proto+enum SettingName {+ // ... existing values 0-8 ...+ EMAIL = 9;+}+```++### Store proto: `EmailSetting` message++Add to `proto/store/store/setting.proto` (alongside `AppIMSetting`, `AISetting`, etc.):++```proto+message EmailSetting {+ string from = 1;+ string from_name = 2;++ Type type = 3;++ enum Type {+ TYPE_UNSPECIFIED = 0;+ SMTP = 1;+ // Future: SENDGRID = 2; MAILGUN = 3; SES = 4;+ }++ oneof config {+ SMTPConfig smtp = 4;+ // Future: SendGridConfig sendgrid = 5; etc.+ }++ message SMTPConfig {+ string host = 1;+ int32 port = 2;+ string username = 3;+ string password = 4;+ Encryption encryption = 5;+ Authentication authentication = 6;++ enum Encryption {+ ENCRYPTION_UNSPECIFIED = 0;+ NONE = 1; // plain SMTP, port 25+ STARTTLS = 2; // port 587+ SSL_TLS = 3; // port 465+ }++ enum Authentication {+ AUTHENTICATION_UNSPECIFIED = 0;+ NONE = 1;+ PLAIN = 2;+ LOGIN = 3;+ CRAM_MD5 = 4;+ }+ }+}+```++The `type` enum + `oneof config` pattern allows adding SendGrid/Mailgun/SES later without breaking stored data.++---++## 2. API Surface++### Existing endpoints (no new proto service)++Email config is read and written through the existing `SettingService`:++- **Get**: `GET /v1/{name=settings/EMAIL}` — existing `GetSetting` RPC. Permission: `bb.settings.get`.+- **Update**: `PATCH /v1/{setting.name=settings/EMAIL}` — existing `UpdateSetting` RPC. Permission: `bb.settings.set`. Audit: true.++Password stripping (`INPUT_ONLY` semantic) is handled in the store→v1 converter for the `EMAIL` case.++### New RPC: TestEmailSetting++Added to `SettingService` in `proto/v1/v1/setting_service.proto`:++```proto+rpc TestEmailSetting(TestEmailSettingRequest) returns (TestEmailSettingResponse) {+ option (google.api.http) = {+ post: "/v1/{parent=workspaces/*}/settings/EMAIL:test"+ body: "*"+ };+ option (bytebase.v1.permission) = "bb.settings.set";+ option (bytebase.v1.auth_method) = IAM;+}++message TestEmailSettingRequest {+ // Parent workspace. Format: workspaces/{workspace}+ string parent = 1 [(google.api.field_behavior) = REQUIRED];+ // The email config to test. Not persisted.+ EmailSetting email_setting = 2 [(google.api.field_behavior) = REQUIRED];+ // The recipient to send the test email to.+ string to = 3 [(google.api.field_behavior) = REQUIRED];+}++message TestEmailSettingResponse {+ bool success = 1;+ // Human-readable error (SMTP error string) if success=false.+ string error = 2;+}+```++### v1 proto additions++In `proto/v1/v1/setting_service.proto`, add `EmailSetting` to the v1 `SettingValue` oneof:++```proto+message SettingValue {+ oneof value {+ // ... existing cases ...+ EmailSetting email = N; // next available field number+ }+}+```++The v1 `EmailSetting` message mirrors the store proto but with `INPUT_ONLY` on the password field:++```proto+message EmailSetting {+ string from = 1;+ string from_name = 2;+ Type type = 3;++ enum Type {+ TYPE_UNSPECIFIED = 0;+ SMTP = 1;+ }++ oneof config {+ SMTPConfig smtp = 4;+ }++ message SMTPConfig {+ string host = 1;+ int32 port = 2;+ string username = 3;+ string password = 4 [(google.api.field_behavior) = INPUT_ONLY];+ Encryption encryption = 5;+ Authentication authentication = 6;++ enum Encryption { ENCRYPTION_UNSPECIFIED = 0; NONE = 1; STARTTLS = 2; SSL_TLS = 3; }+ enum Authentication { AUTHENTICATION_UNSPECIFIED = 0; NONE = 1; PLAIN = 2; LOGIN = 3; CRAM_MD5 = 4; }+ }+}+```++---++## 3. Store Layer++No new store file. Changes to existing files:++### `backend/store/setting.go`++- `getSettingMessage()` — add case for `storepb.SettingName_EMAIL` returning `&storepb.EmailSetting{}`.+- Cache works automatically (keyed as `"workspaces/{ws}/settings/EMAIL"`).+- `GetSetting` / `UpsertSetting` / `ListSettings` — no changes needed (generic over all setting names).++---++## 4. Global Config Injection++### No profile field++The `EMAIL_CONFIG` env var is **not** stored in `Profile`. Instead, `getAdditionalWorkspaceSettings()` reads it directly from the environment at call time via `os.Getenv("EMAIL_CONFIG")`.++### Workspace creation injection++In `backend/api/v1/auth_service.go`, extend `getAdditionalWorkspaceSettings()`:++```go+func (s *AuthService) getAdditionalWorkspaceSettings() []store.AdditionalSetting {+ var settings []store.AdditionalSetting+ // Existing: Gemini AI injection+ if s.profile.GeminiAPIKey != "" {+ settings = append(settings, store.AdditionalSetting{ /* ... */ })+ }+ // New: email config injection+ if raw := os.Getenv("EMAIL_CONFIG"); raw != "" {+ emailSetting := &storepb.EmailSetting{}+ if err := protojson.Unmarshal([]byte(raw), emailSetting); err != nil {+ slog.Error("failed to parse EMAIL_CONFIG env var", log.BBError(err))+ } else {+ settings = append(settings, store.AdditionalSetting{+ Name: storepb.SettingName_EMAIL,+ Payload: emailSetting,+ })+ }+ }+ return settings+}+```++Parse errors are logged but don't block workspace creation — a broken env var shouldn't prevent signup.++This means:+- SaaS deployment sets `EMAIL_CONFIG` env var once (JSON string).+- Every new workspace gets the email config pre-configured.+- Workspace admin can later override via `UpdateSetting`.+- Pre-login invite sender (Spec B) reads the workspace's EMAIL setting from the store — no special "global" path needed, since the config was already injected at creation time.++---++## 5. Service Layer++### Changes to `backend/api/v1/setting_service.go`++**`UpdateSetting`** — add `case storepb.SettingName_EMAIL:` in the validation switch:++1. Validate `type` is set and matches the `oneof` variant.+2. For SMTP: validate `host` non-empty, `port` > 0, `from` is a valid email, `encryption` set.+3. **Password handling**: if the incoming `password` is empty, load the existing EMAIL setting and carry over the stored password. This is the standard edit-password semantic (same approach as IDP `client_secret` updates).+4. Call `store.UpsertSetting`.++**`GetSetting`** — no case needed (generic path works). Password stripping happens in the converter.++### Changes to `backend/api/v1/setting_service_converter.go`++**`convertToSettingMessage`** — add `case storepb.SettingName_EMAIL:`:++- Convert `storepb.EmailSetting` → `v1pb.EmailSetting`.+- Strip `SMTPConfig.Password` (set to empty string) before returning.++### New method: `TestEmailSetting`++In `backend/api/v1/setting_service.go`:++1. Parse workspace from `req.Msg.Parent`, verify matches context.+2. Convert v1 `EmailSetting` → store `EmailSetting`.+3. Validate same as UpdateSetting.+4. If empty password and stored EMAIL setting exists → substitute stored password.+5. Build `Sender` via `mail.NewSender(storeSetting)`.+6. Send test email (`Subject: "Bytebase email config test"`).+7. Return `TestEmailSettingResponse{Success: err == nil, Error: errString}`. SMTP failures are returned in the response body, not as gRPC errors.++---++## 6. Mail Sender Plugin++File: `backend/plugin/mail/mail.go`++```go+type Sender interface {+ Send(ctx context.Context, req *SendRequest) error+}++type SendRequest struct {+ To []string+ Subject string+ TextBody string+ HTMLBody string+}++func NewSender(cfg *storepb.EmailSetting) (Sender, error)+```++`NewSender` dispatches on `cfg.Type`:+- `SMTP` → returns `smtp.NewSender(cfg.GetSmtp())`.+- Unknown → returns an error.++No registry pattern for v1 (only one provider). Refactor to registry when adding a second provider.++### SMTP implementation++File: `backend/plugin/mail/smtp/smtp.go`++- Uses Go stdlib `net/smtp` + `crypto/tls`. No third-party dependency.+- Handles three encryption modes:+ - `NONE` → `smtp.Dial`+ - `STARTTLS` → `smtp.Dial` + `c.StartTLS()`+ - `SSL_TLS` → `tls.Dial` wrapped in `smtp.NewClient`+- Auth mechanism from `Authentication` enum; `UNSPECIFIED` defaults to `PLAIN`.+- Connection timeout: 10s. Send timeout: 30s.+- Builds RFC-5322 message. `multipart/alternative` if HTML body present, `text/plain` otherwise.++---++## 7. Error Handling++| Scenario | Response |+|----------|----------|+| Validation error (bad type, missing fields, invalid email) | `CodeInvalidArgument`, field-specific message |+| No EMAIL setting exists for workspace | `GetSetting` returns nil → converter returns empty/default |+| SMTP failure in `TestEmailSetting` | `TestEmailSettingResponse{success: false, error: "..."}` (NOT a gRPC error) |+| SMTP failure in real send (future invite) | Returned as Go error to caller |+| Unknown `Type` in store → v1 conversion | Log warning, return generic fields only |++---++## 8. Testing++### Unit tests++- `backend/plugin/mail/smtp/smtp_test.go`: in-process SMTP listener, verify three encryption modes, four auth mechanisms, message formatting.++### Integration tests++- `backend/tests/mail_config_test.go`:+ - `GetSetting(EMAIL)` → nil/empty (not configured).+ - `UpdateSetting(EMAIL)` → success.+ - `GetSetting(EMAIL)` → password stripped.+ - Update with empty password → preserved.+ - `TestEmailSetting` with local SMTP fake → `success=true`.+ - `TestEmailSetting` against unreachable host → `success=false`, error populated.++---++## 9. Rollout++- **No migration**: `setting` table already exists. `EMAIL` rows created via `UpsertSetting` on first use or workspace creation.+- **Proto generation**: `cd proto && buf format -w . && buf lint && buf generate`.+- **No new permissions**: reuses existing `bb.settings.get` / `bb.settings.set`.+- **No feature flag**: the feature is dormant until Spec B adds the invite flow.+- **Not a breaking change**: nothing removed or renamed.+- **Profile env var**: single `EMAIL_CONFIG` (JSON-stringified `EmailSetting` proto).diff --git a/frontend/src/react/pages/settings/IDPsPage.tsx b/frontend/src/react/pages/settings/IDPsPage.tsxindex 036c753cd5..804739cfab 100644--- a/frontend/src/react/pages/settings/IDPsPage.tsx+++ b/frontend/src/react/pages/settings/IDPsPage.tsx@@ -1993,7 +1993,7 @@ export function IDPsPage() {useEffect(() => {identityProviderStore- .fetchIdentityProviderList()+ .fetchIdentityProviderList(useActuatorV1Store().workspaceResourceName).finally(() => setReady(true));}, []);diff --git a/frontend/src/react/pages/settings/general/AccountSection.tsx b/frontend/src/react/pages/settings/general/AccountSection.tsxindex 41fad1add3..cfa85aabcf 100644--- a/frontend/src/react/pages/settings/general/AccountSection.tsx+++ b/frontend/src/react/pages/settings/general/AccountSection.tsx@@ -95,7 +95,9 @@ export const AccountSection = forwardRef<SectionHandle, AccountSectionProps>(// Fetch identity providers on mountuseEffect(() => {- idpStore.fetchIdentityProviderList();+ idpStore.fetchIdentityProviderList(+ useActuatorV1Store().workspaceResourceName+ );}, []);// --- Toggle state ---diff --git a/frontend/src/router/auth.ts b/frontend/src/router/auth.tsindex 3c87113dc8..b58c310b13 100644--- a/frontend/src/router/auth.ts+++ b/frontend/src/router/auth.ts@@ -10,7 +10,6 @@ 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";-export const AUTH_IDP_INIT_MODULE = "auth.idp.init";export const AUTH_2FA_SETUP_MODULE = "auth.2fa.setup";export const OAUTH2_CONSENT_MODULE = "oauth2.consent";@@ -70,12 +69,6 @@ const authRoutes: RouteRecordRaw[] = [meta: { title: () => t("multi-factor.self") },component: () => import("@/views/auth/MultiFactor.vue"),},- {- path: "idp-init",- name: AUTH_IDP_INIT_MODULE,- meta: { title: () => t("common.loading") },- component: () => import("@/views/IdPInitiatedSSO.vue"),- },],},{diff --git a/frontend/src/router/index.ts b/frontend/src/router/index.tsindex cb7f83c80e..eb7b4f0418 100644--- a/frontend/src/router/index.ts+++ b/frontend/src/router/index.ts@@ -170,6 +170,10 @@ router.beforeEach((to, from, next) => {if (to.query["idp"]) {query["idp"] = to.query["idp"];}+ // Preserve workspace parameter for workspace-scoped signin+ if (to.query["workspace"]) {+ query["workspace"] = to.query["workspace"];+ }// Preserve other auth-related parametersif (to.query["token"]) {query["token"] = to.query["token"];diff --git a/frontend/src/store/modules/idp.ts b/frontend/src/store/modules/idp.tsindex cad03cf04d..30d7410a0f 100644--- a/frontend/src/store/modules/idp.ts+++ b/frontend/src/store/modules/idp.ts@@ -22,10 +22,13 @@ export const useIdentityProviderStore = defineStore("idp", () => {return Array.from(identityProviderMapByName.value.values());});- const fetchIdentityProviderList = async () => {- const request = create(ListIdentityProvidersRequestSchema, {});+ const fetchIdentityProviderList = async (parent?: string) => {+ const request = create(ListIdentityProvidersRequestSchema, {+ parent: parent ?? "",+ });const response =await identityProviderServiceClientConnect.listIdentityProviders(request);+ identityProviderMapByName.value.clear();for (const identityProvider of response.identityProviders) {identityProviderMapByName.value.set(identityProvider.name,diff --git a/frontend/src/types/proto-es/v1/setting_service_pb.d.ts b/frontend/src/types/proto-es/v1/setting_service_pb.d.tsindex 1470f08f78..c42dad7b28 100644--- a/frontend/src/types/proto-es/v1/setting_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/setting_service_pb.d.ts@@ -192,6 +192,11 @@ export enum Setting_SettingName {* @generated from enum value: ENVIRONMENT = 7;*/ENVIRONMENT = 7,++ /**+ * @generated from enum value: EMAIL = 8;+ */+ EMAIL = 8,}/**@@ -250,6 +255,12 @@ export declare type SettingValue = Message<"bytebase.v1.SettingValue"> & {*/value: EnvironmentSetting;case: "environment";+ } | {+ /**+ * @generated from field: bytebase.v1.EmailSetting email = 8;+ */+ value: EmailSetting;+ case: "email";} | { case: undefined; value?: undefined };};@@ -1355,6 +1366,216 @@ export declare type EnvironmentSetting_Environment = Message<"bytebase.v1.Enviro*/export declare const EnvironmentSetting_EnvironmentSchema: GenMessage<EnvironmentSetting_Environment>;+/**+ * @generated from message bytebase.v1.EmailSetting+ */+export declare type EmailSetting = Message<"bytebase.v1.EmailSetting"> & {+ /**+ * @generated from field: string from = 1;+ */+ from: string;++ /**+ * @generated from field: string from_name = 2;+ */+ fromName: string;++ /**+ * @generated from field: bytebase.v1.EmailSetting.Type type = 3;+ */+ type: EmailSetting_Type;++ /**+ * @generated from oneof bytebase.v1.EmailSetting.config+ */+ config: {+ /**+ * @generated from field: bytebase.v1.EmailSetting.SMTPConfig smtp = 4;+ */+ value: EmailSetting_SMTPConfig;+ case: "smtp";+ } | { case: undefined; value?: undefined };+};++/**+ * Describes the message bytebase.v1.EmailSetting.+ * Use `create(EmailSettingSchema)` to create a new message.+ */+export declare const EmailSettingSchema: GenMessage<EmailSetting>;++/**+ * @generated from message bytebase.v1.EmailSetting.SMTPConfig+ */+export declare type EmailSetting_SMTPConfig = Message<"bytebase.v1.EmailSetting.SMTPConfig"> & {+ /**+ * @generated from field: string host = 1;+ */+ host: string;++ /**+ * @generated from field: int32 port = 2;+ */+ port: number;++ /**+ * @generated from field: string username = 3;+ */+ username: string;++ /**+ * @generated from field: string password = 4;+ */+ password: string;++ /**+ * @generated from field: bytebase.v1.EmailSetting.SMTPConfig.Encryption encryption = 5;+ */+ encryption: EmailSetting_SMTPConfig_Encryption;++ /**+ * @generated from field: bytebase.v1.EmailSetting.SMTPConfig.Authentication authentication = 6;+ */+ authentication: EmailSetting_SMTPConfig_Authentication;+};++/**+ * Describes the message bytebase.v1.EmailSetting.SMTPConfig.+ * Use `create(EmailSetting_SMTPConfigSchema)` to create a new message.+ */+export declare const EmailSetting_SMTPConfigSchema: GenMessage<EmailSetting_SMTPConfig>;++/**+ * @generated from enum bytebase.v1.EmailSetting.SMTPConfig.Encryption+ */+export enum EmailSetting_SMTPConfig_Encryption {+ /**+ * @generated from enum value: ENCRYPTION_UNSPECIFIED = 0;+ */+ ENCRYPTION_UNSPECIFIED = 0,++ /**+ * @generated from enum value: ENCRYPTION_NONE = 1;+ */+ ENCRYPTION_NONE = 1,++ /**+ * @generated from enum value: STARTTLS = 2;+ */+ STARTTLS = 2,++ /**+ * @generated from enum value: SSL_TLS = 3;+ */+ SSL_TLS = 3,+}++/**+ * Describes the enum bytebase.v1.EmailSetting.SMTPConfig.Encryption.+ */+export declare const EmailSetting_SMTPConfig_EncryptionSchema: GenEnum<EmailSetting_SMTPConfig_Encryption>;++/**+ * @generated from enum bytebase.v1.EmailSetting.SMTPConfig.Authentication+ */+export enum EmailSetting_SMTPConfig_Authentication {+ /**+ * @generated from enum value: AUTHENTICATION_UNSPECIFIED = 0;+ */+ AUTHENTICATION_UNSPECIFIED = 0,++ /**+ * @generated from enum value: AUTHENTICATION_NONE = 1;+ */+ AUTHENTICATION_NONE = 1,++ /**+ * @generated from enum value: PLAIN = 2;+ */+ PLAIN = 2,++ /**+ * @generated from enum value: LOGIN = 3;+ */+ LOGIN = 3,++ /**+ * @generated from enum value: CRAM_MD5 = 4;+ */+ CRAM_MD5 = 4,+}++/**+ * Describes the enum bytebase.v1.EmailSetting.SMTPConfig.Authentication.+ */+export declare const EmailSetting_SMTPConfig_AuthenticationSchema: GenEnum<EmailSetting_SMTPConfig_Authentication>;++/**+ * @generated from enum bytebase.v1.EmailSetting.Type+ */+export enum EmailSetting_Type {+ /**+ * @generated from enum value: TYPE_UNSPECIFIED = 0;+ */+ TYPE_UNSPECIFIED = 0,++ /**+ * @generated from enum value: SMTP = 1;+ */+ SMTP = 1,+}++/**+ * Describes the enum bytebase.v1.EmailSetting.Type.+ */+export declare const EmailSetting_TypeSchema: GenEnum<EmailSetting_Type>;++/**+ * @generated from message bytebase.v1.TestEmailSettingRequest+ */+export declare type TestEmailSettingRequest = Message<"bytebase.v1.TestEmailSettingRequest"> & {+ /**+ * @generated from field: string parent = 1;+ */+ parent: string;++ /**+ * @generated from field: bytebase.v1.EmailSetting email_setting = 2;+ */+ emailSetting?: EmailSetting;++ /**+ * @generated from field: string to = 3;+ */+ to: string;+};++/**+ * Describes the message bytebase.v1.TestEmailSettingRequest.+ * Use `create(TestEmailSettingRequestSchema)` to create a new message.+ */+export declare const TestEmailSettingRequestSchema: GenMessage<TestEmailSettingRequest>;++/**+ * @generated from message bytebase.v1.TestEmailSettingResponse+ */+export declare type TestEmailSettingResponse = Message<"bytebase.v1.TestEmailSettingResponse"> & {+ /**+ * @generated from field: bool success = 1;+ */+ success: boolean;++ /**+ * @generated from field: string error = 2;+ */+ error: string;+};++/**+ * Describes the message bytebase.v1.TestEmailSettingResponse.+ * Use `create(TestEmailSettingResponseSchema)` to create a new message.+ */+export declare const TestEmailSettingResponseSchema: GenMessage<TestEmailSettingResponse>;+/*** @generated from enum bytebase.v1.DatabaseChangeMode*/@@ -1424,5 +1645,16 @@ export declare const SettingService: GenService<{input: typeof UpdateSettingRequestSchema;output: typeof SettingSchema;},+ /**+ * Sends a test email using the provided config (without persisting).+ * Permissions required: bb.settings.set+ *+ * @generated from rpc bytebase.v1.SettingService.TestEmailSetting+ */+ testEmailSetting: {+ methodKind: "unary";+ input: typeof TestEmailSettingRequestSchema;+ output: typeof TestEmailSettingResponseSchema;+ },}>;diff --git a/frontend/src/types/proto-es/v1/setting_service_pb.js b/frontend/src/types/proto-es/v1/setting_service_pb.jsindex 73ca24b6a0..e1c5da696d 100644--- a/frontend/src/types/proto-es/v1/setting_service_pb.js+++ b/frontend/src/types/proto-es/v1/setting_service_pb.js@@ -17,7 +17,7 @@ import { file_v1_issue_service } from "./issue_service_pb";* Describes the file v1/setting_service.proto.*/export const file_v1_setting_service = /*@__PURE__*/- fileDesc("Chh2MS9zZXR0aW5nX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIhUKE0xpc3RTZXR0aW5nc1JlcXVlc3QiPgoUTGlzdFNldHRpbmdzUmVzcG9uc2USJgoIc2V0dGluZ3MYASADKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nIj8KEUdldFNldHRpbmdSZXF1ZXN0EioKBG5hbWUYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1NldHRpbmciOwoSR2V0U2V0dGluZ1Jlc3BvbnNlEiUKB3NldHRpbmcYASABKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nIqEBChRVcGRhdGVTZXR0aW5nUmVxdWVzdBIqCgdzZXR0aW5nGAEgASgLMhQuYnl0ZWJhc2UudjEuU2V0dGluZ0ID4EECEhUKDXZhbGlkYXRlX29ubHkYAiABKAgSFQoNYWxsb3dfbWlzc2luZxgDIAEoCBIvCgt1cGRhdGVfbWFzaxgEIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2siqQIKB1NldHRpbmcSEQoEbmFtZRgBIAEoCUID4EEIEi0KBXZhbHVlGAIgASgLMhkuYnl0ZWJhc2UudjEuU2V0dGluZ1ZhbHVlQgPgQQIirAEKC1NldHRpbmdOYW1lEhwKGFNFVFRJTkdfTkFNRV9VTlNQRUNJRklFRBAAEhUKEVdPUktTUEFDRV9QUk9GSUxFEAESFgoSV09SS1NQQUNFX0FQUFJPVkFMEAISCgoGQVBQX0lNEAMSBgoCQUkQBBIXChNEQVRBX0NMQVNTSUZJQ0FUSU9OEAUSEgoOU0VNQU5USUNfVFlQRVMQBhIPCgtFTlZJUk9OTUVOVBAHOi3qQSoKFGJ5dGViYXNlLmNvbS9TZXR0aW5nEhJzZXR0aW5ncy97c2V0dGluZ30irAMKDFNldHRpbmdWYWx1ZRIrCgZhcHBfaW0YAS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cnkSDQoFY29sb3IYBSABKAkaKwoJVGFnc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCToCOAEqVAoSRGF0YWJhc2VDaGFuZ2VNb2RlEiQKIERBVEFCQVNFX0NIQU5HRV9NT0RFX1VOU1BFQ0lGSUVEEAASDAoIUElQRUxJTkUQARIKCgZFRElUT1IQAjKuAwoOU2V0dGluZ1NlcnZpY2UShAEKDExpc3RTZXR0aW5ncxIgLmJ5dGViYXNlLnYxLkxpc3RTZXR0aW5nc1JlcXVlc3QaIS5ieXRlYmFzZS52MS5MaXN0U2V0dGluZ3NSZXNwb25zZSIv2kEAiuowEGJiLnNldHRpbmdzLmxpc3SQ6jABgtPkkwIOEgwvdjEvc2V0dGluZ3MSfwoKR2V0U2V0dGluZxIeLmJ5dGViYXNlLnYxLkdldFNldHRpbmdSZXF1ZXN0GhQuYnl0ZWJhc2UudjEuU2V0dGluZyI72kEEbmFtZYrqMA9iYi5zZXR0aW5ncy5nZXSQ6jACgtPkkwIXEhUvdjEve25hbWU9c2V0dGluZ3MvKn0SkwEKDVVwZGF0ZVNldHRpbmcSIS5ieXRlYmFzZS52MS5VcGRhdGVTZXR0aW5nUmVxdWVzdBoULmJ5dGViYXNlLnYxLlNldHRpbmciSYrqMA9iYi5zZXR0aW5ncy5zZXSQ6jACmOowAYLT5JMCKDoHc2V0dGluZzIdL3YxL3tzZXR0aW5nLm5hbWU9c2V0dGluZ3MvKn1CqQEKD2NvbS5ieXRlYmFzZS52MUITU2V0dGluZ1NlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_field_mask, file_google_type_expr, file_v1_annotation, file_v1_common, file_v1_issue_service]);+ fileDesc("Chh2MS9zZXR0aW5nX3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIhUKE0xpc3RTZXR0aW5nc1JlcXVlc3QiPgoUTGlzdFNldHRpbmdzUmVzcG9uc2USJgoIc2V0dGluZ3MYASADKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nIj8KEUdldFNldHRpbmdSZXF1ZXN0EioKBG5hbWUYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY29tL1NldHRpbmciOwoSR2V0U2V0dGluZ1Jlc3BvbnNlEiUKB3NldHRpbmcYASABKAsyFC5ieXRlYmFzZS52MS5TZXR0aW5nIqEBChRVcGRhdGVTZXR0aW5nUmVxdWVzdBIqCgdzZXR0aW5nGAEgASgLMhQuYnl0ZWJhc2UudjEuU2V0dGluZ0ID4EECEhUKDXZhbGlkYXRlX29ubHkYAiABKAgSFQoNYWxsb3dfbWlzc2luZxgDIAEoCBIvCgt1cGRhdGVfbWFzaxgEIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE1hc2sitAIKB1NldHRpbmcSEQoEbmFtZRgBIAEoCUID4EEIEi0KBXZhbHVlGAIgASgLMhkuYnl0ZWJhc2UudjEuU2V0dGluZ1ZhbHVlQgPgQQIitwEKC1NldHRpbmdOYW1lEhwKGFNFVFRJTkdfTkFNRV9VTlNQRUNJRklFRBAAEhUKEVdPUktTUEFDRV9QUk9GSUxFEAESFgoSV09SS1NQQUNFX0FQUFJPVkFMEAISCgoGQVBQX0lNEAMSBgoCQUkQBBIXChNEQVRBX0NMQVNTSUZJQ0FUSU9OEAUSEgoOU0VNQU5USUNfVFlQRVMQBhIPCgtFTlZJUk9OTUVOVBAHEgkKBUVNQUlMEAg6LepBKgoUYnl0ZWJhc2UuY29tL1NldHRpbmcSEnNldHRpbmdzL3tzZXR0aW5nfSLYAwoMU2V0dGluZ1ZhbHV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R0aW5ncy9FTUFJTDp0ZXN0QqkBCg9jb20uYnl0ZWJhc2UudjFCE1NldHRpbmdTZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_field_mask, file_google_type_expr, file_v1_annotation, file_v1_common, file_v1_issue_service]);/*** Describes the message bytebase.v1.ListSettingsRequest.@@ -326,6 +326,70 @@ export const EnvironmentSettingSchema = /*@__PURE__*/export const EnvironmentSetting_EnvironmentSchema = /*@__PURE__*/messageDesc(file_v1_setting_service, 15, 0);+/**+ * Describes the message bytebase.v1.EmailSetting.+ * Use `create(EmailSettingSchema)` to create a new message.+ */+export const EmailSettingSchema = /*@__PURE__*/+ messageDesc(file_v1_setting_service, 16);++/**+ * Describes the message bytebase.v1.EmailSetting.SMTPConfig.+ * Use `create(EmailSetting_SMTPConfigSchema)` to create a new message.+ */+export const EmailSetting_SMTPConfigSchema = /*@__PURE__*/+ messageDesc(file_v1_setting_service, 16, 0);++/**+ * Describes the enum bytebase.v1.EmailSetting.SMTPConfig.Encryption.+ */+export const EmailSetting_SMTPConfig_EncryptionSchema = /*@__PURE__*/+ enumDesc(file_v1_setting_service, 16, 0, 0);++/**+ * @generated from enum bytebase.v1.EmailSetting.SMTPConfig.Encryption+ */+export const EmailSetting_SMTPConfig_Encryption = /*@__PURE__*/+ tsEnum(EmailSetting_SMTPConfig_EncryptionSchema);++/**+ * Describes the enum bytebase.v1.EmailSetting.SMTPConfig.Authentication.+ */+export const EmailSetting_SMTPConfig_AuthenticationSchema = /*@__PURE__*/+ enumDesc(file_v1_setting_service, 16, 0, 1);++/**+ * @generated from enum bytebase.v1.EmailSetting.SMTPConfig.Authentication+ */+export const EmailSetting_SMTPConfig_Authentication = /*@__PURE__*/+ tsEnum(EmailSetting_SMTPConfig_AuthenticationSchema);++/**+ * Describes the enum bytebase.v1.EmailSetting.Type.+ */+export const EmailSetting_TypeSchema = /*@__PURE__*/+ enumDesc(file_v1_setting_service, 16, 0);++/**+ * @generated from enum bytebase.v1.EmailSetting.Type+ */+export const EmailSetting_Type = /*@__PURE__*/+ tsEnum(EmailSetting_TypeSchema);++/**+ * Describes the message bytebase.v1.TestEmailSettingRequest.+ * Use `create(TestEmailSettingRequestSchema)` to create a new message.+ */+export const TestEmailSettingRequestSchema = /*@__PURE__*/+ messageDesc(file_v1_setting_service, 17);++/**+ * Describes the message bytebase.v1.TestEmailSettingResponse.+ * Use `create(TestEmailSettingResponseSchema)` to create a new message.+ */+export const TestEmailSettingResponseSchema = /*@__PURE__*/+ messageDesc(file_v1_setting_service, 18);+/*** Describes the enum bytebase.v1.DatabaseChangeMode.*/diff --git a/frontend/src/utils/auth.ts b/frontend/src/utils/auth.tsindex 4930bb4184..513a3709ee 100644--- a/frontend/src/utils/auth.ts+++ b/frontend/src/utils/auth.ts@@ -1,5 +1,4 @@import {- AUTH_IDP_INIT_MODULE,AUTH_MFA_MODULE,AUTH_OAUTH_CALLBACK_MODULE,AUTH_OIDC_CALLBACK_MODULE,@@ -20,6 +19,5 @@ export const isAuthRelatedRoute = (routeName: string) => {AUTH_PASSWORD_FORGOT_MODULE,AUTH_OAUTH_CALLBACK_MODULE,AUTH_OIDC_CALLBACK_MODULE,- AUTH_IDP_INIT_MODULE,].includes(routeName);};diff --git a/frontend/src/views/IdPInitiatedSSO.vue b/frontend/src/views/IdPInitiatedSSO.vuedeleted file mode 100644index b275de224c..0000000000--- a/frontend/src/views/IdPInitiatedSSO.vue+++ /dev/null@@ -1,77 +0,0 @@-<template>- <div class="flex items-center justify-center min-h-screen">- <div class="text-center">- <BBSpin class="w-12 h-12 mx-auto" />- <h2 class="mt-4 text-xl font-semibold text-main">{{ message }}</h2>- <p v-if="errorMessage" class="mt-2 text-red-600">{{ errorMessage }}</p>- </div>- </div>-</template>--<script setup lang="ts">-import { onMounted, ref } from "vue";-import { useRoute, useRouter } from "vue-router";-import { BBSpin } from "@/bbkit";-import { AUTH_SIGNIN_MODULE } from "@/router/auth";-import { useIdentityProviderStore } from "@/store";-import { openWindowForSSO } from "@/utils/sso";--const route = useRoute();-const router = useRouter();-const idpStore = useIdentityProviderStore();--const message = ref("Initializing secure login...");-const errorMessage = ref("");--onMounted(async () => {- try {- const idpSlug = route.query.idp;- const relayState = route.query.relay_state;-- // Validate types - query params can be string, string[], or undefined- const idpSlugStr = typeof idpSlug === "string" ? idpSlug : undefined;- const relayStateStr =- typeof relayState === "string" ? relayState : undefined;-- // Security: Validate relay_state- if (relayStateStr && !isValidRelayState(relayStateStr)) {- throw new Error("Invalid relay state parameter");- }-- // Get IdP configuration- const idps = await idpStore.fetchIdentityProviderList();- const idp = idpSlugStr- ? await idpStore.getOrFetchIdentityProviderByName(`idps/${idpSlugStr}`)- : idps[0];-- if (!idp) {- throw new Error("Identity provider not found");- }-- message.value = `Logging in with ${idp.title}...`;-- // Trigger OAuth redirect (same as SP-initiated flow)- // Pass relay_state if provided (for deep linking), otherwise undefined- // The auth store will handle undefined by using default redirect logic- await openWindowForSSO(idp, false, relayStateStr);- } catch (error) {- console.error("IdP-initiated SSO error:", error);- errorMessage.value =- error instanceof Error ? error.message : "Failed to initiate SSO";- message.value = "Authentication failed";-- setTimeout(() => {- router.push({- name: AUTH_SIGNIN_MODULE,- query: { error: "sso_init_failed" },- });- }, 3000);- }-});--function isValidRelayState(state: string): boolean {- // Only allow relative URLs starting with /- // Reject protocol-relative URLs (//) to prevent open redirect attacks- return state.startsWith("/") && !state.startsWith("//");-}-</script>diff --git a/frontend/src/views/auth/Signin.vue b/frontend/src/views/auth/Signin.vueindex 3180018d5a..4dfef66c7d 100644--- a/frontend/src/views/auth/Signin.vue+++ b/frontend/src/views/auth/Signin.vue@@ -284,9 +284,17 @@ watchEffect(() => {});onMounted(async () => {+ // If a workspace is specified in the query, fetch workspace-scoped actuator and IDPs.+ const workspaceID = route.query["workspace"] as string | undefined;+ const workspaceName = workspaceID ? `workspaces/${workspaceID}` : undefined;try {- // Prepare all identity providers.- await identityProviderStore.fetchIdentityProviderList();+ const promises: Promise<unknown>[] = [+ identityProviderStore.fetchIdentityProviderList(workspaceName),+ ];+ if (workspaceName) {+ promises.push(actuatorStore.fetchServerInfo(workspaceName));+ }+ await Promise.all(promises);} catch (error) {pushNotification({module: "bytebase",diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex f3f8376cc3..e9a6cc25cb 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -15997,6 +15997,47 @@ paths:application/json:schema:$ref: '#/components/schemas/bytebase.v1.ServiceAccount'+ /v1/workspaces/{workspace}/settings/EMAIL:test:+ post:+ tags:+ - SettingService+ summary: TestEmailSetting+ description: |-+ Sends a test email using the provided config (without persisting).+ Permissions required: bb.settings.set+ operationId: SettingService_TestEmailSetting+ parameters:+ - name: workspace+ in: path+ description: The workspace id.+ required: true+ schema:+ type: string+ requestBody:+ content:+ application/json:+ schema:+ type: object+ properties:+ emailSetting:+ title: email_setting+ $ref: '#/components/schemas/bytebase.v1.EmailSetting'+ to:+ type: string+ title: to+ title: TestEmailSettingRequest+ required:+ - emailSetting+ - to+ additionalProperties: false+ required: true+ responses:+ "200":+ description: Success+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/bytebase.v1.TestEmailSettingResponse'/v1/workspaces/{workspace}/workloadIdentities:get:tags:@@ -19845,6 +19886,78 @@ components:title: DimensionalConfigadditionalProperties: falsedescription: DimensionalConfig defines dimensional and constraint parameters for spatial indexes.+ bytebase.v1.EmailSetting:+ type: object+ allOf:+ - properties:+ from:+ type: string+ title: from+ fromName:+ type: string+ title: from_name+ type:+ title: type+ $ref: '#/components/schemas/bytebase.v1.EmailSetting.Type'+ - oneOf:+ - type: object+ properties:+ smtp:+ title: smtp+ $ref: '#/components/schemas/bytebase.v1.EmailSetting.SMTPConfig'+ title: smtp+ required:+ - smtp+ title: EmailSetting+ additionalProperties: false+ bytebase.v1.EmailSetting.SMTPConfig:+ type: object+ properties:+ host:+ type: string+ title: host+ port:+ type: integer+ title: port+ format: int32+ username:+ type: string+ title: username+ password:+ type: string+ title: password+ writeOnly: true+ encryption:+ title: encryption+ $ref: '#/components/schemas/bytebase.v1.EmailSetting.SMTPConfig.Encryption'+ authentication:+ title: authentication+ $ref: '#/components/schemas/bytebase.v1.EmailSetting.SMTPConfig.Authentication'+ title: SMTPConfig+ additionalProperties: false+ bytebase.v1.EmailSetting.SMTPConfig.Authentication:+ type: string+ title: Authentication+ enum:+ - AUTHENTICATION_UNSPECIFIED+ - AUTHENTICATION_NONE+ - PLAIN+ - LOGIN+ - CRAM_MD5+ bytebase.v1.EmailSetting.SMTPConfig.Encryption:+ type: string+ title: Encryption+ enum:+ - ENCRYPTION_UNSPECIFIED+ - ENCRYPTION_NONE+ - STARTTLS+ - SSL_TLS+ bytebase.v1.EmailSetting.Type:+ type: string+ title: Type+ enum:+ - TYPE_UNSPECIFIED+ - SMTPbytebase.v1.Engine:type: stringtitle: Engine@@ -26549,6 +26662,7 @@ components:- DATA_CLASSIFICATION- SEMANTIC_TYPES- ENVIRONMENTbytebase.v1.SettingValue:type: objectoneOf:@@ -26576,6 +26690,14 @@ components:title: data_classificationrequired:- dataClassification+ - type: object+ properties:+ email:+ title: email+ $ref: '#/components/schemas/bytebase.v1.EmailSetting'+ title: email+ required:- type: objectproperties:environment:@@ -28067,6 +28189,35 @@ components:title: TessellationConfigadditionalProperties: falsedescription: TessellationConfig defines tessellation parameters for spatial indexes.+ bytebase.v1.TestEmailSettingRequest:+ type: object+ properties:+ parent:+ type: string+ title: parent+ emailSetting:+ title: email_setting+ $ref: '#/components/schemas/bytebase.v1.EmailSetting'+ to:+ type: string+ title: to+ title: TestEmailSettingRequest+ required:+ - parent+ - emailSetting+ - to+ additionalProperties: false+ bytebase.v1.TestEmailSettingResponse:+ type: object+ properties:+ success:+ type: boolean+ title: success+ error:+ type: string+ title: error+ title: TestEmailSettingResponse+ additionalProperties: falsebytebase.v1.TestIdentityProviderRequest:type: objectallOf:diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex 25cecb7c7e..22b9d15545 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -260,6 +260,8 @@- [DataClassificationSetting.DataClassificationConfig.ClassificationEntry](#bytebase-store-DataClassificationSetting-DataClassificationConfig-ClassificationEntry)- [DataClassificationSetting.DataClassificationConfig.DataClassification](#bytebase-store-DataClassificationSetting-DataClassificationConfig-DataClassification)- [DataClassificationSetting.DataClassificationConfig.Level](#bytebase-store-DataClassificationSetting-DataClassificationConfig-Level)+ - [EmailSetting](#bytebase-store-EmailSetting)+ - [EmailSetting.SMTPConfig](#bytebase-store-EmailSetting-SMTPConfig)- [EnvironmentSetting](#bytebase-store-EnvironmentSetting)- [EnvironmentSetting.Environment](#bytebase-store-EnvironmentSetting-Environment)- [EnvironmentSetting.Environment.TagsEntry](#bytebase-store-EnvironmentSetting-Environment-TagsEntry)@@ -274,6 +276,9 @@- [AISetting.Provider](#bytebase-store-AISetting-Provider)- [Algorithm.InnerOuterMask.MaskType](#bytebase-store-Algorithm-InnerOuterMask-MaskType)+ - [EmailSetting.SMTPConfig.Authentication](#bytebase-store-EmailSetting-SMTPConfig-Authentication)+ - [EmailSetting.SMTPConfig.Encryption](#bytebase-store-EmailSetting-SMTPConfig-Encryption)+ - [EmailSetting.Type](#bytebase-store-EmailSetting-Type)- [SettingName](#bytebase-store-SettingName)- [WorkspaceApprovalSetting.Rule.Source](#bytebase-store-WorkspaceApprovalSetting-Rule-Source)- [WorkspaceProfileSetting.Announcement.AlertLevel](#bytebase-store-WorkspaceProfileSetting-Announcement-AlertLevel)@@ -4358,6 +4363,44 @@ All other settings live in per-workspace WORKSPACE_PROFILE.+<a name="bytebase-store-EmailSetting"></a>++### EmailSetting++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| from | [string](#string) | | |+| from_name | [string](#string) | | |+| type | [EmailSetting.Type](#bytebase-store-EmailSetting-Type) | | |+| smtp | [EmailSetting.SMTPConfig](#bytebase-store-EmailSetting-SMTPConfig) | | |+++++++<a name="bytebase-store-EmailSetting-SMTPConfig"></a>++### EmailSetting.SMTPConfig++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| host | [string](#string) | | |+| port | [int32](#int32) | | |+| username | [string](#string) | | |+| password | [string](#string) | | |+| encryption | [EmailSetting.SMTPConfig.Encryption](#bytebase-store-EmailSetting-SMTPConfig-Encryption) | | |+| authentication | [EmailSetting.SMTPConfig.Authentication](#bytebase-store-EmailSetting-SMTPConfig-Authentication) | | |++++++<a name="bytebase-store-EnvironmentSetting"></a>### EnvironmentSetting@@ -4591,6 +4634,47 @@ All other settings live in per-workspace WORKSPACE_PROFILE.+<a name="bytebase-store-EmailSetting-SMTPConfig-Authentication"></a>++### EmailSetting.SMTPConfig.Authentication+++| Name | Number | Description |+| ---- | ------ | ----------- |+| AUTHENTICATION_UNSPECIFIED | 0 | |+| AUTHENTICATION_NONE | 1 | |+| PLAIN | 2 | |+| LOGIN | 3 | |+| CRAM_MD5 | 4 | |++++<a name="bytebase-store-EmailSetting-SMTPConfig-Encryption"></a>++### EmailSetting.SMTPConfig.Encryption+++| Name | Number | Description |+| ---- | ------ | ----------- |+| ENCRYPTION_UNSPECIFIED | 0 | |+| ENCRYPTION_NONE | 1 | |+| STARTTLS | 2 | |+| SSL_TLS | 3 | |++++<a name="bytebase-store-EmailSetting-Type"></a>++### EmailSetting.Type+++| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | |+| SMTP | 1 | |+++<a name="bytebase-store-SettingName"></a>### SettingName@@ -4607,6 +4691,7 @@ All other settings live in per-workspace WORKSPACE_PROFILE.| DATA_CLASSIFICATION | 6 | || SEMANTIC_TYPES | 7 | || ENVIRONMENT | 8 | |+| EMAIL | 9 | |diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.htmlindex b5704490d3..97d17eb18f 100644--- a/proto/gen/grpc-doc/store/index.html+++ b/proto/gen/grpc-doc/store/index.html@@ -1221,6 +1221,14 @@<a href="#bytebase.store.DataClassificationSetting.DataClassificationConfig.Level"><span class="badge">M</span>DataClassificationSetting.DataClassificationConfig.Level</a></li>+ <li>+ <a href="#bytebase.store.EmailSetting"><span class="badge">M</span>EmailSetting</a>+ </li>++ <li>+ <a href="#bytebase.store.EmailSetting.SMTPConfig"><span class="badge">M</span>EmailSetting.SMTPConfig</a>+ </li>+<li><a href="#bytebase.store.EnvironmentSetting"><span class="badge">M</span>EnvironmentSetting</a></li>@@ -1274,6 +1282,18 @@<a href="#bytebase.store.Algorithm.InnerOuterMask.MaskType"><span class="badge">E</span>Algorithm.InnerOuterMask.MaskType</a></li>+ <li>+ <a href="#bytebase.store.EmailSetting.SMTPConfig.Authentication"><span class="badge">E</span>EmailSetting.SMTPConfig.Authentication</a>+ </li>++ <li>+ <a href="#bytebase.store.EmailSetting.SMTPConfig.Encryption"><span class="badge">E</span>EmailSetting.SMTPConfig.Encryption</a>+ </li>++ <li>+ <a href="#bytebase.store.EmailSetting.Type"><span class="badge">E</span>EmailSetting.Type</a>+ </li>+<li><a href="#bytebase.store.SettingName"><span class="badge">E</span>SettingName</a></li>@@ -11990,6 +12010,110 @@ The id should in [0-9]+-[0-9]+-[0-9]+ format. </p></td>+ <h3 id="bytebase.store.EmailSetting">EmailSetting</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>from</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>from_name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>type</td>+ <td><a href="#bytebase.store.EmailSetting.Type">EmailSetting.Type</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>smtp</td>+ <td><a href="#bytebase.store.EmailSetting.SMTPConfig">EmailSetting.SMTPConfig</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.store.EmailSetting.SMTPConfig">EmailSetting.SMTPConfig</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>host</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>port</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>username</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>password</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>encryption</td>+ <td><a href="#bytebase.store.EmailSetting.SMTPConfig.Encryption">EmailSetting.SMTPConfig.Encryption</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>authentication</td>+ <td><a href="#bytebase.store.EmailSetting.SMTPConfig.Authentication">EmailSetting.SMTPConfig.Authentication</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>+++++<h3 id="bytebase.store.EnvironmentSetting">EnvironmentSetting</h3><p></p>@@ -12597,6 +12721,105 @@ The default value is 100MB, we will use the default value if the setting not exi</tbody></table>+ <h3 id="bytebase.store.EmailSetting.SMTPConfig.Authentication">EmailSetting.SMTPConfig.Authentication</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>AUTHENTICATION_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>AUTHENTICATION_NONE</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>PLAIN</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>LOGIN</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>CRAM_MD5</td>+ <td>4</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.store.EmailSetting.SMTPConfig.Encryption">EmailSetting.SMTPConfig.Encryption</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>ENCRYPTION_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>ENCRYPTION_NONE</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STARTTLS</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>SSL_TLS</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.store.EmailSetting.Type">EmailSetting.Type</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>SMTP</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>+<h3 id="bytebase.store.SettingName">SettingName</h3><p></p><table class="enum-table">@@ -12659,6 +12882,12 @@ The default value is 100MB, we will use the default value if the setting not exi<td><p></p></td></tr>+ <tr>+ <td>EMAIL</td>+ <td>9</td>+ <td><p></p></td>+ </tr>+</tbody></table>diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex feded79a02..a5eb4d277c 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -96,6 +96,8 @@- [DataClassificationSetting.DataClassificationConfig.ClassificationEntry](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-ClassificationEntry)- [DataClassificationSetting.DataClassificationConfig.DataClassification](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-DataClassification)- [DataClassificationSetting.DataClassificationConfig.Level](#bytebase-v1-DataClassificationSetting-DataClassificationConfig-Level)+ - [EmailSetting](#bytebase-v1-EmailSetting)+ - [EmailSetting.SMTPConfig](#bytebase-v1-EmailSetting-SMTPConfig)- [EnvironmentSetting](#bytebase-v1-EnvironmentSetting)- [EnvironmentSetting.Environment](#bytebase-v1-EnvironmentSetting-Environment)- [EnvironmentSetting.Environment.TagsEntry](#bytebase-v1-EnvironmentSetting-Environment-TagsEntry)@@ -107,6 +109,8 @@- [SemanticTypeSetting.SemanticType](#bytebase-v1-SemanticTypeSetting-SemanticType)- [Setting](#bytebase-v1-Setting)- [SettingValue](#bytebase-v1-SettingValue)+ - [TestEmailSettingRequest](#bytebase-v1-TestEmailSettingRequest)+ - [TestEmailSettingResponse](#bytebase-v1-TestEmailSettingResponse)- [UpdateSettingRequest](#bytebase-v1-UpdateSettingRequest)- [WorkspaceApprovalSetting](#bytebase-v1-WorkspaceApprovalSetting)- [WorkspaceApprovalSetting.Rule](#bytebase-v1-WorkspaceApprovalSetting-Rule)@@ -117,6 +121,9 @@- [Algorithm.InnerOuterMask.MaskType](#bytebase-v1-Algorithm-InnerOuterMask-MaskType)- [Announcement.AlertLevel](#bytebase-v1-Announcement-AlertLevel)- [DatabaseChangeMode](#bytebase-v1-DatabaseChangeMode)+ - [EmailSetting.SMTPConfig.Authentication](#bytebase-v1-EmailSetting-SMTPConfig-Authentication)+ - [EmailSetting.SMTPConfig.Encryption](#bytebase-v1-EmailSetting-SMTPConfig-Encryption)+ - [EmailSetting.Type](#bytebase-v1-EmailSetting-Type)- [Setting.SettingName](#bytebase-v1-Setting-SettingName)- [WorkspaceApprovalSetting.Rule.Source](#bytebase-v1-WorkspaceApprovalSetting-Rule-Source)@@ -2147,6 +2154,44 @@ IssueService manages issues for tracking database changes and tasks.+<a name="bytebase-v1-EmailSetting"></a>++### EmailSetting++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| from | [string](#string) | | |+| from_name | [string](#string) | | |+| type | [EmailSetting.Type](#bytebase-v1-EmailSetting-Type) | | |+| smtp | [EmailSetting.SMTPConfig](#bytebase-v1-EmailSetting-SMTPConfig) | | |+++++++<a name="bytebase-v1-EmailSetting-SMTPConfig"></a>++### EmailSetting.SMTPConfig++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| host | [string](#string) | | |+| port | [int32](#int32) | | |+| username | [string](#string) | | |+| password | [string](#string) | | |+| encryption | [EmailSetting.SMTPConfig.Encryption](#bytebase-v1-EmailSetting-SMTPConfig-Encryption) | | |+| authentication | [EmailSetting.SMTPConfig.Authentication](#bytebase-v1-EmailSetting-SMTPConfig-Authentication) | | |++++++<a name="bytebase-v1-EnvironmentSetting"></a>### EnvironmentSetting@@ -2317,6 +2362,40 @@ The data in setting value.| semantic_type | [SemanticTypeSetting](#bytebase-v1-SemanticTypeSetting) | | || ai | [AISetting](#bytebase-v1-AISetting) | | || environment | [EnvironmentSetting](#bytebase-v1-EnvironmentSetting) | | |+| email | [EmailSetting](#bytebase-v1-EmailSetting) | | |+++++++<a name="bytebase-v1-TestEmailSettingRequest"></a>++### TestEmailSettingRequest++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| parent | [string](#string) | | |+| email_setting | [EmailSetting](#bytebase-v1-EmailSetting) | | |+| to | [string](#string) | | |+++++++<a name="bytebase-v1-TestEmailSettingResponse"></a>++### TestEmailSettingResponse++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| success | [bool](#bool) | | |+| error | [string](#string) | | |@@ -2493,6 +2572,47 @@ We support three levels of AlertLevel: INFO, WARNING, and ERROR.+<a name="bytebase-v1-EmailSetting-SMTPConfig-Authentication"></a>++### EmailSetting.SMTPConfig.Authentication+++| Name | Number | Description |+| ---- | ------ | ----------- |+| AUTHENTICATION_UNSPECIFIED | 0 | |+| AUTHENTICATION_NONE | 1 | |+| PLAIN | 2 | |+| LOGIN | 3 | |+| CRAM_MD5 | 4 | |++++<a name="bytebase-v1-EmailSetting-SMTPConfig-Encryption"></a>++### EmailSetting.SMTPConfig.Encryption+++| Name | Number | Description |+| ---- | ------ | ----------- |+| ENCRYPTION_UNSPECIFIED | 0 | |+| ENCRYPTION_NONE | 1 | |+| STARTTLS | 2 | |+| SSL_TLS | 3 | |++++<a name="bytebase-v1-EmailSetting-Type"></a>++### EmailSetting.Type+++| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | |+| SMTP | 1 | |+++<a name="bytebase-v1-Setting-SettingName"></a>### Setting.SettingName@@ -2508,6 +2628,7 @@ We support three levels of AlertLevel: INFO, WARNING, and ERROR.| DATA_CLASSIFICATION | 5 | || SEMANTIC_TYPES | 6 | || ENVIRONMENT | 7 | |+| EMAIL | 8 | |@@ -2541,6 +2662,7 @@ SettingService manages workspace-level settings and configurations.| ListSettings | [ListSettingsRequest](#bytebase-v1-ListSettingsRequest) | [ListSettingsResponse](#bytebase-v1-ListSettingsResponse) | Lists all workspace settings. Permissions required: bb.settings.list || GetSetting | [GetSettingRequest](#bytebase-v1-GetSettingRequest) | [Setting](#bytebase-v1-Setting) | Retrieves a workspace setting by name. Permissions required: bb.settings.get || UpdateSetting | [UpdateSettingRequest](#bytebase-v1-UpdateSettingRequest) | [Setting](#bytebase-v1-Setting) | Updates a workspace setting. Permissions required: bb.settings.set |+| TestEmailSetting | [TestEmailSettingRequest](#bytebase-v1-TestEmailSettingRequest) | [TestEmailSettingResponse](#bytebase-v1-TestEmailSettingResponse) | Sends a test email using the provided config (without persisting). Permissions required: bb.settings.set |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 85c3a67dbb..9424a47ccf 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -534,6 +534,14 @@<a href="#bytebase.v1.DataClassificationSetting.DataClassificationConfig.Level"><span class="badge">M</span>DataClassificationSetting.DataClassificationConfig.Level</a></li>+ <li>+ <a href="#bytebase.v1.EmailSetting"><span class="badge">M</span>EmailSetting</a>+ </li>++ <li>+ <a href="#bytebase.v1.EmailSetting.SMTPConfig"><span class="badge">M</span>EmailSetting.SMTPConfig</a>+ </li>+<li><a href="#bytebase.v1.EnvironmentSetting"><span class="badge">M</span>EnvironmentSetting</a></li>@@ -578,6 +586,14 @@<a href="#bytebase.v1.SettingValue"><span class="badge">M</span>SettingValue</a></li>+ <li>+ <a href="#bytebase.v1.TestEmailSettingRequest"><span class="badge">M</span>TestEmailSettingRequest</a>+ </li>++ <li>+ <a href="#bytebase.v1.TestEmailSettingResponse"><span class="badge">M</span>TestEmailSettingResponse</a>+ </li>+<li><a href="#bytebase.v1.UpdateSettingRequest"><span class="badge">M</span>UpdateSettingRequest</a></li>@@ -615,6 +631,18 @@<a href="#bytebase.v1.DatabaseChangeMode"><span class="badge">E</span>DatabaseChangeMode</a></li>+ <li>+ <a href="#bytebase.v1.EmailSetting.SMTPConfig.Authentication"><span class="badge">E</span>EmailSetting.SMTPConfig.Authentication</a>+ </li>++ <li>+ <a href="#bytebase.v1.EmailSetting.SMTPConfig.Encryption"><span class="badge">E</span>EmailSetting.SMTPConfig.Encryption</a>+ </li>++ <li>+ <a href="#bytebase.v1.EmailSetting.Type"><span class="badge">E</span>EmailSetting.Type</a>+ </li>+<li><a href="#bytebase.v1.Setting.SettingName"><span class="badge">E</span>Setting.SettingName</a></li>@@ -6782,6 +6810,110 @@ The id should in [0-9]+-[0-9]+-[0-9]+ format. </p></td>+ <h3 id="bytebase.v1.EmailSetting">EmailSetting</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>from</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>from_name</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>type</td>+ <td><a href="#bytebase.v1.EmailSetting.Type">EmailSetting.Type</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>smtp</td>+ <td><a href="#bytebase.v1.EmailSetting.SMTPConfig">EmailSetting.SMTPConfig</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.EmailSetting.SMTPConfig">EmailSetting.SMTPConfig</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>host</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>port</td>+ <td><a href="#int32">int32</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>username</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>password</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>encryption</td>+ <td><a href="#bytebase.v1.EmailSetting.SMTPConfig.Encryption">EmailSetting.SMTPConfig.Encryption</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>authentication</td>+ <td><a href="#bytebase.v1.EmailSetting.SMTPConfig.Authentication">EmailSetting.SMTPConfig.Authentication</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>+++++<h3 id="bytebase.v1.EnvironmentSetting">EnvironmentSetting</h3><p></p>@@ -7140,6 +7272,82 @@ Example: "settings/SEMANTIC_TYPES" </p></td><td><p> </p></td></tr>+ <tr>+ <td>email</td>+ <td><a href="#bytebase.v1.EmailSetting">EmailSetting</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.TestEmailSettingRequest">TestEmailSettingRequest</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>parent</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>email_setting</td>+ <td><a href="#bytebase.v1.EmailSetting">EmailSetting</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>to</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ </tbody>+ </table>++++++ <h3 id="bytebase.v1.TestEmailSettingResponse">TestEmailSettingResponse</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>success</td>+ <td><a href="#bool">bool</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>++ <tr>+ <td>error</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p> </p></td>+ </tr>+</tbody></table>@@ -7645,6 +7853,105 @@ Default to this mode.</p></td></tbody></table>+ <h3 id="bytebase.v1.EmailSetting.SMTPConfig.Authentication">EmailSetting.SMTPConfig.Authentication</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>AUTHENTICATION_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>AUTHENTICATION_NONE</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>PLAIN</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>LOGIN</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>CRAM_MD5</td>+ <td>4</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.EmailSetting.SMTPConfig.Encryption">EmailSetting.SMTPConfig.Encryption</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>ENCRYPTION_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>ENCRYPTION_NONE</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>STARTTLS</td>+ <td>2</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>SSL_TLS</td>+ <td>3</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>++ <h3 id="bytebase.v1.EmailSetting.Type">EmailSetting.Type</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>SMTP</td>+ <td>1</td>+ <td><p></p></td>+ </tr>++ </tbody>+ </table>+<h3 id="bytebase.v1.Setting.SettingName">Setting.SettingName</h3><p></p><table class="enum-table">@@ -7701,6 +8008,12 @@ Default to this mode.</p></td><td><p></p></td></tr>+ <tr>+ <td>EMAIL</td>+ <td>8</td>+ <td><p></p></td>+ </tr>+</tbody></table>@@ -7787,6 +8100,14 @@ Permissions required: bb.settings.get</p></td>Permissions required: bb.settings.set</p></td></tr>+ <tr>+ <td>TestEmailSetting</td>+ <td><a href="#bytebase.v1.TestEmailSettingRequest">TestEmailSettingRequest</a></td>+ <td><a href="#bytebase.v1.TestEmailSettingResponse">TestEmailSettingResponse</a></td>+ <td><p>Sends a test email using the provided config (without persisting).+Permissions required: bb.settings.set</p></td>+ </tr>+</tbody></table>@@ -7835,6 +8156,16 @@ Permissions required: bb.settings.set</p></td></tr>+++ <tr>+ <td>TestEmailSetting</td>+ <td>POST</td>+ <td>/v1/{parent=workspaces/*}/settings/EMAIL:test</td>+ <td>*</td>+ </tr>++</tbody></table>diff --git a/proto/store/store/setting.proto b/proto/store/store/setting.protoindex dcc93306c8..d2ce5af8db 100644--- a/proto/store/store/setting.proto+++ b/proto/store/store/setting.proto@@ -20,6 +20,7 @@ enum SettingName {DATA_CLASSIFICATION = 6;SEMANTIC_TYPES = 7;ENVIRONMENT = 8;+ EMAIL = 9;}message SystemSetting {@@ -340,3 +341,43 @@ message EnvironmentSetting {string color = 5;}}++message EmailSetting {+ string from = 1;+ string from_name = 2;++ Type type = 3;++ enum Type {+ TYPE_UNSPECIFIED = 0;+ SMTP = 1;+ }++ oneof config {+ SMTPConfig smtp = 4;+ }++ message SMTPConfig {+ string host = 1;+ int32 port = 2;+ string username = 3;+ string password = 4;+ Encryption encryption = 5;+ Authentication authentication = 6;++ enum Encryption {+ ENCRYPTION_UNSPECIFIED = 0;+ ENCRYPTION_NONE = 1;+ STARTTLS = 2;+ SSL_TLS = 3;+ }++ enum Authentication {+ AUTHENTICATION_UNSPECIFIED = 0;+ AUTHENTICATION_NONE = 1;+ PLAIN = 2;+ LOGIN = 3;+ CRAM_MD5 = 4;+ }+ }+}diff --git a/proto/v1/v1/setting_service.proto b/proto/v1/v1/setting_service.protoindex b7200a327e..f4bf6690ba 100644--- a/proto/v1/v1/setting_service.proto+++ b/proto/v1/v1/setting_service.proto@@ -46,6 +46,17 @@ service SettingService {option (bytebase.v1.auth_method) = CUSTOM;option (bytebase.v1.audit) = true;}++ // Sends a test email using the provided config (without persisting).+ // Permissions required: bb.settings.set+ rpc TestEmailSetting(TestEmailSettingRequest) returns (TestEmailSettingResponse) {+ option (google.api.http) = {+ post: "/v1/{parent=workspaces/*}/settings/EMAIL:test"+ body: "*"+ };+ option (bytebase.v1.permission) = "bb.settings.set";+ option (bytebase.v1.auth_method) = IAM;+ }}message ListSettingsRequest {}@@ -99,6 +110,7 @@ message Setting {DATA_CLASSIFICATION = 5;SEMANTIC_TYPES = 6;ENVIRONMENT = 7;+ EMAIL = 8;}// The resource name of the setting.@@ -120,6 +132,7 @@ message SettingValue {SemanticTypeSetting semantic_type = 5;AISetting ai = 6;EnvironmentSetting environment = 7;+ EmailSetting email = 8;}}@@ -461,3 +474,54 @@ message EnvironmentSetting {string color = 5;}}++message EmailSetting {+ string from = 1;+ string from_name = 2;++ Type type = 3;++ enum Type {+ TYPE_UNSPECIFIED = 0;+ SMTP = 1;+ }++ oneof config {+ SMTPConfig smtp = 4;+ }++ message SMTPConfig {+ string host = 1;+ int32 port = 2;+ string username = 3;+ string password = 4 [(google.api.field_behavior) = INPUT_ONLY];+ Encryption encryption = 5;+ Authentication authentication = 6;++ enum Encryption {+ ENCRYPTION_UNSPECIFIED = 0;+ ENCRYPTION_NONE = 1;+ STARTTLS = 2;+ SSL_TLS = 3;+ }++ enum Authentication {+ AUTHENTICATION_UNSPECIFIED = 0;+ AUTHENTICATION_NONE = 1;+ PLAIN = 2;+ LOGIN = 3;+ CRAM_MD5 = 4;+ }+ }+}++message TestEmailSettingRequest {+ string parent = 1 [(google.api.field_behavior) = REQUIRED];+ EmailSetting email_setting = 2 [(google.api.field_behavior) = REQUIRED];+ string to = 3 [(google.api.field_behavior) = REQUIRED];+}++message TestEmailSettingResponse {+ bool success = 1;+ string error = 2;+}