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 env and file for vault token (#20647)
ecmadao188743073ae0
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yamlindex 12fe5f60d3..6b8620f31a 100644--- a/backend/api/mcp/gen/openapi.yaml+++ b/backend/api/mcp/gen/openapi.yaml@@ -10388,6 +10388,10 @@ components:title: auth_typedescription: The authentication method for accessing the secret store.$ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.AuthType'+ tokenType:+ title: token_type+ description: How to interpret the token field when auth_type is TOKEN.+ $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.TokenType'engineName:type: stringtitle: engine_name@@ -10436,7 +10440,10 @@ components:token:type: stringtitle: token- description: Token for direct authentication.+ description: |-+ Token for direct authentication. Interpreted according to token_type:+ the literal token (PLAIN), an environment variable name (ENVIRONMENT),+ or a file path (FILE).title: tokenrequired:- token@@ -10486,6 +10493,14 @@ components:- AWS_SECRETS_MANAGER- GCP_SECRET_MANAGER- AZURE_KEY_VAULT+ bytebase.v1.DataSourceExternalSecret.TokenType:+ type: string+ title: TokenType+ enum:+ - TOKEN_TYPE_UNSPECIFIED+ - PLAIN+ - ENVIRONMENT+ - FILEbytebase.v1.DataSourceType:type: stringtitle: DataSourceTypediff --git a/backend/api/v1/instance_service.go b/backend/api/v1/instance_service.goindex 4b8f9b0fd4..eeb5751ed3 100644--- a/backend/api/v1/instance_service.go+++ b/backend/api/v1/instance_service.go@@ -421,6 +421,11 @@ func (s *InstanceService) checkDataSource(ctx context.Context, instance *store.Ireturn err}+ // Validate external secret restrictions in SaaS mode+ if err := s.validateExternalSecretForSaaS(dataSource); err != nil {+ return err+ }+if err := s.licenseService.IsFeatureEnabledForInstance(ctx, common.GetWorkspaceIDFromContext(ctx), v1pb.PlanFeature_FEATURE_EXTERNAL_SECRET_MANAGER, instance); err != nil {missingFeatureError := connect.NewError(connect.CodePermissionDenied, err)if dataSource.GetExternalSecret() != nil {@@ -464,6 +469,42 @@ func (s *InstanceService) validateIAMCredentialForSaaS(dataSource *storepb.DataSreturn nil}+// validateExternalSecretForSaaS blocks external secret credential sources that+// read from the Bytebase host in SaaS mode. The configured secret store URL is+// user-controlled, so resolving a credential from the host environment or+// filesystem would let a tenant exfiltrate host env vars or files to an endpoint+// they own (the resolved value is sent to that URL as the Vault token / AppRole+// secret id).+func (s *InstanceService) validateExternalSecretForSaaS(dataSource *storepb.DataSource) error {+ if !s.profile.SaaS {+ return nil+ }++ externalSecret := dataSource.GetExternalSecret()+ switch externalSecret.GetAuthType() {+ case storepb.DataSourceExternalSecret_TOKEN:+ switch externalSecret.GetTokenType() {+ case storepb.DataSourceExternalSecret_ENVIRONMENT, storepb.DataSourceExternalSecret_FILE:+ return connect.NewError(+ connect.CodeInvalidArgument,+ errors.New("environment variable and file token sources are not allowed in SaaS mode for security. Please provide the token directly"),+ )+ default:+ return nil+ }+ case storepb.DataSourceExternalSecret_VAULT_APP_ROLE:+ if externalSecret.GetAppRole().GetType() == storepb.DataSourceExternalSecret_AppRoleAuthOption_ENVIRONMENT {+ return connect.NewError(+ connect.CodeInvalidArgument,+ errors.New("environment variable secret id is not allowed in SaaS mode for security. Please provide the secret id directly"),+ )+ }+ return nil+ default:+ return nil+ }+}+// UpdateInstance updates an instance.func (s *InstanceService) UpdateInstance(ctx context.Context, req *connect.Request[v1pb.UpdateInstanceRequest]) (*connect.Response[v1pb.Instance], error) {if req.Msg.Instance == nil {diff --git a/backend/api/v1/instance_service_converter.go b/backend/api/v1/instance_service_converter.goindex 13080ab110..17991c5837 100644--- a/backend/api/v1/instance_service_converter.go+++ b/backend/api/v1/instance_service_converter.go@@ -150,6 +150,15 @@ func convertDataSourceExternalSecret(externalSecret *storepb.DataSourceExternalS}}case v1pb.DataSourceExternalSecret_TOKEN:+ // token is INPUT_ONLY (write-only): always clear it on read, regardless+ // of token_type. The env var name / file path is re-entered on edit, the+ // same as the literal token and the AppRole role_id/secret_id above.+ resp.TokenType = v1pb.DataSourceExternalSecret_TokenType(externalSecret.TokenType)+ if resp.TokenType == v1pb.DataSourceExternalSecret_TOKEN_TYPE_UNSPECIFIED {+ // Legacy data has no token_type; surface it as PLAIN explicitly so+ // the API never exposes an ambiguous UNSPECIFIED for an existing token.+ resp.TokenType = v1pb.DataSourceExternalSecret_PLAIN+ }resp.AuthOption = &v1pb.DataSourceExternalSecret_Token{Token: "",}@@ -278,6 +287,7 @@ func convertV1DataSourceExternalSecret(externalSecret *v1pb.DataSourceExternalSe// Convert auth optionsswitch externalSecret.AuthOption.(type) {case *v1pb.DataSourceExternalSecret_Token:+ secret.TokenType = storepb.DataSourceExternalSecret_TokenType(externalSecret.TokenType)secret.AuthOption = &storepb.DataSourceExternalSecret_Token{Token: externalSecret.GetToken(),}diff --git a/backend/api/v1/instance_service_test.go b/backend/api/v1/instance_service_test.goindex 845fdadbfd..d22acafcf6 100644--- a/backend/api/v1/instance_service_test.go+++ b/backend/api/v1/instance_service_test.go@@ -5,6 +5,7 @@ import ("github.com/stretchr/testify/require"+ "github.com/bytebase/bytebase/backend/component/config"storepb "github.com/bytebase/bytebase/backend/generated-go/store")@@ -15,3 +16,59 @@ func TestValidateExtraConnectionParametersRejectsTiDBAllowAllFiles(t *testing.T)require.Error(t, err)require.Contains(t, err.Error(), "allowAllFiles")}++func TestValidateExternalSecretForSaaS(t *testing.T) {+ tokenSecret := func(tokenType storepb.DataSourceExternalSecret_TokenType) *storepb.DataSource {+ return &storepb.DataSource{+ ExternalSecret: &storepb.DataSourceExternalSecret{+ AuthType: storepb.DataSourceExternalSecret_TOKEN,+ TokenType: tokenType,+ AuthOption: &storepb.DataSourceExternalSecret_Token{Token: "x"},+ },+ }+ }+ appRoleSecret := func(secretType storepb.DataSourceExternalSecret_AppRoleAuthOption_SecretType) *storepb.DataSource {+ return &storepb.DataSource{+ ExternalSecret: &storepb.DataSourceExternalSecret{+ AuthType: storepb.DataSourceExternalSecret_VAULT_APP_ROLE,+ AuthOption: &storepb.DataSourceExternalSecret_AppRole{+ AppRole: &storepb.DataSourceExternalSecret_AppRoleAuthOption{+ RoleId: "r",+ SecretId: "s",+ Type: secretType,+ },+ },+ },+ }+ }++ testCases := []struct {+ name string+ saas bool+ dataSource *storepb.DataSource+ wantErr bool+ }{+ {name: "non-saas allows file", saas: false, dataSource: tokenSecret(storepb.DataSourceExternalSecret_FILE), wantErr: false},+ {name: "non-saas allows env", saas: false, dataSource: tokenSecret(storepb.DataSourceExternalSecret_ENVIRONMENT), wantErr: false},+ {name: "saas allows plain", saas: true, dataSource: tokenSecret(storepb.DataSourceExternalSecret_PLAIN), wantErr: false},+ {name: "saas allows unspecified", saas: true, dataSource: tokenSecret(storepb.DataSourceExternalSecret_TOKEN_TYPE_UNSPECIFIED), wantErr: false},+ {name: "saas blocks file", saas: true, dataSource: tokenSecret(storepb.DataSourceExternalSecret_FILE), wantErr: true},+ {name: "saas blocks env", saas: true, dataSource: tokenSecret(storepb.DataSourceExternalSecret_ENVIRONMENT), wantErr: true},+ {name: "non-saas allows approle env", saas: false, dataSource: appRoleSecret(storepb.DataSourceExternalSecret_AppRoleAuthOption_ENVIRONMENT), wantErr: false},+ {name: "saas allows approle plain", saas: true, dataSource: appRoleSecret(storepb.DataSourceExternalSecret_AppRoleAuthOption_PLAIN), wantErr: false},+ {name: "saas blocks approle env", saas: true, dataSource: appRoleSecret(storepb.DataSourceExternalSecret_AppRoleAuthOption_ENVIRONMENT), wantErr: true},+ {name: "saas ignores no external secret", saas: true, dataSource: &storepb.DataSource{}, wantErr: false},+ }++ for _, tc := range testCases {+ t.Run(tc.name, func(t *testing.T) {+ s := &InstanceService{profile: &config.Profile{SaaS: tc.saas}}+ err := s.validateExternalSecretForSaaS(tc.dataSource)+ if tc.wantErr {+ require.Error(t, err)+ } else {+ require.NoError(t, err)+ }+ })+ }+}diff --git a/backend/component/secret/vault.go b/backend/component/secret/vault.goindex 4cfcba7739..81d2f9284a 100644--- a/backend/component/secret/vault.go+++ b/backend/component/secret/vault.go@@ -5,6 +5,8 @@ import ("crypto/tls""crypto/x509""net/http"+ "os"+ "strings""github.com/pkg/errors"@@ -57,7 +59,11 @@ func getVaultClient(ctx context.Context, externalSecret *storepb.DataSourceExterswitch externalSecret.AuthType {case storepb.DataSourceExternalSecret_TOKEN:- token = externalSecret.GetToken()+ t, err := resolveVaultToken(externalSecret)+ if err != nil {+ return nil, err+ }+ token = tcase storepb.DataSourceExternalSecret_VAULT_APP_ROLE:role := externalSecret.GetAppRole()if role == nil {@@ -102,6 +108,35 @@ func getVaultClient(ctx context.Context, externalSecret *storepb.DataSourceExterreturn client, nil}+// resolveVaultToken resolves the Vault token from the external secret config.+// The token field is interpreted according to TokenType: the literal token+// (PLAIN), an environment variable name (ENVIRONMENT), or a file path (FILE).+// Both env var and file are resolved on the Bytebase server host.+func resolveVaultToken(externalSecret *storepb.DataSourceExternalSecret) (string, error) {+ value := externalSecret.GetToken()+ switch externalSecret.GetTokenType() {+ case storepb.DataSourceExternalSecret_ENVIRONMENT:+ token := os.Getenv(value)+ if token == "" {+ return "", errors.Errorf("vault token environment variable %q is empty or unset", value)+ }+ return token, nil+ case storepb.DataSourceExternalSecret_FILE:+ b, err := os.ReadFile(value)+ if err != nil {+ return "", errors.Wrapf(err, "failed to read vault token file %q", value)+ }+ token := strings.TrimSpace(string(b))+ if token == "" {+ return "", errors.Errorf("vault token file %q is empty", value)+ }+ return token, nil+ default:+ // PLAIN or unspecified (backward compatibility).+ return value, nil+ }+}+func getSecretFromVault(ctx context.Context, externalSecret *storepb.DataSourceExternalSecret) (string, error) {client, err := getVaultClient(ctx, externalSecret)if err != nil {diff --git a/backend/component/secret/vault_test.go b/backend/component/secret/vault_test.gonew file mode 100644index 0000000000..ad9e57501f--- /dev/null+++ b/backend/component/secret/vault_test.go@@ -0,0 +1,77 @@+package secret++import (+ "os"+ "path/filepath"+ "testing"++ "github.com/stretchr/testify/require"++ storepb "github.com/bytebase/bytebase/backend/generated-go/store"+)++func TestResolveVaultToken(t *testing.T) {+ t.Run("plain", func(t *testing.T) {+ got, err := resolveVaultToken(&storepb.DataSourceExternalSecret{+ AuthOption: &storepb.DataSourceExternalSecret_Token{Token: "plain-token"},+ })+ require.NoError(t, err)+ require.Equal(t, "plain-token", got)+ })++ t.Run("unspecified defaults to plain", func(t *testing.T) {+ got, err := resolveVaultToken(&storepb.DataSourceExternalSecret{+ TokenType: storepb.DataSourceExternalSecret_TOKEN_TYPE_UNSPECIFIED,+ AuthOption: &storepb.DataSourceExternalSecret_Token{Token: "plain-token"},+ })+ require.NoError(t, err)+ require.Equal(t, "plain-token", got)+ })++ t.Run("environment", func(t *testing.T) {+ t.Setenv("BB_TEST_VAULT_TOKEN", "env-token")+ got, err := resolveVaultToken(&storepb.DataSourceExternalSecret{+ TokenType: storepb.DataSourceExternalSecret_ENVIRONMENT,+ AuthOption: &storepb.DataSourceExternalSecret_Token{Token: "BB_TEST_VAULT_TOKEN"},+ })+ require.NoError(t, err)+ require.Equal(t, "env-token", got)+ })++ t.Run("environment unset", func(t *testing.T) {+ _, err := resolveVaultToken(&storepb.DataSourceExternalSecret{+ TokenType: storepb.DataSourceExternalSecret_ENVIRONMENT,+ AuthOption: &storepb.DataSourceExternalSecret_Token{Token: "BB_TEST_VAULT_TOKEN_UNSET"},+ })+ require.Error(t, err)+ })++ t.Run("file", func(t *testing.T) {+ path := filepath.Join(t.TempDir(), "token")+ require.NoError(t, os.WriteFile(path, []byte(" file-token\n"), 0600))+ got, err := resolveVaultToken(&storepb.DataSourceExternalSecret{+ TokenType: storepb.DataSourceExternalSecret_FILE,+ AuthOption: &storepb.DataSourceExternalSecret_Token{Token: path},+ })+ require.NoError(t, err)+ require.Equal(t, "file-token", got)+ })++ t.Run("file missing", func(t *testing.T) {+ _, err := resolveVaultToken(&storepb.DataSourceExternalSecret{+ TokenType: storepb.DataSourceExternalSecret_FILE,+ AuthOption: &storepb.DataSourceExternalSecret_Token{Token: filepath.Join(t.TempDir(), "nope")},+ })+ require.Error(t, err)+ })++ t.Run("file empty", func(t *testing.T) {+ path := filepath.Join(t.TempDir(), "empty")+ require.NoError(t, os.WriteFile(path, []byte(" \n"), 0600))+ _, err := resolveVaultToken(&storepb.DataSourceExternalSecret{+ TokenType: storepb.DataSourceExternalSecret_FILE,+ AuthOption: &storepb.DataSourceExternalSecret_Token{Token: path},+ })+ require.Error(t, err)+ })+}diff --git a/backend/generated-go/store/instance.pb.go b/backend/generated-go/store/instance.pb.goindex dd882a6988..2b63e68abe 100644--- a/backend/generated-go/store/instance.pb.go+++ b/backend/generated-go/store/instance.pb.go@@ -289,6 +289,63 @@ func (DataSourceExternalSecret_AuthType) EnumDescriptor() ([]byte, []int) {return file_store_instance_proto_rawDescGZIP(), []int{5, 1}}+type DataSourceExternalSecret_TokenType int32++const (+ DataSourceExternalSecret_TOKEN_TYPE_UNSPECIFIED DataSourceExternalSecret_TokenType = 0+ // The token field holds the literal token value.+ DataSourceExternalSecret_PLAIN DataSourceExternalSecret_TokenType = 1+ // The token field holds the name of an environment variable on the+ // Bytebase server that holds the token value.+ DataSourceExternalSecret_ENVIRONMENT DataSourceExternalSecret_TokenType = 2+ // The token field holds a path to a file on the Bytebase server that+ // holds the token value.+ DataSourceExternalSecret_FILE DataSourceExternalSecret_TokenType = 3+)++// Enum value maps for DataSourceExternalSecret_TokenType.+var (+ DataSourceExternalSecret_TokenType_name = map[int32]string{+ 0: "TOKEN_TYPE_UNSPECIFIED",+ 1: "PLAIN",+ 2: "ENVIRONMENT",+ 3: "FILE",+ }+ DataSourceExternalSecret_TokenType_value = map[string]int32{+ "TOKEN_TYPE_UNSPECIFIED": 0,+ "PLAIN": 1,+ "ENVIRONMENT": 2,+ "FILE": 3,+ }+)++func (x DataSourceExternalSecret_TokenType) Enum() *DataSourceExternalSecret_TokenType {+ p := new(DataSourceExternalSecret_TokenType)+ *p = x+ return p+}++func (x DataSourceExternalSecret_TokenType) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (DataSourceExternalSecret_TokenType) Descriptor() protoreflect.EnumDescriptor {+ return file_store_instance_proto_enumTypes[5].Descriptor()+}++func (DataSourceExternalSecret_TokenType) Type() protoreflect.EnumType {+ return &file_store_instance_proto_enumTypes[5]+}++func (x DataSourceExternalSecret_TokenType) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use DataSourceExternalSecret_TokenType.Descriptor instead.+func (DataSourceExternalSecret_TokenType) EnumDescriptor() ([]byte, []int) {+ return file_store_instance_proto_rawDescGZIP(), []int{5, 2}+}+type DataSourceExternalSecret_AppRoleAuthOption_SecretType int32const (@@ -322,11 +379,11 @@ func (x DataSourceExternalSecret_AppRoleAuthOption_SecretType) String() string {}func (DataSourceExternalSecret_AppRoleAuthOption_SecretType) Descriptor() protoreflect.EnumDescriptor {- return file_store_instance_proto_enumTypes[5].Descriptor()+ return file_store_instance_proto_enumTypes[6].Descriptor()}func (DataSourceExternalSecret_AppRoleAuthOption_SecretType) Type() protoreflect.EnumType {- return &file_store_instance_proto_enumTypes[5]+ return &file_store_instance_proto_enumTypes[6]}func (x DataSourceExternalSecret_AppRoleAuthOption_SecretType) Number() protoreflect.EnumNumber {@@ -1264,6 +1321,8 @@ type DataSourceExternalSecret struct {// *DataSourceExternalSecret_AppRole// *DataSourceExternalSecret_TokenAuthOption isDataSourceExternalSecret_AuthOption `protobuf_oneof:"auth_option"`+ // How to interpret the token field when auth_type is TOKEN.+ TokenType DataSourceExternalSecret_TokenType `protobuf:"varint,16,opt,name=token_type,json=tokenType,proto3,enum=bytebase.store.DataSourceExternalSecret_TokenType" json:"token_type,omitempty"`// engine name is the name for secret engine.EngineName string `protobuf:"bytes,6,opt,name=engine_name,json=engineName,proto3" json:"engine_name,omitempty"`// the secret name in the engine to store the password.@@ -1365,6 +1424,13 @@ func (x *DataSourceExternalSecret) GetToken() string {return ""}+func (x *DataSourceExternalSecret) GetTokenType() DataSourceExternalSecret_TokenType {+ if x != nil {+ return x.TokenType+ }+ return DataSourceExternalSecret_TOKEN_TYPE_UNSPECIFIED+}+func (x *DataSourceExternalSecret) GetEngineName() string {if x != nil {return x.EngineName@@ -1943,14 +2009,16 @@ const file_store_instance_proto_rawDesc = "" +"\x06keytab\x18\x04 \x01(\fR\x06keytab\x12\x19\n" +"\bkdc_host\x18\x05 \x01(\tR\akdcHost\x12\x19\n" +"\bkdc_port\x18\x06 \x01(\tR\akdcPort\x124\n" +- "\x16kdc_transport_protocol\x18\a \x01(\tR\x14kdcTransportProtocol\"\xec\t\n" ++ "\x16kdc_transport_protocol\x18\a \x01(\tR\x14kdcTransportProtocol\"\x8e\v\n" +"\x18DataSourceExternalSecret\x12T\n" +"\vsecret_type\x18\x01 \x01(\x0e23.bytebase.store.DataSourceExternalSecret.SecretTypeR\n" +"secretType\x12\x10\n" +"\x03url\x18\x02 \x01(\tR\x03url\x12N\n" +"\tauth_type\x18\x03 \x01(\x0e21.bytebase.store.DataSourceExternalSecret.AuthTypeR\bauthType\x12W\n" +"\bapp_role\x18\x04 \x01(\v2:.bytebase.store.DataSourceExternalSecret.AppRoleAuthOptionH\x00R\aappRole\x12\x16\n" +- "\x05token\x18\x05 \x01(\tH\x00R\x05token\x12\x1f\n" ++ "\x05token\x18\x05 \x01(\tH\x00R\x05token\x12Q\n" ++ "\n" ++ "token_type\x18\x10 \x01(\x0e22.bytebase.store.DataSourceExternalSecret.TokenTypeR\ttokenType\x12\x1f\n" +"\vengine_name\x18\x06 \x01(\tR\n" +"engineName\x12\x1f\n" +"\vsecret_name\x18\a \x01(\tR\n" +@@ -1986,7 +2054,12 @@ const file_store_instance_proto_rawDesc = "" +"\bAuthType\x12\x19\n" +"\x15AUTH_TYPE_UNSPECIFIED\x10\x00\x12\t\n" +"\x05TOKEN\x10\x01\x12\x12\n" +- "\x0eVAULT_APP_ROLE\x10\x02B\r\n" ++ "\x0eVAULT_APP_ROLE\x10\x02\"M\n" ++ "\tTokenType\x12\x1a\n" ++ "\x16TOKEN_TYPE_UNSPECIFIED\x10\x00\x12\t\n" ++ "\x05PLAIN\x10\x01\x12\x0f\n" ++ "\vENVIRONMENT\x10\x02\x12\b\n" ++ "\x04FILE\x10\x03B\r\n" +"\vauth_option*G\n" +"\x0eDataSourceType\x12\x1b\n" +"\x17DATA_SOURCE_UNSPECIFIED\x10\x00\x12\t\n" +@@ -2006,7 +2079,7 @@ func file_store_instance_proto_rawDescGZIP() []byte {return file_store_instance_proto_rawDescData}-var file_store_instance_proto_enumTypes = make([]protoimpl.EnumInfo, 6)+var file_store_instance_proto_enumTypes = make([]protoimpl.EnumInfo, 7)var file_store_instance_proto_msgTypes = make([]protoimpl.MessageInfo, 13)var file_store_instance_proto_goTypes = []any{(DataSourceType)(0), // 0: bytebase.store.DataSourceType@@ -2014,51 +2087,53 @@ var file_store_instance_proto_goTypes = []any{(DataSource_RedisType)(0), // 2: bytebase.store.DataSource.RedisType(DataSourceExternalSecret_SecretType)(0), // 3: bytebase.store.DataSourceExternalSecret.SecretType(DataSourceExternalSecret_AuthType)(0), // 4: bytebase.store.DataSourceExternalSecret.AuthType- (DataSourceExternalSecret_AppRoleAuthOption_SecretType)(0), // 5: bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.SecretType- (*Instance)(nil), // 6: bytebase.store.Instance- (*InstanceRole)(nil), // 7: bytebase.store.InstanceRole- (*DataSource)(nil), // 8: bytebase.store.DataSource- (*SASLConfig)(nil), // 9: bytebase.store.SASLConfig- (*KerberosConfig)(nil), // 10: bytebase.store.KerberosConfig- (*DataSourceExternalSecret)(nil), // 11: bytebase.store.DataSourceExternalSecret- nil, // 12: bytebase.store.Instance.LabelsEntry- (*DataSource_AzureCredential)(nil), // 13: bytebase.store.DataSource.AzureCredential- (*DataSource_AWSCredential)(nil), // 14: bytebase.store.DataSource.AWSCredential- (*DataSource_GCPCredential)(nil), // 15: bytebase.store.DataSource.GCPCredential- (*DataSource_Address)(nil), // 16: bytebase.store.DataSource.Address- nil, // 17: bytebase.store.DataSource.ExtraConnectionParametersEntry- (*DataSourceExternalSecret_AppRoleAuthOption)(nil), // 18: bytebase.store.DataSourceExternalSecret.AppRoleAuthOption- (Engine)(0), // 19: bytebase.store.Engine- (*durationpb.Duration)(nil), // 20: google.protobuf.Duration- (*timestamppb.Timestamp)(nil), // 21: google.protobuf.Timestamp+ (DataSourceExternalSecret_TokenType)(0), // 5: bytebase.store.DataSourceExternalSecret.TokenType+ (DataSourceExternalSecret_AppRoleAuthOption_SecretType)(0), // 6: bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.SecretType+ (*Instance)(nil), // 7: bytebase.store.Instance+ (*InstanceRole)(nil), // 8: bytebase.store.InstanceRole+ (*DataSource)(nil), // 9: bytebase.store.DataSource+ (*SASLConfig)(nil), // 10: bytebase.store.SASLConfig+ (*KerberosConfig)(nil), // 11: bytebase.store.KerberosConfig+ (*DataSourceExternalSecret)(nil), // 12: bytebase.store.DataSourceExternalSecret+ nil, // 13: bytebase.store.Instance.LabelsEntry+ (*DataSource_AzureCredential)(nil), // 14: bytebase.store.DataSource.AzureCredential+ (*DataSource_AWSCredential)(nil), // 15: bytebase.store.DataSource.AWSCredential+ (*DataSource_GCPCredential)(nil), // 16: bytebase.store.DataSource.GCPCredential+ (*DataSource_Address)(nil), // 17: bytebase.store.DataSource.Address+ nil, // 18: bytebase.store.DataSource.ExtraConnectionParametersEntry+ (*DataSourceExternalSecret_AppRoleAuthOption)(nil), // 19: bytebase.store.DataSourceExternalSecret.AppRoleAuthOption+ (Engine)(0), // 20: bytebase.store.Engine+ (*durationpb.Duration)(nil), // 21: google.protobuf.Duration+ (*timestamppb.Timestamp)(nil), // 22: google.protobuf.Timestamp}var file_store_instance_proto_depIdxs = []int32{- 19, // 0: bytebase.store.Instance.engine:type_name -> bytebase.store.Engine- 8, // 1: bytebase.store.Instance.data_sources:type_name -> bytebase.store.DataSource- 20, // 2: bytebase.store.Instance.sync_interval:type_name -> google.protobuf.Duration- 21, // 3: bytebase.store.Instance.last_sync_time:type_name -> google.protobuf.Timestamp- 7, // 4: bytebase.store.Instance.roles:type_name -> bytebase.store.InstanceRole- 12, // 5: bytebase.store.Instance.labels:type_name -> bytebase.store.Instance.LabelsEntry+ 20, // 0: bytebase.store.Instance.engine:type_name -> bytebase.store.Engine+ 9, // 1: bytebase.store.Instance.data_sources:type_name -> bytebase.store.DataSource+ 21, // 2: bytebase.store.Instance.sync_interval:type_name -> google.protobuf.Duration+ 22, // 3: bytebase.store.Instance.last_sync_time:type_name -> google.protobuf.Timestamp+ 8, // 4: bytebase.store.Instance.roles:type_name -> bytebase.store.InstanceRole+ 13, // 5: bytebase.store.Instance.labels:type_name -> bytebase.store.Instance.LabelsEntry0, // 6: bytebase.store.DataSource.type:type_name -> bytebase.store.DataSourceType- 11, // 7: bytebase.store.DataSource.external_secret:type_name -> bytebase.store.DataSourceExternalSecret+ 12, // 7: bytebase.store.DataSource.external_secret:type_name -> bytebase.store.DataSourceExternalSecret1, // 8: bytebase.store.DataSource.authentication_type:type_name -> bytebase.store.DataSource.AuthenticationType- 13, // 9: bytebase.store.DataSource.azure_credential:type_name -> bytebase.store.DataSource.AzureCredential- 14, // 10: bytebase.store.DataSource.aws_credential:type_name -> bytebase.store.DataSource.AWSCredential- 15, // 11: bytebase.store.DataSource.gcp_credential:type_name -> bytebase.store.DataSource.GCPCredential- 9, // 12: bytebase.store.DataSource.sasl_config:type_name -> bytebase.store.SASLConfig- 16, // 13: bytebase.store.DataSource.additional_addresses:type_name -> bytebase.store.DataSource.Address+ 14, // 9: bytebase.store.DataSource.azure_credential:type_name -> bytebase.store.DataSource.AzureCredential+ 15, // 10: bytebase.store.DataSource.aws_credential:type_name -> bytebase.store.DataSource.AWSCredential+ 16, // 11: bytebase.store.DataSource.gcp_credential:type_name -> bytebase.store.DataSource.GCPCredential+ 10, // 12: bytebase.store.DataSource.sasl_config:type_name -> bytebase.store.SASLConfig+ 17, // 13: bytebase.store.DataSource.additional_addresses:type_name -> bytebase.store.DataSource.Address2, // 14: bytebase.store.DataSource.redis_type:type_name -> bytebase.store.DataSource.RedisType- 17, // 15: bytebase.store.DataSource.extra_connection_parameters:type_name -> bytebase.store.DataSource.ExtraConnectionParametersEntry- 10, // 16: bytebase.store.SASLConfig.krb_config:type_name -> bytebase.store.KerberosConfig+ 18, // 15: bytebase.store.DataSource.extra_connection_parameters:type_name -> bytebase.store.DataSource.ExtraConnectionParametersEntry+ 11, // 16: bytebase.store.SASLConfig.krb_config:type_name -> bytebase.store.KerberosConfig3, // 17: bytebase.store.DataSourceExternalSecret.secret_type:type_name -> bytebase.store.DataSourceExternalSecret.SecretType4, // 18: bytebase.store.DataSourceExternalSecret.auth_type:type_name -> bytebase.store.DataSourceExternalSecret.AuthType- 18, // 19: bytebase.store.DataSourceExternalSecret.app_role:type_name -> bytebase.store.DataSourceExternalSecret.AppRoleAuthOption- 5, // 20: bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.type:type_name -> bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.SecretType- 21, // [21:21] is the sub-list for method output_type- 21, // [21:21] is the sub-list for method input_type- 21, // [21:21] is the sub-list for extension type_name- 21, // [21:21] is the sub-list for extension extendee- 0, // [0:21] is the sub-list for field type_name+ 19, // 19: bytebase.store.DataSourceExternalSecret.app_role:type_name -> bytebase.store.DataSourceExternalSecret.AppRoleAuthOption+ 5, // 20: bytebase.store.DataSourceExternalSecret.token_type:type_name -> bytebase.store.DataSourceExternalSecret.TokenType+ 6, // 21: bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.type:type_name -> bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.SecretType+ 22, // [22:22] is the sub-list for method output_type+ 22, // [22:22] is the sub-list for method input_type+ 22, // [22:22] is the sub-list for extension type_name+ 22, // [22:22] is the sub-list for extension extendee+ 0, // [0:22] is the sub-list for field type_name}func init() { file_store_instance_proto_init() }@@ -2085,7 +2160,7 @@ func file_store_instance_proto_init() {File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_instance_proto_rawDesc), len(file_store_instance_proto_rawDesc)),- NumEnums: 6,+ NumEnums: 7,NumMessages: 13,NumExtensions: 0,NumServices: 0,diff --git a/backend/generated-go/store/instance_equal.pb.go b/backend/generated-go/store/instance_equal.pb.goindex c9412d5922..8700905ccc 100644--- a/backend/generated-go/store/instance_equal.pb.go+++ b/backend/generated-go/store/instance_equal.pb.go@@ -460,6 +460,9 @@ func (x *DataSourceExternalSecret) Equal(y *DataSourceExternalSecret) bool {if x.GetToken() != y.GetToken() {return false}+ if x.TokenType != y.TokenType {+ return false+ }if x.EngineName != y.EngineName {return false}diff --git a/backend/generated-go/v1/instance_service.pb.go b/backend/generated-go/v1/instance_service.pb.goindex 37ef81b9a1..ae0d3d5104 100644--- a/backend/generated-go/v1/instance_service.pb.go+++ b/backend/generated-go/v1/instance_service.pb.go@@ -191,6 +191,64 @@ func (DataSourceExternalSecret_AuthType) EnumDescriptor() ([]byte, []int) {return file_v1_instance_service_proto_rawDescGZIP(), []int{19, 1}}+type DataSourceExternalSecret_TokenType int32++const (+ // Unspecified token type, treated as PLAIN for backward compatibility.+ DataSourceExternalSecret_TOKEN_TYPE_UNSPECIFIED DataSourceExternalSecret_TokenType = 0+ // The token field holds the literal token value.+ DataSourceExternalSecret_PLAIN DataSourceExternalSecret_TokenType = 1+ // The token field holds the name of an environment variable on the+ // Bytebase server that holds the token value.+ DataSourceExternalSecret_ENVIRONMENT DataSourceExternalSecret_TokenType = 2+ // The token field holds a path to a file on the Bytebase server that+ // holds the token value.+ DataSourceExternalSecret_FILE DataSourceExternalSecret_TokenType = 3+)++// Enum value maps for DataSourceExternalSecret_TokenType.+var (+ DataSourceExternalSecret_TokenType_name = map[int32]string{+ 0: "TOKEN_TYPE_UNSPECIFIED",+ 1: "PLAIN",+ 2: "ENVIRONMENT",+ 3: "FILE",+ }+ DataSourceExternalSecret_TokenType_value = map[string]int32{+ "TOKEN_TYPE_UNSPECIFIED": 0,+ "PLAIN": 1,+ "ENVIRONMENT": 2,+ "FILE": 3,+ }+)++func (x DataSourceExternalSecret_TokenType) Enum() *DataSourceExternalSecret_TokenType {+ p := new(DataSourceExternalSecret_TokenType)+ *p = x+ return p+}++func (x DataSourceExternalSecret_TokenType) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (DataSourceExternalSecret_TokenType) Descriptor() protoreflect.EnumDescriptor {+ return file_v1_instance_service_proto_enumTypes[3].Descriptor()+}++func (DataSourceExternalSecret_TokenType) Type() protoreflect.EnumType {+ return &file_v1_instance_service_proto_enumTypes[3]+}++func (x DataSourceExternalSecret_TokenType) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use DataSourceExternalSecret_TokenType.Descriptor instead.+func (DataSourceExternalSecret_TokenType) EnumDescriptor() ([]byte, []int) {+ return file_v1_instance_service_proto_rawDescGZIP(), []int{19, 2}+}+type DataSourceExternalSecret_AppRoleAuthOption_SecretType int32const (@@ -227,11 +285,11 @@ func (x DataSourceExternalSecret_AppRoleAuthOption_SecretType) String() string {}func (DataSourceExternalSecret_AppRoleAuthOption_SecretType) Descriptor() protoreflect.EnumDescriptor {- return file_v1_instance_service_proto_enumTypes[3].Descriptor()+ return file_v1_instance_service_proto_enumTypes[4].Descriptor()}func (DataSourceExternalSecret_AppRoleAuthOption_SecretType) Type() protoreflect.EnumType {- return &file_v1_instance_service_proto_enumTypes[3]+ return &file_v1_instance_service_proto_enumTypes[4]}func (x DataSourceExternalSecret_AppRoleAuthOption_SecretType) Number() protoreflect.EnumNumber {@@ -282,11 +340,11 @@ func (x DataSource_AuthenticationType) String() string {}func (DataSource_AuthenticationType) Descriptor() protoreflect.EnumDescriptor {- return file_v1_instance_service_proto_enumTypes[4].Descriptor()+ return file_v1_instance_service_proto_enumTypes[5].Descriptor()}func (DataSource_AuthenticationType) Type() protoreflect.EnumType {- return &file_v1_instance_service_proto_enumTypes[4]+ return &file_v1_instance_service_proto_enumTypes[5]}func (x DataSource_AuthenticationType) Number() protoreflect.EnumNumber {@@ -334,11 +392,11 @@ func (x DataSource_RedisType) String() string {}func (DataSource_RedisType) Descriptor() protoreflect.EnumDescriptor {- return file_v1_instance_service_proto_enumTypes[5].Descriptor()+ return file_v1_instance_service_proto_enumTypes[6].Descriptor()}func (DataSource_RedisType) Type() protoreflect.EnumType {- return &file_v1_instance_service_proto_enumTypes[5]+ return &file_v1_instance_service_proto_enumTypes[6]}func (x DataSource_RedisType) Number() protoreflect.EnumNumber {@@ -1580,6 +1638,8 @@ type DataSourceExternalSecret struct {// *DataSourceExternalSecret_AppRole// *DataSourceExternalSecret_TokenAuthOption isDataSourceExternalSecret_AuthOption `protobuf_oneof:"auth_option"`+ // How to interpret the token field when auth_type is TOKEN.+ TokenType DataSourceExternalSecret_TokenType `protobuf:"varint,13,opt,name=token_type,json=tokenType,proto3,enum=bytebase.v1.DataSourceExternalSecret_TokenType" json:"token_type,omitempty"`// engine name is the name for secret engine.EngineName string `protobuf:"bytes,6,opt,name=engine_name,json=engineName,proto3" json:"engine_name,omitempty"`// the secret name in the engine to store the password.@@ -1678,6 +1738,13 @@ func (x *DataSourceExternalSecret) GetToken() string {return ""}+func (x *DataSourceExternalSecret) GetTokenType() DataSourceExternalSecret_TokenType {+ if x != nil {+ return x.TokenType+ }+ return DataSourceExternalSecret_TOKEN_TYPE_UNSPECIFIED+}+func (x *DataSourceExternalSecret) GetEngineName() string {if x != nil {return x.EngineName@@ -1737,7 +1804,9 @@ type DataSourceExternalSecret_AppRole struct {}type DataSourceExternalSecret_Token struct {- // Token for direct authentication.+ // Token for direct authentication. Interpreted according to token_type:+ // the literal token (PLAIN), an environment variable name (ENVIRONMENT),+ // or a file path (FILE).Token string `protobuf:"bytes,5,opt,name=token,proto3,oneof"`}@@ -2935,14 +3004,16 @@ const file_v1_instance_service_proto_rawDesc = "" +"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01:0\xeaA-\n" +"\x15bytebase.com/Instance\x12\x14instances/{instance}B\x0e\n" +- "\f_environment\"\xd3\b\n" ++ "\f_environment\"\xf2\t\n" +"\x18DataSourceExternalSecret\x12Q\n" +"\vsecret_type\x18\x01 \x01(\x0e20.bytebase.v1.DataSourceExternalSecret.SecretTypeR\n" +"secretType\x12\x10\n" +"\x03url\x18\x02 \x01(\tR\x03url\x12K\n" +"\tauth_type\x18\x03 \x01(\x0e2..bytebase.v1.DataSourceExternalSecret.AuthTypeR\bauthType\x12T\n" +"\bapp_role\x18\x04 \x01(\v27.bytebase.v1.DataSourceExternalSecret.AppRoleAuthOptionH\x00R\aappRole\x12\x1b\n" +- "\x05token\x18\x05 \x01(\tB\x03\xe0A\x04H\x00R\x05token\x12\x1f\n" ++ "\x05token\x18\x05 \x01(\tB\x03\xe0A\x04H\x00R\x05token\x12N\n" ++ "\n" ++ "token_type\x18\r \x01(\x0e2/.bytebase.v1.DataSourceExternalSecret.TokenTypeR\ttokenType\x12\x1f\n" +"\vengine_name\x18\x06 \x01(\tR\n" +"engineName\x12\x1f\n" +"\vsecret_name\x18\a \x01(\tR\n" +@@ -2975,7 +3046,12 @@ const file_v1_instance_service_proto_rawDesc = "" +"\bAuthType\x12\x19\n" +"\x15AUTH_TYPE_UNSPECIFIED\x10\x00\x12\t\n" +"\x05TOKEN\x10\x01\x12\x12\n" +- "\x0eVAULT_APP_ROLE\x10\x02B\r\n" ++ "\x0eVAULT_APP_ROLE\x10\x02\"M\n" ++ "\tTokenType\x12\x1a\n" ++ "\x16TOKEN_TYPE_UNSPECIFIED\x10\x00\x12\t\n" ++ "\x05PLAIN\x10\x01\x12\x0f\n" ++ "\vENVIRONMENT\x10\x02\x12\b\n" ++ "\x04FILE\x10\x03B\r\n" +"\vauth_option\"\x93\x17\n" +"\n" +"DataSource\x12\x0e\n" +@@ -3124,122 +3200,124 @@ func file_v1_instance_service_proto_rawDescGZIP() []byte {return file_v1_instance_service_proto_rawDescData}-var file_v1_instance_service_proto_enumTypes = make([]protoimpl.EnumInfo, 6)+var file_v1_instance_service_proto_enumTypes = make([]protoimpl.EnumInfo, 7)var file_v1_instance_service_proto_msgTypes = make([]protoimpl.MessageInfo, 31)var file_v1_instance_service_proto_goTypes = []any{(DataSourceType)(0), // 0: bytebase.v1.DataSourceType(DataSourceExternalSecret_SecretType)(0), // 1: bytebase.v1.DataSourceExternalSecret.SecretType(DataSourceExternalSecret_AuthType)(0), // 2: bytebase.v1.DataSourceExternalSecret.AuthType- (DataSourceExternalSecret_AppRoleAuthOption_SecretType)(0), // 3: bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType- (DataSource_AuthenticationType)(0), // 4: bytebase.v1.DataSource.AuthenticationType- (DataSource_RedisType)(0), // 5: bytebase.v1.DataSource.RedisType- (*GetInstanceRequest)(nil), // 6: bytebase.v1.GetInstanceRequest- (*ListInstancesRequest)(nil), // 7: bytebase.v1.ListInstancesRequest- (*ListInstancesResponse)(nil), // 8: bytebase.v1.ListInstancesResponse- (*CreateInstanceRequest)(nil), // 9: bytebase.v1.CreateInstanceRequest- (*UpdateInstanceRequest)(nil), // 10: bytebase.v1.UpdateInstanceRequest- (*DeleteInstanceRequest)(nil), // 11: bytebase.v1.DeleteInstanceRequest- (*UndeleteInstanceRequest)(nil), // 12: bytebase.v1.UndeleteInstanceRequest- (*SyncInstanceRequest)(nil), // 13: bytebase.v1.SyncInstanceRequest- (*ListInstanceDatabaseRequest)(nil), // 14: bytebase.v1.ListInstanceDatabaseRequest- (*ListInstanceDatabaseResponse)(nil), // 15: bytebase.v1.ListInstanceDatabaseResponse- (*SyncInstanceResponse)(nil), // 16: bytebase.v1.SyncInstanceResponse- (*BatchSyncInstancesRequest)(nil), // 17: bytebase.v1.BatchSyncInstancesRequest- (*BatchSyncInstancesResponse)(nil), // 18: bytebase.v1.BatchSyncInstancesResponse- (*BatchUpdateInstancesRequest)(nil), // 19: bytebase.v1.BatchUpdateInstancesRequest- (*BatchUpdateInstancesResponse)(nil), // 20: bytebase.v1.BatchUpdateInstancesResponse- (*AddDataSourceRequest)(nil), // 21: bytebase.v1.AddDataSourceRequest- (*RemoveDataSourceRequest)(nil), // 22: bytebase.v1.RemoveDataSourceRequest- (*UpdateDataSourceRequest)(nil), // 23: bytebase.v1.UpdateDataSourceRequest- (*Instance)(nil), // 24: bytebase.v1.Instance- (*DataSourceExternalSecret)(nil), // 25: bytebase.v1.DataSourceExternalSecret- (*DataSource)(nil), // 26: bytebase.v1.DataSource- (*InstanceResource)(nil), // 27: bytebase.v1.InstanceResource- (*SASLConfig)(nil), // 28: bytebase.v1.SASLConfig- (*KerberosConfig)(nil), // 29: bytebase.v1.KerberosConfig- nil, // 30: bytebase.v1.Instance.LabelsEntry- (*DataSourceExternalSecret_AppRoleAuthOption)(nil), // 31: bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption- (*DataSource_AzureCredential)(nil), // 32: bytebase.v1.DataSource.AzureCredential- (*DataSource_AWSCredential)(nil), // 33: bytebase.v1.DataSource.AWSCredential- (*DataSource_GCPCredential)(nil), // 34: bytebase.v1.DataSource.GCPCredential- (*DataSource_Address)(nil), // 35: bytebase.v1.DataSource.Address- nil, // 36: bytebase.v1.DataSource.ExtraConnectionParametersEntry- (*fieldmaskpb.FieldMask)(nil), // 37: google.protobuf.FieldMask- (State)(0), // 38: bytebase.v1.State- (Engine)(0), // 39: bytebase.v1.Engine- (*InstanceRole)(nil), // 40: bytebase.v1.InstanceRole- (*durationpb.Duration)(nil), // 41: google.protobuf.Duration- (*timestamppb.Timestamp)(nil), // 42: google.protobuf.Timestamp- (*emptypb.Empty)(nil), // 43: google.protobuf.Empty+ (DataSourceExternalSecret_TokenType)(0), // 3: bytebase.v1.DataSourceExternalSecret.TokenType+ (DataSourceExternalSecret_AppRoleAuthOption_SecretType)(0), // 4: bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType+ (DataSource_AuthenticationType)(0), // 5: bytebase.v1.DataSource.AuthenticationType+ (DataSource_RedisType)(0), // 6: bytebase.v1.DataSource.RedisType+ (*GetInstanceRequest)(nil), // 7: bytebase.v1.GetInstanceRequest+ (*ListInstancesRequest)(nil), // 8: bytebase.v1.ListInstancesRequest+ (*ListInstancesResponse)(nil), // 9: bytebase.v1.ListInstancesResponse+ (*CreateInstanceRequest)(nil), // 10: bytebase.v1.CreateInstanceRequest+ (*UpdateInstanceRequest)(nil), // 11: bytebase.v1.UpdateInstanceRequest+ (*DeleteInstanceRequest)(nil), // 12: bytebase.v1.DeleteInstanceRequest+ (*UndeleteInstanceRequest)(nil), // 13: bytebase.v1.UndeleteInstanceRequest+ (*SyncInstanceRequest)(nil), // 14: bytebase.v1.SyncInstanceRequest+ (*ListInstanceDatabaseRequest)(nil), // 15: bytebase.v1.ListInstanceDatabaseRequest+ (*ListInstanceDatabaseResponse)(nil), // 16: bytebase.v1.ListInstanceDatabaseResponse+ (*SyncInstanceResponse)(nil), // 17: bytebase.v1.SyncInstanceResponse+ (*BatchSyncInstancesRequest)(nil), // 18: bytebase.v1.BatchSyncInstancesRequest+ (*BatchSyncInstancesResponse)(nil), // 19: bytebase.v1.BatchSyncInstancesResponse+ (*BatchUpdateInstancesRequest)(nil), // 20: bytebase.v1.BatchUpdateInstancesRequest+ (*BatchUpdateInstancesResponse)(nil), // 21: bytebase.v1.BatchUpdateInstancesResponse+ (*AddDataSourceRequest)(nil), // 22: bytebase.v1.AddDataSourceRequest+ (*RemoveDataSourceRequest)(nil), // 23: bytebase.v1.RemoveDataSourceRequest+ (*UpdateDataSourceRequest)(nil), // 24: bytebase.v1.UpdateDataSourceRequest+ (*Instance)(nil), // 25: bytebase.v1.Instance+ (*DataSourceExternalSecret)(nil), // 26: bytebase.v1.DataSourceExternalSecret+ (*DataSource)(nil), // 27: bytebase.v1.DataSource+ (*InstanceResource)(nil), // 28: bytebase.v1.InstanceResource+ (*SASLConfig)(nil), // 29: bytebase.v1.SASLConfig+ (*KerberosConfig)(nil), // 30: bytebase.v1.KerberosConfig+ nil, // 31: bytebase.v1.Instance.LabelsEntry+ (*DataSourceExternalSecret_AppRoleAuthOption)(nil), // 32: bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption+ (*DataSource_AzureCredential)(nil), // 33: bytebase.v1.DataSource.AzureCredential+ (*DataSource_AWSCredential)(nil), // 34: bytebase.v1.DataSource.AWSCredential+ (*DataSource_GCPCredential)(nil), // 35: bytebase.v1.DataSource.GCPCredential+ (*DataSource_Address)(nil), // 36: bytebase.v1.DataSource.Address+ nil, // 37: bytebase.v1.DataSource.ExtraConnectionParametersEntry+ (*fieldmaskpb.FieldMask)(nil), // 38: google.protobuf.FieldMask+ (State)(0), // 39: bytebase.v1.State+ (Engine)(0), // 40: bytebase.v1.Engine+ (*InstanceRole)(nil), // 41: bytebase.v1.InstanceRole+ (*durationpb.Duration)(nil), // 42: google.protobuf.Duration+ (*timestamppb.Timestamp)(nil), // 43: google.protobuf.Timestamp+ (*emptypb.Empty)(nil), // 44: google.protobuf.Empty}var file_v1_instance_service_proto_depIdxs = []int32{- 24, // 0: bytebase.v1.ListInstancesResponse.instances:type_name -> bytebase.v1.Instance- 24, // 1: bytebase.v1.CreateInstanceRequest.instance:type_name -> bytebase.v1.Instance- 24, // 2: bytebase.v1.UpdateInstanceRequest.instance:type_name -> bytebase.v1.Instance- 37, // 3: bytebase.v1.UpdateInstanceRequest.update_mask:type_name -> google.protobuf.FieldMask- 24, // 4: bytebase.v1.ListInstanceDatabaseRequest.instance:type_name -> bytebase.v1.Instance- 13, // 5: bytebase.v1.BatchSyncInstancesRequest.requests:type_name -> bytebase.v1.SyncInstanceRequest- 10, // 6: bytebase.v1.BatchUpdateInstancesRequest.requests:type_name -> bytebase.v1.UpdateInstanceRequest- 24, // 7: bytebase.v1.BatchUpdateInstancesResponse.instances:type_name -> bytebase.v1.Instance- 26, // 8: bytebase.v1.AddDataSourceRequest.data_source:type_name -> bytebase.v1.DataSource- 26, // 9: bytebase.v1.RemoveDataSourceRequest.data_source:type_name -> bytebase.v1.DataSource- 26, // 10: bytebase.v1.UpdateDataSourceRequest.data_source:type_name -> bytebase.v1.DataSource- 37, // 11: bytebase.v1.UpdateDataSourceRequest.update_mask:type_name -> google.protobuf.FieldMask- 38, // 12: bytebase.v1.Instance.state:type_name -> bytebase.v1.State- 39, // 13: bytebase.v1.Instance.engine:type_name -> bytebase.v1.Engine- 26, // 14: bytebase.v1.Instance.data_sources:type_name -> bytebase.v1.DataSource- 40, // 15: bytebase.v1.Instance.roles:type_name -> bytebase.v1.InstanceRole- 41, // 16: bytebase.v1.Instance.sync_interval:type_name -> google.protobuf.Duration- 42, // 17: bytebase.v1.Instance.last_sync_time:type_name -> google.protobuf.Timestamp- 30, // 18: bytebase.v1.Instance.labels:type_name -> bytebase.v1.Instance.LabelsEntry+ 25, // 0: bytebase.v1.ListInstancesResponse.instances:type_name -> bytebase.v1.Instance+ 25, // 1: bytebase.v1.CreateInstanceRequest.instance:type_name -> bytebase.v1.Instance+ 25, // 2: bytebase.v1.UpdateInstanceRequest.instance:type_name -> bytebase.v1.Instance+ 38, // 3: bytebase.v1.UpdateInstanceRequest.update_mask:type_name -> google.protobuf.FieldMask+ 25, // 4: bytebase.v1.ListInstanceDatabaseRequest.instance:type_name -> bytebase.v1.Instance+ 14, // 5: bytebase.v1.BatchSyncInstancesRequest.requests:type_name -> bytebase.v1.SyncInstanceRequest+ 11, // 6: bytebase.v1.BatchUpdateInstancesRequest.requests:type_name -> bytebase.v1.UpdateInstanceRequest+ 25, // 7: bytebase.v1.BatchUpdateInstancesResponse.instances:type_name -> bytebase.v1.Instance+ 27, // 8: bytebase.v1.AddDataSourceRequest.data_source:type_name -> bytebase.v1.DataSource+ 27, // 9: bytebase.v1.RemoveDataSourceRequest.data_source:type_name -> bytebase.v1.DataSource+ 27, // 10: bytebase.v1.UpdateDataSourceRequest.data_source:type_name -> bytebase.v1.DataSource+ 38, // 11: bytebase.v1.UpdateDataSourceRequest.update_mask:type_name -> google.protobuf.FieldMask+ 39, // 12: bytebase.v1.Instance.state:type_name -> bytebase.v1.State+ 40, // 13: bytebase.v1.Instance.engine:type_name -> bytebase.v1.Engine+ 27, // 14: bytebase.v1.Instance.data_sources:type_name -> bytebase.v1.DataSource+ 41, // 15: bytebase.v1.Instance.roles:type_name -> bytebase.v1.InstanceRole+ 42, // 16: bytebase.v1.Instance.sync_interval:type_name -> google.protobuf.Duration+ 43, // 17: bytebase.v1.Instance.last_sync_time:type_name -> google.protobuf.Timestamp+ 31, // 18: bytebase.v1.Instance.labels:type_name -> bytebase.v1.Instance.LabelsEntry1, // 19: bytebase.v1.DataSourceExternalSecret.secret_type:type_name -> bytebase.v1.DataSourceExternalSecret.SecretType2, // 20: bytebase.v1.DataSourceExternalSecret.auth_type:type_name -> bytebase.v1.DataSourceExternalSecret.AuthType- 31, // 21: bytebase.v1.DataSourceExternalSecret.app_role:type_name -> bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption- 0, // 22: bytebase.v1.DataSource.type:type_name -> bytebase.v1.DataSourceType- 25, // 23: bytebase.v1.DataSource.external_secret:type_name -> bytebase.v1.DataSourceExternalSecret- 4, // 24: bytebase.v1.DataSource.authentication_type:type_name -> bytebase.v1.DataSource.AuthenticationType- 32, // 25: bytebase.v1.DataSource.azure_credential:type_name -> bytebase.v1.DataSource.AzureCredential- 33, // 26: bytebase.v1.DataSource.aws_credential:type_name -> bytebase.v1.DataSource.AWSCredential- 34, // 27: bytebase.v1.DataSource.gcp_credential:type_name -> bytebase.v1.DataSource.GCPCredential- 28, // 28: bytebase.v1.DataSource.sasl_config:type_name -> bytebase.v1.SASLConfig- 35, // 29: bytebase.v1.DataSource.additional_addresses:type_name -> bytebase.v1.DataSource.Address- 5, // 30: bytebase.v1.DataSource.redis_type:type_name -> bytebase.v1.DataSource.RedisType- 36, // 31: bytebase.v1.DataSource.extra_connection_parameters:type_name -> bytebase.v1.DataSource.ExtraConnectionParametersEntry- 39, // 32: bytebase.v1.InstanceResource.engine:type_name -> bytebase.v1.Engine- 26, // 33: bytebase.v1.InstanceResource.data_sources:type_name -> bytebase.v1.DataSource- 29, // 34: bytebase.v1.SASLConfig.krb_config:type_name -> bytebase.v1.KerberosConfig- 3, // 35: bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.type:type_name -> bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType- 6, // 36: bytebase.v1.InstanceService.GetInstance:input_type -> bytebase.v1.GetInstanceRequest- 7, // 37: bytebase.v1.InstanceService.ListInstances:input_type -> bytebase.v1.ListInstancesRequest- 9, // 38: bytebase.v1.InstanceService.CreateInstance:input_type -> bytebase.v1.CreateInstanceRequest- 10, // 39: bytebase.v1.InstanceService.UpdateInstance:input_type -> bytebase.v1.UpdateInstanceRequest- 11, // 40: bytebase.v1.InstanceService.DeleteInstance:input_type -> bytebase.v1.DeleteInstanceRequest- 12, // 41: bytebase.v1.InstanceService.UndeleteInstance:input_type -> bytebase.v1.UndeleteInstanceRequest- 13, // 42: bytebase.v1.InstanceService.SyncInstance:input_type -> bytebase.v1.SyncInstanceRequest- 14, // 43: bytebase.v1.InstanceService.ListInstanceDatabase:input_type -> bytebase.v1.ListInstanceDatabaseRequest- 17, // 44: bytebase.v1.InstanceService.BatchSyncInstances:input_type -> bytebase.v1.BatchSyncInstancesRequest- 19, // 45: bytebase.v1.InstanceService.BatchUpdateInstances:input_type -> bytebase.v1.BatchUpdateInstancesRequest- 21, // 46: bytebase.v1.InstanceService.AddDataSource:input_type -> bytebase.v1.AddDataSourceRequest- 22, // 47: bytebase.v1.InstanceService.RemoveDataSource:input_type -> bytebase.v1.RemoveDataSourceRequest- 23, // 48: bytebase.v1.InstanceService.UpdateDataSource:input_type -> bytebase.v1.UpdateDataSourceRequest- 24, // 49: bytebase.v1.InstanceService.GetInstance:output_type -> bytebase.v1.Instance- 8, // 50: bytebase.v1.InstanceService.ListInstances:output_type -> bytebase.v1.ListInstancesResponse- 24, // 51: bytebase.v1.InstanceService.CreateInstance:output_type -> bytebase.v1.Instance- 24, // 52: bytebase.v1.InstanceService.UpdateInstance:output_type -> bytebase.v1.Instance- 43, // 53: bytebase.v1.InstanceService.DeleteInstance:output_type -> google.protobuf.Empty- 24, // 54: bytebase.v1.InstanceService.UndeleteInstance:output_type -> bytebase.v1.Instance- 16, // 55: bytebase.v1.InstanceService.SyncInstance:output_type -> bytebase.v1.SyncInstanceResponse- 15, // 56: bytebase.v1.InstanceService.ListInstanceDatabase:output_type -> bytebase.v1.ListInstanceDatabaseResponse- 18, // 57: bytebase.v1.InstanceService.BatchSyncInstances:output_type -> bytebase.v1.BatchSyncInstancesResponse- 20, // 58: bytebase.v1.InstanceService.BatchUpdateInstances:output_type -> bytebase.v1.BatchUpdateInstancesResponse- 24, // 59: bytebase.v1.InstanceService.AddDataSource:output_type -> bytebase.v1.Instance- 24, // 60: bytebase.v1.InstanceService.RemoveDataSource:output_type -> bytebase.v1.Instance- 24, // 61: bytebase.v1.InstanceService.UpdateDataSource:output_type -> bytebase.v1.Instance- 49, // [49:62] is the sub-list for method output_type- 36, // [36:49] is the sub-list for method input_type- 36, // [36:36] is the sub-list for extension type_name- 36, // [36:36] is the sub-list for extension extendee- 0, // [0:36] is the sub-list for field type_name+ 32, // 21: bytebase.v1.DataSourceExternalSecret.app_role:type_name -> bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption+ 3, // 22: bytebase.v1.DataSourceExternalSecret.token_type:type_name -> bytebase.v1.DataSourceExternalSecret.TokenType+ 0, // 23: bytebase.v1.DataSource.type:type_name -> bytebase.v1.DataSourceType+ 26, // 24: bytebase.v1.DataSource.external_secret:type_name -> bytebase.v1.DataSourceExternalSecret+ 5, // 25: bytebase.v1.DataSource.authentication_type:type_name -> bytebase.v1.DataSource.AuthenticationType+ 33, // 26: bytebase.v1.DataSource.azure_credential:type_name -> bytebase.v1.DataSource.AzureCredential+ 34, // 27: bytebase.v1.DataSource.aws_credential:type_name -> bytebase.v1.DataSource.AWSCredential+ 35, // 28: bytebase.v1.DataSource.gcp_credential:type_name -> bytebase.v1.DataSource.GCPCredential+ 29, // 29: bytebase.v1.DataSource.sasl_config:type_name -> bytebase.v1.SASLConfig+ 36, // 30: bytebase.v1.DataSource.additional_addresses:type_name -> bytebase.v1.DataSource.Address+ 6, // 31: bytebase.v1.DataSource.redis_type:type_name -> bytebase.v1.DataSource.RedisType+ 37, // 32: bytebase.v1.DataSource.extra_connection_parameters:type_name -> bytebase.v1.DataSource.ExtraConnectionParametersEntry+ 40, // 33: bytebase.v1.InstanceResource.engine:type_name -> bytebase.v1.Engine+ 27, // 34: bytebase.v1.InstanceResource.data_sources:type_name -> bytebase.v1.DataSource+ 30, // 35: bytebase.v1.SASLConfig.krb_config:type_name -> bytebase.v1.KerberosConfig+ 4, // 36: bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.type:type_name -> bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType+ 7, // 37: bytebase.v1.InstanceService.GetInstance:input_type -> bytebase.v1.GetInstanceRequest+ 8, // 38: bytebase.v1.InstanceService.ListInstances:input_type -> bytebase.v1.ListInstancesRequest+ 10, // 39: bytebase.v1.InstanceService.CreateInstance:input_type -> bytebase.v1.CreateInstanceRequest+ 11, // 40: bytebase.v1.InstanceService.UpdateInstance:input_type -> bytebase.v1.UpdateInstanceRequest+ 12, // 41: bytebase.v1.InstanceService.DeleteInstance:input_type -> bytebase.v1.DeleteInstanceRequest+ 13, // 42: bytebase.v1.InstanceService.UndeleteInstance:input_type -> bytebase.v1.UndeleteInstanceRequest+ 14, // 43: bytebase.v1.InstanceService.SyncInstance:input_type -> bytebase.v1.SyncInstanceRequest+ 15, // 44: bytebase.v1.InstanceService.ListInstanceDatabase:input_type -> bytebase.v1.ListInstanceDatabaseRequest+ 18, // 45: bytebase.v1.InstanceService.BatchSyncInstances:input_type -> bytebase.v1.BatchSyncInstancesRequest+ 20, // 46: bytebase.v1.InstanceService.BatchUpdateInstances:input_type -> bytebase.v1.BatchUpdateInstancesRequest+ 22, // 47: bytebase.v1.InstanceService.AddDataSource:input_type -> bytebase.v1.AddDataSourceRequest+ 23, // 48: bytebase.v1.InstanceService.RemoveDataSource:input_type -> bytebase.v1.RemoveDataSourceRequest+ 24, // 49: bytebase.v1.InstanceService.UpdateDataSource:input_type -> bytebase.v1.UpdateDataSourceRequest+ 25, // 50: bytebase.v1.InstanceService.GetInstance:output_type -> bytebase.v1.Instance+ 9, // 51: bytebase.v1.InstanceService.ListInstances:output_type -> bytebase.v1.ListInstancesResponse+ 25, // 52: bytebase.v1.InstanceService.CreateInstance:output_type -> bytebase.v1.Instance+ 25, // 53: bytebase.v1.InstanceService.UpdateInstance:output_type -> bytebase.v1.Instance+ 44, // 54: bytebase.v1.InstanceService.DeleteInstance:output_type -> google.protobuf.Empty+ 25, // 55: bytebase.v1.InstanceService.UndeleteInstance:output_type -> bytebase.v1.Instance+ 17, // 56: bytebase.v1.InstanceService.SyncInstance:output_type -> bytebase.v1.SyncInstanceResponse+ 16, // 57: bytebase.v1.InstanceService.ListInstanceDatabase:output_type -> bytebase.v1.ListInstanceDatabaseResponse+ 19, // 58: bytebase.v1.InstanceService.BatchSyncInstances:output_type -> bytebase.v1.BatchSyncInstancesResponse+ 21, // 59: bytebase.v1.InstanceService.BatchUpdateInstances:output_type -> bytebase.v1.BatchUpdateInstancesResponse+ 25, // 60: bytebase.v1.InstanceService.AddDataSource:output_type -> bytebase.v1.Instance+ 25, // 61: bytebase.v1.InstanceService.RemoveDataSource:output_type -> bytebase.v1.Instance+ 25, // 62: bytebase.v1.InstanceService.UpdateDataSource:output_type -> bytebase.v1.Instance+ 50, // [50:63] is the sub-list for method output_type+ 37, // [37:50] 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}func init() { file_v1_instance_service_proto_init() }@@ -3270,7 +3348,7 @@ func file_v1_instance_service_proto_init() {File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_instance_service_proto_rawDesc), len(file_v1_instance_service_proto_rawDesc)),- NumEnums: 6,+ NumEnums: 7,NumMessages: 31,NumExtensions: 0,NumServices: 1,diff --git a/backend/generated-go/v1/instance_service_equal.pb.go b/backend/generated-go/v1/instance_service_equal.pb.goindex e5225d18f7..1537bbc6cb 100644--- a/backend/generated-go/v1/instance_service_equal.pb.go+++ b/backend/generated-go/v1/instance_service_equal.pb.go@@ -457,6 +457,9 @@ func (x *DataSourceExternalSecret) Equal(y *DataSourceExternalSecret) bool {if x.GetToken() != y.GetToken() {return false}+ if x.TokenType != y.TokenType {+ return false+ }if x.EngineName != y.EngineName {return false}diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex b6f7b4d204..1f7f62f735 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -972,7 +972,12 @@},"self": "Auth type","token": {- "self": "Token"+ "env-name": "Token environment variable name",+ "file-path": "Token file path",+ "self": "Token",+ "type-environment": "Environment variable",+ "type-file": "File path",+ "type-plain": "Plain text"}},"vault-secret-engine-name": "Secret engine name",diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex b2d48b4016..603ea7391b 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -972,7 +972,12 @@},"self": "Tipo de autenticación","token": {- "self": "Token"+ "env-name": "Nombre de la variable de entorno del token",+ "file-path": "Ruta del archivo del token",+ "self": "Token",+ "type-environment": "Variable de entorno",+ "type-file": "Ruta de archivo",+ "type-plain": "Texto plano"}},"vault-secret-engine-name": "Nombre del motor de secretos",diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex bbecbe7ffe..09ef06ae15 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -972,7 +972,12 @@},"self": "認証タイプ","token": {- "self": "トークン"+ "env-name": "トークンの環境変数名",+ "file-path": "トークンファイルのパス",+ "self": "トークン",+ "type-environment": "環境変数",+ "type-file": "ファイルパス",+ "type-plain": "プレーンテキスト"}},"vault-secret-engine-name": "シークレットエンジン名",diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.jsonindex 89be8fbe34..04312af15a 100644--- a/frontend/src/locales/vi-VN.json+++ b/frontend/src/locales/vi-VN.json@@ -972,7 +972,12 @@},"self": "Loại xác thực","token": {- "self": "Mã thông báo"+ "env-name": "Tên biến môi trường của token",+ "file-path": "Đường dẫn tệp token",+ "self": "Mã thông báo",+ "type-environment": "Biến môi trường",+ "type-file": "Đường dẫn tệp",+ "type-plain": "Văn bản thuần"}},"vault-secret-engine-name": "Tên công cụ bí mật",diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex d8a5a02b27..e2e6b3219b 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -972,7 +972,12 @@},"self": "认证方式","token": {- "self": "Token"+ "env-name": "Token 环境变量名",+ "file-path": "Token 文件路径",+ "self": "Token",+ "type-environment": "环境变量",+ "type-file": "文件路径",+ "type-plain": "纯文本"}},"vault-secret-engine-name": "Secret engine name",diff --git a/frontend/src/react/components/instance/DataSourceForm.tsx b/frontend/src/react/components/instance/DataSourceForm.tsxindex 6e834192fd..62476cf538 100644--- a/frontend/src/react/components/instance/DataSourceForm.tsx+++ b/frontend/src/react/components/instance/DataSourceForm.tsx@@ -15,6 +15,7 @@ import {DataSourceExternalSecret_AppRoleAuthOptionSchema,DataSourceExternalSecret_AuthType,DataSourceExternalSecret_SecretType,+ DataSourceExternalSecret_TokenType,DataSourceExternalSecretSchema,DataSourceType,KerberosConfigSchema,@@ -1026,39 +1027,137 @@ export function DataSourceForm({</div>{/* Token input */}{dataSource.externalSecret.authType ===- DataSourceExternalSecret_AuthType.TOKEN && (- <div>- <label className="textlabel block">- {t(- "instance.external-secret-vault.vault-auth-type.token.self"- )}{" "}- <span className="text-error">*</span>- </label>- <Input- value={- dataSource.externalSecret.authOption- ?.case === "token"- ? (dataSource.externalSecret.authOption- .value as string)- : ""- }- className="mt-2 w-full"- disabled={!allowEdit}- placeholder={`${t("instance.external-secret-vault.vault-auth-type.token.self")} - ${t("common.write-only")}`}- onChange={(e) => {- const ds = { ...dataSource };- ds.externalSecret = {- ...ds.externalSecret!,- authOption: {- case: "token" as const,- value: e.target.value,- },- };- onDataSourceChange(ds);- }}- />- </div>- )}+ DataSourceExternalSecret_AuthType.TOKEN &&+ (() => {+ const tokenType =+ dataSource.externalSecret.tokenType ===+ DataSourceExternalSecret_TokenType.ENVIRONMENT ||+ dataSource.externalSecret.tokenType ===+ DataSourceExternalSecret_TokenType.FILE+ ? dataSource.externalSecret.tokenType+ : DataSourceExternalSecret_TokenType.PLAIN;+ const changeTokenType = (+ type: DataSourceExternalSecret_TokenType+ ) => {+ const ds = { ...dataSource };+ ds.externalSecret = {+ ...ds.externalSecret!,+ tokenType: type,+ };+ onDataSourceChange(ds);+ };+ const tokenLabel = t(+ "instance.external-secret-vault.vault-auth-type.token.self"+ );+ let tokenPlaceholder = `${tokenLabel} - ${t("common.write-only")}`;+ if (+ tokenType ===+ DataSourceExternalSecret_TokenType.ENVIRONMENT+ ) {+ tokenPlaceholder = t(+ "instance.external-secret-vault.vault-auth-type.token.env-name"+ );+ } else if (+ tokenType ===+ DataSourceExternalSecret_TokenType.FILE+ ) {+ tokenPlaceholder = t(+ "instance.external-secret-vault.vault-auth-type.token.file-path"+ );+ }+ return (+ <div>+ <label className="textlabel block">+ {tokenLabel}{" "}+ <span className="text-error">*</span>+ </label>+ {/* Token source is host-backed for env/file,+ which is disallowed in SaaS mode; only+ plain is offered there. */}+ {!isSaaSMode && (+ <div className="textlabel my-1 flex gap-x-4">+ <label className="flex items-center gap-x-1.5 cursor-pointer">+ <input+ type="radio"+ checked={+ tokenType ===+ DataSourceExternalSecret_TokenType.PLAIN+ }+ disabled={!allowEdit}+ onChange={() =>+ changeTokenType(+ DataSourceExternalSecret_TokenType.PLAIN+ )+ }+ />+ {t(+ "instance.external-secret-vault.vault-auth-type.token.type-plain"+ )}+ </label>+ <label className="flex items-center gap-x-1.5 cursor-pointer">+ <input+ type="radio"+ checked={+ tokenType ===+ DataSourceExternalSecret_TokenType.ENVIRONMENT+ }+ disabled={!allowEdit}+ onChange={() =>+ changeTokenType(+ DataSourceExternalSecret_TokenType.ENVIRONMENT+ )+ }+ />+ {t(+ "instance.external-secret-vault.vault-auth-type.token.type-environment"+ )}+ </label>+ <label className="flex items-center gap-x-1.5 cursor-pointer">+ <input+ type="radio"+ checked={+ tokenType ===+ DataSourceExternalSecret_TokenType.FILE+ }+ disabled={!allowEdit}+ onChange={() =>+ changeTokenType(+ DataSourceExternalSecret_TokenType.FILE+ )+ }+ />+ {t(+ "instance.external-secret-vault.vault-auth-type.token.type-file"+ )}+ </label>+ </div>+ )}+ <Input+ value={+ dataSource.externalSecret.authOption+ ?.case === "token"+ ? (dataSource.externalSecret+ .authOption.value as string)+ : ""+ }+ className="mt-2 w-full"+ disabled={!allowEdit}+ placeholder={tokenPlaceholder}+ onChange={(e) => {+ const ds = { ...dataSource };+ ds.externalSecret = {+ ...ds.externalSecret!,+ authOption: {+ case: "token" as const,+ value: e.target.value,+ },+ };+ onDataSourceChange(ds);+ }}+ />+ </div>+ );+ })()}{/* AppRole fields */}{dataSource.externalSecret.authOption?.case ==="appRole" && (@@ -1107,76 +1206,81 @@ export function DataSourceForm({)}{" "}<span className="text-error">*</span></label>- <div className="textlabel my-1 flex gap-x-4">- <label className="flex items-center gap-x-1.5 cursor-pointer">- <input- type="radio"- checked={- dataSource.externalSecret.authOption- .value.type === 0- }- disabled={!allowEdit}- onChange={() => {- const ds = { ...dataSource };- if (- ds.externalSecret?.authOption- ?.case === "appRole"- ) {- ds.externalSecret = {- ...ds.externalSecret,- authOption: {- ...ds.externalSecret- .authOption,- value: {+ {/* Environment secret id reads from the host,+ which is disallowed in SaaS mode; only plain+ is offered there. */}+ {!isSaaSMode && (+ <div className="textlabel my-1 flex gap-x-4">+ <label className="flex items-center gap-x-1.5 cursor-pointer">+ <input+ type="radio"+ checked={+ dataSource.externalSecret+ .authOption.value.type === 0+ }+ disabled={!allowEdit}+ onChange={() => {+ const ds = { ...dataSource };+ if (+ ds.externalSecret?.authOption+ ?.case === "appRole"+ ) {+ ds.externalSecret = {+ ...ds.externalSecret,+ authOption: {...ds.externalSecret- .authOption.value,- type: 0,+ .authOption,+ value: {+ ...ds.externalSecret+ .authOption.value,+ type: 0,+ },},- },- };+ };+ }+ onDataSourceChange(ds);+ }}+ />+ {t(+ "instance.external-secret-vault.vault-auth-type.approle.secret-plain-text"+ )}+ </label>+ <label className="flex items-center gap-x-1.5 cursor-pointer">+ <input+ type="radio"+ checked={+ dataSource.externalSecret+ .authOption.value.type === 1}- onDataSourceChange(ds);- }}- />- {t(- "instance.external-secret-vault.vault-auth-type.approle.secret-plain-text"- )}- </label>- <label className="flex items-center gap-x-1.5 cursor-pointer">- <input- type="radio"- checked={- dataSource.externalSecret.authOption- .value.type === 1- }- disabled={!allowEdit}- onChange={() => {- const ds = { ...dataSource };- if (- ds.externalSecret?.authOption- ?.case === "appRole"- ) {- ds.externalSecret = {- ...ds.externalSecret,- authOption: {- ...ds.externalSecret- .authOption,- value: {+ disabled={!allowEdit}+ onChange={() => {+ const ds = { ...dataSource };+ if (+ ds.externalSecret?.authOption+ ?.case === "appRole"+ ) {+ ds.externalSecret = {+ ...ds.externalSecret,+ authOption: {...ds.externalSecret- .authOption.value,- type: 1,+ .authOption,+ value: {+ ...ds.externalSecret+ .authOption.value,+ type: 1,+ },},- },- };- }- onDataSourceChange(ds);- }}- />- {t(- "instance.external-secret-vault.vault-auth-type.approle.secret-env-name"- )}- </label>- </div>+ };+ }+ onDataSourceChange(ds);+ }}+ />+ {t(+ "instance.external-secret-vault.vault-auth-type.approle.secret-env-name"+ )}+ </label>+ </div>+ )}<Inputvalue={dataSource.externalSecret.authOptiondiff --git a/frontend/src/types/proto-es/v1/instance_service_pb.d.ts b/frontend/src/types/proto-es/v1/instance_service_pb.d.tsindex 1395fa8e51..68bbbac1dd 100644--- a/frontend/src/types/proto-es/v1/instance_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/instance_service_pb.d.ts@@ -691,7 +691,9 @@ export declare type DataSourceExternalSecret = Message<"bytebase.v1.DataSourceExcase: "appRole";} | {/**- * Token for direct authentication.+ * Token for direct authentication. Interpreted according to token_type:+ * the literal token (PLAIN), an environment variable name (ENVIRONMENT),+ * or a file path (FILE).** @generated from field: string token = 5;*/@@ -699,6 +701,13 @@ export declare type DataSourceExternalSecret = Message<"bytebase.v1.DataSourceExcase: "token";} | { case: undefined; value?: undefined };+ /**+ * How to interpret the token field when auth_type is TOKEN.+ *+ * @generated from field: bytebase.v1.DataSourceExternalSecret.TokenType token_type = 13;+ */+ tokenType: DataSourceExternalSecret_TokenType;+/*** engine name is the name for secret engine.*@@ -905,6 +914,46 @@ export enum DataSourceExternalSecret_AuthType {*/export declare const DataSourceExternalSecret_AuthTypeSchema: GenEnum<DataSourceExternalSecret_AuthType>;+/**+ * @generated from enum bytebase.v1.DataSourceExternalSecret.TokenType+ */+export enum DataSourceExternalSecret_TokenType {+ /**+ * Unspecified token type, treated as PLAIN for backward compatibility.+ *+ * @generated from enum value: TOKEN_TYPE_UNSPECIFIED = 0;+ */+ TOKEN_TYPE_UNSPECIFIED = 0,++ /**+ * The token field holds the literal token value.+ *+ * @generated from enum value: PLAIN = 1;+ */+ PLAIN = 1,++ /**+ * The token field holds the name of an environment variable on the+ * Bytebase server that holds the token value.+ *+ * @generated from enum value: ENVIRONMENT = 2;+ */+ ENVIRONMENT = 2,++ /**+ * The token field holds a path to a file on the Bytebase server that+ * holds the token value.+ *+ * @generated from enum value: FILE = 3;+ */+ FILE = 3,+}++/**+ * Describes the enum bytebase.v1.DataSourceExternalSecret.TokenType.+ */+export declare const DataSourceExternalSecret_TokenTypeSchema: GenEnum<DataSourceExternalSecret_TokenType>;+/*** @generated from message bytebase.v1.DataSource*/diff --git a/frontend/src/types/proto-es/v1/instance_service_pb.js b/frontend/src/types/proto-es/v1/instance_service_pb.jsindex abec238553..2457333476 100644--- a/frontend/src/types/proto-es/v1/instance_service_pb.js+++ b/frontend/src/types/proto-es/v1/instance_service_pb.js@@ -17,7 +17,7 @@ import { file_v1_instance_role_service } from "./instance_role_service_pb";* Describes the file v1/instance_service.proto.*/export const file_v1_instance_service = /*@__PURE__*/- fileDesc("Chl2MS9pbnN0YW5jZV9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSJBChJHZXRJbnN0YW5jZVJlcXVlc3QSKwoEbmFtZRgBIAEoCUId4EEC+kEXChVieXRlYmFzZS5jb20vSW5zdGFuY2UidQoUTGlzdEluc3RhbmNlc1JlcXVlc3QSEQoJcGFnZV9zaXplGAEgASgFEhIKCnBhZ2VfdG9rZW4YAiABKAkSFAoMc2hvd19kZWxldGVkGAMgASgIEg4KBmZpbHRlchgEIAEoCRIQCghvcmRlcl9ieRgFIAEoCSJaChVMaXN0SW5zdGFuY2VzUmVzcG9uc2USKAoJaW5zdGFuY2VzGAEgAygLMhUuYnl0ZWJhc2UudjEuSW5zdGFuY2USFwoPbmV4dF9wYWdlX3Rva2VuGAIgASgJInEKFUNyZWF0ZUluc3RhbmNlUmVxdWVzdBIsCghpbnN0YW5jZRgBIAEoCzIVLmJ5dGViYXNlLnYxLkluc3RhbmNlQgPgQQISEwoLaW5zdGFuY2VfaWQYAiABKAkSFQoNdmFsaWRhdGVfb25seRgDIAEoCCKNAQoVVXBkYXRlSW5zdGFuY2VSZXF1ZXN0EiwKCGluc3RhbmNlGAEgASgLMhUuYnl0ZWJhc2UudjEuSW5zdGFuY2VCA+BBAhIvCgt1cGRhdGVfbWFzaxgCIAEoCzIaLmdvb2dsZS5wcm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XF1ZXN0GhUuYnl0ZWJhc2UudjEuSW5zdGFuY2UiTorqMBNiYi5pbnN0YW5jZXMudXBkYXRlkOowAZjqMAGC0+STAik6ASoiJC92MS97bmFtZT1pbnN0YW5jZXMvKn06YWRkRGF0YVNvdXJjZRKiAQoQUmVtb3ZlRGF0YVNvdXJjZRIkLmJ5dGViYXNlLnYxLlJlbW92ZURhdGFTb3VyY2VSZXF1ZXN0GhUuYnl0ZWJhc2UudjEuSW5zdGFuY2UiUYrqMBNiYi5pbnN0YW5jZXMudXBkYXRlkOowAZjqMAGC0+STAiw6ASoiJy92MS97bmFtZT1pbnN0YW5jZXMvKn06cmVtb3ZlRGF0YVNvdXJjZRLGAQoQVXBkYXRlRGF0YVNvdXJjZRIkLmJ5dGViYXNlLnYxLlVwZGF0ZURhdGFTb3VyY2VSZXF1ZXN0GhUuYnl0ZWJhc2UudjEuSW5zdGFuY2UiddpBF2RhdGFfc291cmNlLHVwZGF0ZV9tYXNriuowE2JiLmluc3RhbmNlcy51cGRhdGWQ6jABmOowAYLT5JMCNjoLZGF0YV9zb3VyY2UyJy92MS97bmFtZT1pbnN0YW5jZXMvKn06dXBkYXRlRGF0YVNvdXJjZUKqAQoPY29tLmJ5dGViYXNlLnYxQhRJbnN0YW5jZVNlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_instance_role_service]);+ fileDesc("Chl2MS9pbnN0YW5jZV9zZXJ2aWNlLnByb3RvE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mVEYXRhU291cmNlUmVxdWVzdBoVLmJ5dGViYXNlLnYxLkluc3RhbmNlIlGK6jATYmIuaW5zdGFuY2VzLnVwZGF0ZZDqMAGY6jABgtPkkwIsOgEqIicvdjEve25hbWU9aW5zdGFuY2VzLyp9OnJlbW92ZURhdGFTb3VyY2USxgEKEFVwZGF0ZURhdGFTb3VyY2USJC5ieXRlYmFzZS52MS5VcGRhdGVEYXRhU291cmNlUmVxdWVzdBoVLmJ5dGViYXNlLnYxLkluc3RhbmNlInXaQRdkYXRhX3NvdXJjZSx1cGRhdGVfbWFza4rqMBNiYi5pbnN0YW5jZXMudXBkYXRlkOowAZjqMAGC0+STAjY6C2RhdGFfc291cmNlMicvdjEve25hbWU9aW5zdGFuY2VzLyp9OnVwZGF0ZURhdGFTb3VyY2VCqgEKD2NvbS5ieXRlYmFzZS52MUIUSW5zdGFuY2VTZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_v1_annotation, file_v1_common, file_v1_instance_role_service]);/*** Describes the message bytebase.v1.GetInstanceRequest.@@ -202,6 +202,18 @@ export const DataSourceExternalSecret_AuthTypeSchema = /*@__PURE__*/export const DataSourceExternalSecret_AuthType = /*@__PURE__*/tsEnum(DataSourceExternalSecret_AuthTypeSchema);+/**+ * Describes the enum bytebase.v1.DataSourceExternalSecret.TokenType.+ */+export const DataSourceExternalSecret_TokenTypeSchema = /*@__PURE__*/+ enumDesc(file_v1_instance_service, 19, 2);++/**+ * @generated from enum bytebase.v1.DataSourceExternalSecret.TokenType+ */+export const DataSourceExternalSecret_TokenType = /*@__PURE__*/+ tsEnum(DataSourceExternalSecret_TokenTypeSchema);+/*** Describes the message bytebase.v1.DataSource.* Use `create(DataSourceSchema)` to create a new message.diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex 7b45e97caf..5efb63a2bb 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -18347,6 +18347,10 @@ components:title: auth_typedescription: The authentication method for accessing the secret store.$ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.AuthType'+ tokenType:+ title: token_type+ description: How to interpret the token field when auth_type is TOKEN.+ $ref: '#/components/schemas/bytebase.v1.DataSourceExternalSecret.TokenType'engineName:type: stringtitle: engine_name@@ -18398,7 +18402,10 @@ components:token:type: stringtitle: token- description: Token for direct authentication.+ description: |-+ Token for direct authentication. Interpreted according to token_type:+ the literal token (PLAIN), an environment variable name (ENVIRONMENT),+ or a file path (FILE).writeOnly: truetitle: tokenrequired:@@ -18451,6 +18458,14 @@ components:- AWS_SECRETS_MANAGER- GCP_SECRET_MANAGER- AZURE_KEY_VAULT+ bytebase.v1.DataSourceExternalSecret.TokenType:+ type: string+ title: TokenType+ enum:+ - TOKEN_TYPE_UNSPECIFIED+ - PLAIN+ - ENVIRONMENT+ - FILEbytebase.v1.DataSourceType:type: stringtitle: DataSourceTypediff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex 88fe4650fb..8042dd38b5 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -146,6 +146,7 @@- [DataSourceExternalSecret.AppRoleAuthOption.SecretType](#bytebase-store-DataSourceExternalSecret-AppRoleAuthOption-SecretType)- [DataSourceExternalSecret.AuthType](#bytebase-store-DataSourceExternalSecret-AuthType)- [DataSourceExternalSecret.SecretType](#bytebase-store-DataSourceExternalSecret-SecretType)+ - [DataSourceExternalSecret.TokenType](#bytebase-store-DataSourceExternalSecret-TokenType)- [DataSourceType](#bytebase-store-DataSourceType)- [store/issue.proto](#store_issue-proto)@@ -2499,6 +2500,7 @@ OIDCIdentityProviderConfig is the structure for OIDC identity provider config.| auth_type | [DataSourceExternalSecret.AuthType](#bytebase-store-DataSourceExternalSecret-AuthType) | | || app_role | [DataSourceExternalSecret.AppRoleAuthOption](#bytebase-store-DataSourceExternalSecret-AppRoleAuthOption) | | || token | [string](#string) | | |+| token_type | [DataSourceExternalSecret.TokenType](#bytebase-store-DataSourceExternalSecret-TokenType) | | How to interpret the token field when auth_type is TOKEN. || engine_name | [string](#string) | | engine name is the name for secret engine. || secret_name | [string](#string) | | the secret name in the engine to store the password. || password_key_name | [string](#string) | | the key name for the password. |@@ -2701,6 +2703,20 @@ InstanceRole is the API message for instance role.+<a name="bytebase-store-DataSourceExternalSecret-TokenType"></a>++### DataSourceExternalSecret.TokenType+++| Name | Number | Description |+| ---- | ------ | ----------- |+| TOKEN_TYPE_UNSPECIFIED | 0 | |+| PLAIN | 1 | The token field holds the literal token value. |+| ENVIRONMENT | 2 | The token field holds the name of an environment variable on the Bytebase server that holds the token value. |+| FILE | 3 | The token field holds a path to a file on the Bytebase server that holds the token value. |+++<a name="bytebase-store-DataSourceType"></a>### DataSourceTypediff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.htmlindex eec875423d..89789d76e1 100644--- a/proto/gen/grpc-doc/store/index.html+++ b/proto/gen/grpc-doc/store/index.html@@ -744,6 +744,10 @@<a href="#bytebase.store.DataSourceExternalSecret.SecretType"><span class="badge">E</span>DataSourceExternalSecret.SecretType</a></li>+ <li>+ <a href="#bytebase.store.DataSourceExternalSecret.TokenType"><span class="badge">E</span>DataSourceExternalSecret.TokenType</a>+ </li>+<li><a href="#bytebase.store.DataSourceType"><span class="badge">E</span>DataSourceType</a></li>@@ -7617,6 +7621,13 @@ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_e<td><p> </p></td></tr>+ <tr>+ <td>token_type</td>+ <td><a href="#bytebase.store.DataSourceExternalSecret.TokenType">DataSourceExternalSecret.TokenType</a></td>+ <td></td>+ <td><p>How to interpret the token field when auth_type is TOKEN. </p></td>+ </tr>+<tr><td>engine_name</td><td><a href="#string">string</a></td>@@ -8192,6 +8203,43 @@ For MySQL, it is the global privileges as GRANT statements, which means it only</tbody></table>+ <h3 id="bytebase.store.DataSourceExternalSecret.TokenType">DataSourceExternalSecret.TokenType</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>TOKEN_TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p></p></td>+ </tr>++ <tr>+ <td>PLAIN</td>+ <td>1</td>+ <td><p>The token field holds the literal token value.</p></td>+ </tr>++ <tr>+ <td>ENVIRONMENT</td>+ <td>2</td>+ <td><p>The token field holds the name of an environment variable on the+Bytebase server that holds the token value.</p></td>+ </tr>++ <tr>+ <td>FILE</td>+ <td>3</td>+ <td><p>The token field holds a path to a file on the Bytebase server that+holds the token value.</p></td>+ </tr>++ </tbody>+ </table>+<h3 id="bytebase.store.DataSourceType">DataSourceType</h3><p></p><table class="enum-table">diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 8f88367294..02df898b83 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -140,6 +140,7 @@- [DataSourceExternalSecret.AppRoleAuthOption.SecretType](#bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption-SecretType)- [DataSourceExternalSecret.AuthType](#bytebase-v1-DataSourceExternalSecret-AuthType)- [DataSourceExternalSecret.SecretType](#bytebase-v1-DataSourceExternalSecret-SecretType)+ - [DataSourceExternalSecret.TokenType](#bytebase-v1-DataSourceExternalSecret-TokenType)- [DataSourceType](#bytebase-v1-DataSourceType)- [InstanceService](#bytebase-v1-InstanceService)@@ -2485,7 +2486,8 @@ This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. || url | [string](#string) | | The URL of the external secret store. || auth_type | [DataSourceExternalSecret.AuthType](#bytebase-v1-DataSourceExternalSecret-AuthType) | | The authentication method for accessing the secret store. || app_role | [DataSourceExternalSecret.AppRoleAuthOption](#bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption) | | AppRole authentication configuration. |-| token | [string](#string) | | Token for direct authentication. |+| token | [string](#string) | | Token for direct authentication. Interpreted according to token_type: the literal token (PLAIN), an environment variable name (ENVIRONMENT), or a file path (FILE). |+| token_type | [DataSourceExternalSecret.TokenType](#bytebase-v1-DataSourceExternalSecret-TokenType) | | How to interpret the token field when auth_type is TOKEN. || engine_name | [string](#string) | | engine name is the name for secret engine. || secret_name | [string](#string) | | the secret name in the engine to store the password. || password_key_name | [string](#string) | | the key name for the password. |@@ -2894,6 +2896,20 @@ The instance's `name` field is used to identify the instance to update. Form+<a name="bytebase-v1-DataSourceExternalSecret-TokenType"></a>++### DataSourceExternalSecret.TokenType+++| Name | Number | Description |+| ---- | ------ | ----------- |+| TOKEN_TYPE_UNSPECIFIED | 0 | Unspecified token type, treated as PLAIN for backward compatibility. |+| PLAIN | 1 | The token field holds the literal token value. |+| ENVIRONMENT | 2 | The token field holds the name of an environment variable on the Bytebase server that holds the token value. |+| FILE | 3 | The token field holds a path to a file on the Bytebase server that holds the token value. |+++<a name="bytebase-v1-DataSourceType"></a>### DataSourceTypediff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex e306396303..47d041abe1 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -706,6 +706,10 @@<a href="#bytebase.v1.DataSourceExternalSecret.SecretType"><span class="badge">E</span>DataSourceExternalSecret.SecretType</a></li>+ <li>+ <a href="#bytebase.v1.DataSourceExternalSecret.TokenType"><span class="badge">E</span>DataSourceExternalSecret.TokenType</a>+ </li>+<li><a href="#bytebase.v1.DataSourceType"><span class="badge">E</span>DataSourceType</a></li>@@ -7786,7 +7790,16 @@ See: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_e<td>token</td><td><a href="#string">string</a></td><td></td>- <td><p>Token for direct authentication. </p></td>+ <td><p>Token for direct authentication. Interpreted according to token_type:+the literal token (PLAIN), an environment variable name (ENVIRONMENT),+or a file path (FILE). </p></td>+ </tr>++ <tr>+ <td>token_type</td>+ <td><a href="#bytebase.v1.DataSourceExternalSecret.TokenType">DataSourceExternalSecret.TokenType</a></td>+ <td></td>+ <td><p>How to interpret the token field when auth_type is TOKEN. </p></td></tr><tr>@@ -8843,6 +8856,43 @@ In this situation, `update_mask` is ignored. </p></td></tbody></table>+ <h3 id="bytebase.v1.DataSourceExternalSecret.TokenType">DataSourceExternalSecret.TokenType</h3>+ <p></p>+ <table class="enum-table">+ <thead>+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>TOKEN_TYPE_UNSPECIFIED</td>+ <td>0</td>+ <td><p>Unspecified token type, treated as PLAIN for backward compatibility.</p></td>+ </tr>++ <tr>+ <td>PLAIN</td>+ <td>1</td>+ <td><p>The token field holds the literal token value.</p></td>+ </tr>++ <tr>+ <td>ENVIRONMENT</td>+ <td>2</td>+ <td><p>The token field holds the name of an environment variable on the+Bytebase server that holds the token value.</p></td>+ </tr>++ <tr>+ <td>FILE</td>+ <td>3</td>+ <td><p>The token field holds a path to a file on the Bytebase server that+holds the token value.</p></td>+ </tr>++ </tbody>+ </table>+<h3 id="bytebase.v1.DataSourceType">DataSourceType</h3><p></p><table class="enum-table">diff --git a/proto/store/store/instance.proto b/proto/store/store/instance.protoindex 6f9178876f..5c8c31a13b 100644--- a/proto/store/store/instance.proto+++ b/proto/store/store/instance.proto@@ -262,11 +262,26 @@ message DataSourceExternalSecret {string mount_path = 4;}+ enum TokenType {+ TOKEN_TYPE_UNSPECIFIED = 0;+ // The token field holds the literal token value.+ PLAIN = 1;+ // The token field holds the name of an environment variable on the+ // Bytebase server that holds the token value.+ ENVIRONMENT = 2;+ // The token field holds a path to a file on the Bytebase server that+ // holds the token value.+ FILE = 3;+ }+oneof auth_option {AppRoleAuthOption app_role = 4;string token = 5;}+ // How to interpret the token field when auth_type is TOKEN.+ TokenType token_type = 16;+// engine name is the name for secret engine.string engine_name = 6;// the secret name in the engine to store the password.diff --git a/proto/v1/v1/instance_service.proto b/proto/v1/v1/instance_service.protoindex a17f993c4f..c28f4da9f3 100644--- a/proto/v1/v1/instance_service.proto+++ b/proto/v1/v1/instance_service.proto@@ -513,13 +513,31 @@ message DataSourceExternalSecret {string mount_path = 4;}+ enum TokenType {+ // Unspecified token type, treated as PLAIN for backward compatibility.+ TOKEN_TYPE_UNSPECIFIED = 0;+ // The token field holds the literal token value.+ PLAIN = 1;+ // The token field holds the name of an environment variable on the+ // Bytebase server that holds the token value.+ ENVIRONMENT = 2;+ // The token field holds a path to a file on the Bytebase server that+ // holds the token value.+ FILE = 3;+ }+oneof auth_option {// AppRole authentication configuration.AppRoleAuthOption app_role = 4;- // Token for direct authentication.+ // Token for direct authentication. Interpreted according to token_type:+ // the literal token (PLAIN), an environment variable name (ENVIRONMENT),+ // or a file path (FILE).string token = 5 [(google.api.field_behavior) = INPUT_ONLY];}+ // How to interpret the token field when auth_type is TOKEN.+ TokenType token_type = 13;+// engine name is the name for secret engine.string engine_name = 6;// the secret name in the engine to store the password.