Skip to content

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

chore: support specific credential for GCP/AWS IAM (#16614)

ecmadao60b487eea328
diff --git a/backend/api/v1/instance_service.go b/backend/api/v1/instance_service.go
index 1accac1552..d72589a422 100644
--- a/backend/api/v1/instance_service.go
+++ b/backend/api/v1/instance_service.go
@@ -847,18 +847,42 @@ func (s *InstanceService) UpdateDataSource(ctx context.Context, req *connect.Req
dataSource.MasterPassword = req.Msg.DataSource.MasterPassword
case "extra_connection_parameters":
dataSource.ExtraConnectionParameters = req.Msg.DataSource.ExtraConnectionParameters
- case "iam_extension", "client_secret_credential":
- // TODO(zp): Remove the hack while frontend use new oneof artifact.
- if v := req.Msg.DataSource.IamExtension; v != nil {
- switch v := v.(type) {
- case *v1pb.DataSource_ClientSecretCredential_:
- dataSource.IamExtension = &storepb.DataSource_ClientSecretCredential_{
- ClientSecretCredential: convertV1ClientSecretCredential(v.ClientSecretCredential),
+ case "azure_credential", "aws_credential", "gcp_credential":
+ switch req.Msg.DataSource.AuthenticationType {
+ case v1pb.DataSource_AZURE_IAM:
+ if azureCredential := req.Msg.DataSource.GetAzureCredential(); azureCredential != nil {
+ dataSource.IamExtension = &storepb.DataSource_AzureCredential_{
+ AzureCredential: &storepb.DataSource_AzureCredential{
+ TenantId: azureCredential.TenantId,
+ ClientId: azureCredential.ClientId,
+ ClientSecret: azureCredential.ClientSecret,
+ },
}
- default:
+ } else {
+ dataSource.IamExtension = nil
+ }
+ case v1pb.DataSource_AWS_RDS_IAM:
+ if awsCredential := req.Msg.DataSource.GetAwsCredential(); awsCredential != nil {
+ dataSource.IamExtension = &storepb.DataSource_AwsCredential{
+ AwsCredential: &storepb.DataSource_AWSCredential{
+ AccessKeyId: awsCredential.AccessKeyId,
+ SecretAccessKey: awsCredential.SecretAccessKey,
+ SessionToken: awsCredential.SessionToken,
+ },
+ }
+ } else {
+ dataSource.IamExtension = nil
+ }
+ case v1pb.DataSource_GOOGLE_CLOUD_SQL_IAM:
+ if gcpCredential := req.Msg.DataSource.GetGcpCredential(); gcpCredential != nil {
+ dataSource.IamExtension = &storepb.DataSource_GcpCredential{
+ GcpCredential: &storepb.DataSource_GCPCredential{
+ Content: gcpCredential.Content,
+ },
+ }
+ } else {
+ dataSource.IamExtension = nil
}
- } else {
- dataSource.IamExtension = nil
}
default:
return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf(`unsupported update_mask "%s"`, path))
@@ -1202,10 +1226,28 @@ func convertDataSources(dataSources []*storepb.DataSource) ([]*v1pb.DataSource,
MasterUsername: ds.GetMasterUsername(),
ExtraConnectionParameters: ds.GetExtraConnectionParameters(),
}
- if clientSecretCredential := convertClientSecretCredential(ds.GetClientSecretCredential()); clientSecretCredential != nil {
- clientSecretCredential.ClientSecret = ""
- dataSource.IamExtension = &v1pb.DataSource_ClientSecretCredential_{
- ClientSecretCredential: clientSecretCredential,
+
+ switch dataSource.AuthenticationType {
+ case v1pb.DataSource_AZURE_IAM:
+ if azureCredential := ds.GetAzureCredential(); azureCredential != nil {
+ dataSource.IamExtension = &v1pb.DataSource_AzureCredential_{
+ AzureCredential: &v1pb.DataSource_AzureCredential{
+ TenantId: azureCredential.TenantId,
+ ClientId: azureCredential.ClientId,
+ },
+ }
+ }
+ case v1pb.DataSource_AWS_RDS_IAM:
+ if awsCredential := ds.GetAwsCredential(); awsCredential != nil {
+ dataSource.IamExtension = &v1pb.DataSource_AwsCredential{
+ AwsCredential: &v1pb.DataSource_AWSCredential{},
+ }
+ }
+ case v1pb.DataSource_GOOGLE_CLOUD_SQL_IAM:
+ if gcpCredential := ds.GetGcpCredential(); gcpCredential != nil {
+ dataSource.IamExtension = &v1pb.DataSource_GcpCredential{
+ GcpCredential: &v1pb.DataSource_GCPCredential{},
+ }
}
}
@@ -1215,16 +1257,6 @@ func convertDataSources(dataSources []*storepb.DataSource) ([]*v1pb.DataSource,
return v1DataSources, nil
}
-func convertClientSecretCredential(clientSecretCredential *storepb.DataSource_ClientSecretCredential) *v1pb.DataSource_ClientSecretCredential {
- if clientSecretCredential == nil {
- return nil
- }
- return &v1pb.DataSource_ClientSecretCredential{
- TenantId: clientSecretCredential.TenantId,
- ClientId: clientSecretCredential.ClientId,
- }
-}
-
func convertV1DataSourceExternalSecret(externalSecret *v1pb.DataSourceExternalSecret) (*storepb.DataSourceExternalSecret, error) {
if externalSecret == nil {
return nil, nil
@@ -1426,26 +1458,41 @@ func convertV1DataSource(dataSource *v1pb.DataSource) (*storepb.DataSource, erro
MasterPassword: dataSource.MasterPassword,
ExtraConnectionParameters: dataSource.ExtraConnectionParameters,
}
- if v := dataSource.IamExtension; v != nil {
- if _, ok := v.(*v1pb.DataSource_ClientSecretCredential_); ok {
- storeDataSource.IamExtension = &storepb.DataSource_ClientSecretCredential_{ClientSecretCredential: convertV1ClientSecretCredential(dataSource.GetClientSecretCredential())}
+
+ switch dataSource.AuthenticationType {
+ case v1pb.DataSource_AZURE_IAM:
+ if azureCredential := dataSource.GetAzureCredential(); azureCredential != nil {
+ storeDataSource.IamExtension = &storepb.DataSource_AzureCredential_{
+ AzureCredential: &storepb.DataSource_AzureCredential{
+ TenantId: azureCredential.TenantId,
+ ClientId: azureCredential.ClientId,
+ ClientSecret: azureCredential.ClientSecret,
+ },
+ }
+ }
+ case v1pb.DataSource_AWS_RDS_IAM:
+ if awsCredential := dataSource.GetAwsCredential(); awsCredential != nil {
+ storeDataSource.IamExtension = &storepb.DataSource_AwsCredential{
+ AwsCredential: &storepb.DataSource_AWSCredential{
+ AccessKeyId: awsCredential.AccessKeyId,
+ SecretAccessKey: awsCredential.SecretAccessKey,
+ SessionToken: awsCredential.SessionToken,
+ },
+ }
+ }
+ case v1pb.DataSource_GOOGLE_CLOUD_SQL_IAM:
+ if gcpCredential := dataSource.GetGcpCredential(); gcpCredential != nil {
+ storeDataSource.IamExtension = &storepb.DataSource_GcpCredential{
+ GcpCredential: &storepb.DataSource_GCPCredential{
+ Content: gcpCredential.Content,
+ },
+ }
}
}
return storeDataSource, nil
}
-func convertV1ClientSecretCredential(credential *v1pb.DataSource_ClientSecretCredential) *storepb.DataSource_ClientSecretCredential {
- if credential == nil {
- return nil
- }
- return &storepb.DataSource_ClientSecretCredential{
- TenantId: credential.TenantId,
- ClientId: credential.ClientId,
- ClientSecret: credential.ClientSecret,
- }
-}
-
func convertV1DataSourceType(tp v1pb.DataSourceType) (storepb.DataSourceType, error) {
switch tp {
case v1pb.DataSourceType_READ_ONLY:
diff --git a/backend/migrator/migration/3.7/0027##rename_client_secret_credential.sql b/backend/migrator/migration/3.7/0027##rename_client_secret_credential.sql
new file mode 100644
index 0000000000..f8e02b8c77
--- /dev/null
+++ b/backend/migrator/migration/3.7/0027##rename_client_secret_credential.sql
@@ -0,0 +1,2 @@
+UPDATE instance SET metadata = REPLACE(metadata::text, 'clientSecretCredential', 'azureCredential')
+::jsonb;
\ No newline at end of file
diff --git a/backend/migrator/migrator_test.go b/backend/migrator/migrator_test.go
index 172560b5d0..bb5989cca2 100644
--- a/backend/migrator/migrator_test.go
+++ b/backend/migrator/migrator_test.go
@@ -12,7 +12,7 @@ import (
func TestLatestVersion(t *testing.T) {
files, err := getSortedVersionedFiles()
require.NoError(t, err)
- require.Equal(t, semver.MustParse("3.7.26"), *files[len(files)-1].version)
+ require.Equal(t, semver.MustParse("3.7.27"), *files[len(files)-1].version)
}
func TestVersionUnique(t *testing.T) {
diff --git a/backend/plugin/db/cosmosdb/cosmosdb.go b/backend/plugin/db/cosmosdb/cosmosdb.go
index 4312e06a50..1d6b635f41 100644
--- a/backend/plugin/db/cosmosdb/cosmosdb.go
+++ b/backend/plugin/db/cosmosdb/cosmosdb.go
@@ -10,12 +10,11 @@ import (
"connectrpc.com/connect"
"google.golang.org/protobuf/types/known/durationpb"
- "github.com/Azure/azure-sdk-for-go/sdk/azcore"
- "github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/data/azcosmos"
"github.com/pkg/errors"
"github.com/bytebase/bytebase/backend/plugin/db"
+ "github.com/bytebase/bytebase/backend/plugin/db/util"
"github.com/bytebase/bytebase/backend/plugin/parser/base"
storepb "github.com/bytebase/bytebase/proto/generated-go/store"
v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"
@@ -41,20 +40,11 @@ func newDriver() db.Driver {
// Open opens a CosmosDB driver.
func (d *Driver) Open(_ context.Context, _ storepb.Engine, connCfg db.ConnectionConfig) (db.Driver, error) {
endpoint := connCfg.DataSource.Host
- var credential azcore.TokenCredential
- if clientSecretCredential := connCfg.DataSource.GetClientSecretCredential(); clientSecretCredential != nil {
- c, err := azidentity.NewClientSecretCredential(clientSecretCredential.TenantId, clientSecretCredential.ClientId, clientSecretCredential.ClientSecret, nil)
- if err != nil {
- return nil, errors.Wrapf(err, "failed to create client secret credential")
- }
- credential = c
- } else {
- c, err := azidentity.NewDefaultAzureCredential(nil)
- if err != nil {
- return nil, errors.Wrapf(err, "failed to found default Azure credential")
- }
- credential = c
+ credential, err := util.GetAzureConnectionConfig(connCfg)
+ if err != nil {
+ return nil, err
}
+
client, err := azcosmos.NewClient(endpoint, credential, nil)
if err != nil {
return nil, errors.Wrapf(err, "failed to create CosmosDB client")
diff --git a/backend/plugin/db/mssql/mssql.go b/backend/plugin/db/mssql/mssql.go
index 99f5d37ee2..64a82c6732 100644
--- a/backend/plugin/db/mssql/mssql.go
+++ b/backend/plugin/db/mssql/mssql.go
@@ -107,10 +107,10 @@ func (d *Driver) Open(_ context.Context, _ storepb.Engine, config db.ConnectionC
password := config.Password
if config.DataSource.GetAuthenticationType() == storepb.DataSource_AZURE_IAM {
driverName = azuread.DriverName
- if config.DataSource.GetClientSecretCredential() != nil {
+ if azureCredential := config.DataSource.GetAzureCredential(); azureCredential != nil {
query.Add("fedauth", azuread.ActiveDirectoryServicePrincipal)
- query.Add("user id", fmt.Sprintf("%s@%s", config.DataSource.GetClientSecretCredential().ClientId, config.DataSource.GetClientSecretCredential().TenantId))
- query.Add("password", config.DataSource.GetClientSecretCredential().ClientSecret)
+ query.Add("user id", fmt.Sprintf("%s@%s", azureCredential.ClientId, azureCredential.TenantId))
+ query.Add("password", azureCredential.ClientSecret)
password = ""
} else {
query.Add("fedauth", azuread.ActiveDirectoryDefault)
diff --git a/backend/plugin/db/mysql/mysql.go b/backend/plugin/db/mysql/mysql.go
index 9fb20fa127..c6c24eb48b 100644
--- a/backend/plugin/db/mysql/mysql.go
+++ b/backend/plugin/db/mysql/mysql.go
@@ -16,8 +16,6 @@ import (
"strings"
"time"
- "cloud.google.com/go/cloudsqlconn"
- "github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/feature/rds/auth"
"github.com/go-sql-driver/mysql"
"github.com/google/uuid"
@@ -182,7 +180,7 @@ func registerRDSMysqlCerts(ctx context.Context) error {
// https://repost.aws/knowledge-center/rds-mysql-access-denied
func getRDSConnection(ctx context.Context, connCfg db.ConnectionConfig) (string, error) {
dbEndpoint := fmt.Sprintf("%s:%s", connCfg.DataSource.Host, connCfg.DataSource.Port)
- cfg, err := config.LoadDefaultConfig(ctx)
+ cfg, err := util.GetAWSConnectionConfig(ctx, connCfg)
if err != nil {
return "", errors.Wrap(err, "load aws config failed")
}
@@ -204,10 +202,11 @@ func getRDSConnection(ctx context.Context, connCfg db.ConnectionConfig) (string,
}
func getCloudSQLConnection(ctx context.Context, connCfg db.ConnectionConfig) (string, error) {
- d, err := cloudsqlconn.NewDialer(ctx, cloudsqlconn.WithIAMAuthN())
+ d, err := util.GetGCPConnectionConfig(ctx, connCfg)
if err != nil {
- return "", err
+ return "", errors.Wrap(err, "load gcp config failed")
}
+
mysql.RegisterDialContext("cloudsqlconn",
func(ctx context.Context, _ string) (net.Conn, error) {
return d.Dial(ctx, connCfg.DataSource.Host)
diff --git a/backend/plugin/db/pg/pg.go b/backend/plugin/db/pg/pg.go
index 9ecd0f2ea1..4a7d7f4627 100644
--- a/backend/plugin/db/pg/pg.go
+++ b/backend/plugin/db/pg/pg.go
@@ -13,8 +13,6 @@ import (
"time"
"unicode"
- "cloud.google.com/go/cloudsqlconn"
- "github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/feature/rds/auth"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgconn"
@@ -217,7 +215,7 @@ func getPGConnectionConfig(config db.ConnectionConfig) (*pgx.ConnConfig, error)
}
func getRDSConnectionPassword(ctx context.Context, conf db.ConnectionConfig) (string, error) {
- cfg, err := config.LoadDefaultConfig(ctx)
+ cfg, err := util.GetAWSConnectionConfig(ctx, conf)
if err != nil {
return "", errors.Wrap(err, "load aws config failed")
}
@@ -252,9 +250,9 @@ func getRDSConnectionConfig(ctx context.Context, conf db.ConnectionConfig) (*pgx
// https://cloud.google.com/sql/docs/postgres/connect-connectors
// https://github.com/GoogleCloudPlatform/golang-samples/blob/main/cloudsql/postgres/database-sql/cloudsql.go
func getCloudSQLConnectionConfig(ctx context.Context, conf db.ConnectionConfig) (*pgx.ConnConfig, error) {
- d, err := cloudsqlconn.NewDialer(ctx, cloudsqlconn.WithIAMAuthN())
+ d, err := util.GetGCPConnectionConfig(ctx, conf)
if err != nil {
- return nil, err
+ return nil, errors.Wrap(err, "load gcp config failed")
}
dsn := fmt.Sprintf("user=%s", conf.DataSource.Username)
diff --git a/backend/plugin/db/util/connection.go b/backend/plugin/db/util/connection.go
new file mode 100644
index 0000000000..a3bc7efb50
--- /dev/null
+++ b/backend/plugin/db/util/connection.go
@@ -0,0 +1,55 @@
+package util
+
+import (
+ "context"
+
+ "cloud.google.com/go/cloudsqlconn"
+ "github.com/Azure/azure-sdk-for-go/sdk/azcore"
+ "github.com/Azure/azure-sdk-for-go/sdk/azidentity"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/config"
+ "github.com/aws/aws-sdk-go-v2/credentials"
+ "github.com/pkg/errors"
+
+ "github.com/bytebase/bytebase/backend/plugin/db"
+)
+
+func GetAWSConnectionConfig(ctx context.Context, connCfg db.ConnectionConfig) (aws.Config, error) {
+ if awsCredential := connCfg.DataSource.GetAwsCredential(); awsCredential != nil {
+ return config.LoadDefaultConfig(ctx,
+ config.WithRegion(connCfg.DataSource.GetRegion()),
+ config.WithCredentialsProvider(credentials.NewStaticCredentialsProvider(
+ awsCredential.AccessKeyId,
+ awsCredential.SecretAccessKey,
+ awsCredential.SessionToken,
+ )),
+ )
+ }
+
+ return config.LoadDefaultConfig(ctx)
+}
+
+func GetGCPConnectionConfig(ctx context.Context, connCfg db.ConnectionConfig) (*cloudsqlconn.Dialer, error) {
+ if gcpCredential := connCfg.DataSource.GetGcpCredential(); gcpCredential != nil {
+ return cloudsqlconn.NewDialer(ctx,
+ cloudsqlconn.WithCredentialsJSON([]byte(gcpCredential.Content)),
+ )
+ }
+ return cloudsqlconn.NewDialer(ctx, cloudsqlconn.WithIAMAuthN())
+}
+
+func GetAzureConnectionConfig(connCfg db.ConnectionConfig) (azcore.TokenCredential, error) {
+ if azureCredential := connCfg.DataSource.GetAzureCredential(); azureCredential != nil {
+ c, err := azidentity.NewClientSecretCredential(azureCredential.TenantId, azureCredential.ClientId, azureCredential.ClientSecret, nil)
+ if err != nil {
+ return nil, errors.Wrapf(err, "failed to create client secret credential")
+ }
+ return c, nil
+ }
+
+ c, err := azidentity.NewDefaultAzureCredential(nil)
+ if err != nil {
+ return nil, errors.Wrapf(err, "failed to found default Azure credential")
+ }
+ return c, nil
+}
diff --git a/backend/store/instance.go b/backend/store/instance.go
index d0bbfd017c..47df159725 100644
--- a/backend/store/instance.go
+++ b/backend/store/instance.go
@@ -335,11 +335,24 @@ func (s *Store) obfuscateInstance(ctx context.Context, instance *storepb.Instanc
ds.AuthenticationPrivateKey = ""
ds.ObfuscatedMasterPassword = common.Obfuscate(ds.GetMasterPassword(), secret)
ds.MasterPassword = ""
- if ds.IamExtension != nil {
- if _, ok := ds.IamExtension.(*storepb.DataSource_ClientSecretCredential_); ok {
- ds.GetClientSecretCredential().ObfuscatedClientSecret = common.Obfuscate(ds.GetClientSecretCredential().GetClientSecret(), secret)
- ds.GetClientSecretCredential().ClientSecret = ""
- }
+
+ if azureCredential := ds.GetAzureCredential(); azureCredential != nil {
+ azureCredential.ObfuscatedClientSecret = common.Obfuscate(azureCredential.ClientSecret, secret)
+ azureCredential.ClientSecret = ""
+ }
+ if awsCredential := ds.GetAwsCredential(); awsCredential != nil {
+ awsCredential.ObfuscatedAccessKeyId = common.Obfuscate(awsCredential.AccessKeyId, secret)
+ awsCredential.AccessKeyId = ""
+
+ awsCredential.ObfuscatedSecretAccessKey = common.Obfuscate(awsCredential.SecretAccessKey, secret)
+ awsCredential.SecretAccessKey = ""
+
+ awsCredential.ObfuscatedSessionToken = common.Obfuscate(awsCredential.SessionToken, secret)
+ awsCredential.SessionToken = ""
+ }
+ if gcpCredential := ds.GetGcpCredential(); gcpCredential != nil {
+ gcpCredential.ObfuscatedContent = common.Obfuscate(gcpCredential.Content, secret)
+ gcpCredential.Content = ""
}
}
return redacted, nil
@@ -400,14 +413,40 @@ func (s *Store) unObfuscateInstance(ctx context.Context, instance *storepb.Insta
}
ds.MasterPassword = masterPassword
- if ds.IamExtension != nil {
- if _, ok := ds.IamExtension.(*storepb.DataSource_ClientSecretCredential_); ok {
- clientSecret, err := common.Unobfuscate(ds.GetClientSecretCredential().GetObfuscatedClientSecret(), secret)
- if err != nil {
- return err
- }
- ds.GetClientSecretCredential().ClientSecret = clientSecret
+ if azureCredential := ds.GetAzureCredential(); azureCredential != nil {
+ clientSecret, err := common.Unobfuscate(azureCredential.ObfuscatedClientSecret, secret)
+ if err != nil {
+ return err
+ }
+ ds.GetAzureCredential().ClientSecret = clientSecret
+ }
+
+ if awsCredential := ds.GetAwsCredential(); awsCredential != nil {
+ accessKeyID, err := common.Unobfuscate(awsCredential.ObfuscatedAccessKeyId, secret)
+ if err != nil {
+ return err
+ }
+ awsCredential.AccessKeyId = accessKeyID
+
+ secretAccessKey, err := common.Unobfuscate(awsCredential.ObfuscatedSecretAccessKey, secret)
+ if err != nil {
+ return err
+ }
+ awsCredential.SecretAccessKey = secretAccessKey
+
+ sessionToken, err := common.Unobfuscate(awsCredential.ObfuscatedSessionToken, secret)
+ if err != nil {
+ return err
+ }
+ awsCredential.SessionToken = sessionToken
+ }
+
+ if gcpCredential := ds.GetGcpCredential(); gcpCredential != nil {
+ content, err := common.Unobfuscate(gcpCredential.ObfuscatedContent, secret)
+ if err != nil {
+ return err
}
+ gcpCredential.Content = content
}
}
return nil
diff --git a/frontend/src/components/Instance/InstanceArchiveRestoreButton.vue b/frontend/src/components/Instance/InstanceArchiveRestoreButton.vue
index ffee4adc5e..866ea4e544 100644
--- a/frontend/src/components/Instance/InstanceArchiveRestoreButton.vue
+++ b/frontend/src/components/Instance/InstanceArchiveRestoreButton.vue
@@ -47,15 +47,17 @@
</template>
<script setup lang="ts">
+import { NCheckbox } from "naive-ui";
+import { computed, ref } from "vue";
+import { useI18n } from "vue-i18n";
+import { useRouter } from "vue-router";
import { restartAppRoot } from "@/AppRootContext";
import { BBButtonConfirm } from "@/bbkit";
+import { INSTANCE_ROUTE_DASHBOARD } from "@/router/dashboard/workspaceRoutes";
import { pushNotification, useInstanceV1Store } from "@/store";
import type { ComposedInstance } from "@/types";
import { State } from "@/types/proto/v1/common";
import { hasWorkspacePermissionV2 } from "@/utils";
-import { NCheckbox } from "naive-ui";
-import { computed, ref } from "vue";
-import { useI18n } from "vue-i18n";
const props = defineProps<{
instance: ComposedInstance;
@@ -63,6 +65,7 @@ const props = defineProps<{
const { t } = useI18n();
const instanceStore = useInstanceV1Store();
+const router = useRouter();
const force = ref(false);
@@ -95,5 +98,11 @@ const archiveOrRestoreInstance = async (archive: boolean) => {
}
restartAppRoot();
+
+ if (archive) {
+ router.push({
+ name: INSTANCE_ROUTE_DASHBOARD,
+ });
+ }
};
</script>
diff --git a/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue b/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue
index 3651e4317a..4f3dcf8a8b 100644
--- a/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue
+++ b/frontend/src/components/InstanceForm/DataSourceSection/DataSourceForm.vue
@@ -180,58 +180,159 @@
"
/>
</div>
- <div v-else class="mt-4 sm:col-span-3 sm:col-start-1">
+ <div
+ v-if="
+ dataSource.authenticationType ===
+ DataSource_AuthenticationType.AZURE_IAM ||
+ dataSource.authenticationType ===
+ DataSource_AuthenticationType.AWS_RDS_IAM ||
+ dataSource.authenticationType ===
+ DataSource_AuthenticationType.GOOGLE_CLOUD_SQL_IAM
+ "
+ class="mt-4 sm:col-span-3 sm:col-start-1"
+ >
<label for="credential-source" class="textlabel block">
{{ $t("instance.iam-extension.credential-source") }}
</label>
<NRadioGroup
- :value="state.credentialSource"
+ v-model:value="state.credentialSource"
class="textlabel"
:disabled="!allowEdit"
- @update:value="onSelectIAMExtension"
>
- <template
+ <NRadio
v-for="option in getIAMExtensionOptions(
DataSource_AuthenticationType.AZURE_IAM
)"
+ :value="option.value"
:key="option.value"
- >
- <NRadio :value="option.value" :label="option.label" />
- </template>
+ :label="option.label"
+ />
</NRadioGroup>
+ <template v-if="state.credentialSource === 'specific-credential'">
+ <div
+ v-if="
+ dataSource.authenticationType ===
+ DataSource_AuthenticationType.AZURE_IAM
+ "
+ class="mt-4 sm:col-span-3 sm:col-start-1"
+ >
+ <label for="tenant-id" class="textlabel block mt-2">
+ {{ $t("instance.iam-extension.tenant-id") }}
+ </label>
+ <NInput
+ v-model:value="dataSource.azureCredential!.tenantId"
+ class="mt-2 w-full"
+ :disabled="!allowEdit"
+ :placeholder="''"
+ />
+ <label for="client-id" class="textlabel block mt-2">
+ {{ $t("instance.iam-extension.client-id") }}
+ </label>
+ <NInput
+ v-model:value="dataSource.azureCredential!.clientId"
+ class="mt-2 w-full"
+ :disabled="!allowEdit"
+ :placeholder="''"
+ />
+ <label for="client-secret" class="textlabel block mt-2">
+ {{ $t("instance.iam-extension.client-secret") }}
+ </label>
+ <NInput
+ type="password"
+ show-password-on="click"
+ v-model:value="dataSource.azureCredential!.clientSecret"
+ class="mt-2 w-full"
+ :disabled="!allowEdit"
+ :placeholder="$t('instance.type-or-paste-credentials-write-only')"
+ />
+ </div>
+ <div
+ v-else-if="
+ dataSource.authenticationType ===
+ DataSource_AuthenticationType.GOOGLE_CLOUD_SQL_IAM
+ "
+ class="mt-4 sm:col-span-3 sm:col-start-1"
+ >
+ <label class="textlabel block mt-2"> Credential File Content</label>
+ <NInput
+ v-model:value="dataSource.gcpCredential!.content"
+ type="textarea"
+ class="mt-2 w-full"
+ :disabled="!allowEdit"
+ :placeholder="$t('instance.type-or-paste-credentials-write-only')"
+ />
+ </div>
+ <div
+ v-else-if="
+ dataSource.authenticationType ===
+ DataSource_AuthenticationType.AWS_RDS_IAM
+ "
+ class="mt-4 sm:col-span-3 sm:col-start-1"
+ >
+ <label class="textlabel block mt-2"> Access Key ID </label>
+ <NInput
+ v-model:value="dataSource.awsCredential!.accessKeyId"
+ class="mt-2 w-full"
+ :disabled="!allowEdit"
+ :placeholder="$t('common.write-only')"
+ />
+ <label class="textlabel block mt-2"> Secret Access Key </label>
+ <NInput
+ v-model:value="dataSource.awsCredential!.secretAccessKey"
+ class="mt-2 w-full"
+ :disabled="!allowEdit"
+ :placeholder="$t('common.write-only')"
+ />
+ <label class="textlabel block mt-2"> Session Token </label>
+ <NInput
+ v-model:value="dataSource.awsCredential!.sessionToken"
+ class="mt-2 w-full"
+ :disabled="!allowEdit"
+ :placeholder="$t('common.write-only')"
+ />
+ </div>
+ </template>
<div
- v-if="state.credentialSource === 'client-secret-credential'"
- class="mt-4 sm:col-span-3 sm:col-start-1"
+ v-else-if="state.credentialSource === 'default'"
+ class="mt-1 sm:col-span-3 sm:col-start-1 textinfolabel !leading-6 credential"
>
- <label for="tenant-id" class="textlabel block mt-2">
- {{ $t("instance.iam-extension.tenant-id") }}
- </label>
- <NInput
- v-model:value="dataSource.clientSecretCredential!.tenantId"
- class="mt-2 w-full"
- :disabled="!allowEdit"
- :placeholder="''"
- />
- <label for="client-id" class="textlabel block mt-2">
- {{ $t("instance.iam-extension.client-id") }}
- </label>
- <NInput
- v-model:value="dataSource.clientSecretCredential!.clientId"
- class="mt-2 w-full"
- :disabled="!allowEdit"
- :placeholder="''"
- />
- <label for="client-secret" class="textlabel block mt-2">
- {{ $t("instance.iam-extension.client-secret") }}
- </label>
- <NInput
- type="password"
- show-password-on="click"
- v-model:value="dataSource.clientSecretCredential!.clientSecret"
- class="mt-2 w-full"
- :disabled="!allowEdit"
- :placeholder="$t('instance.type-or-paste-credentials-write-only')"
- />
+ <span
+ v-if="
+ dataSource.authenticationType ===
+ DataSource_AuthenticationType.AZURE_IAM
+ "
+ >
+ Bytebase will read the credential from environment variables
+ <code class="code">AZURE_CLIENT_ID</code>/
+ <code class="code">AZURE_TENANT_ID</code>/
+ <code class="code">AZURE_CLIENT_SECRET</code>
+ or
+ <code class="code">AZURE_CLIENT_CERTIFICATE_PATH</code>, and
+ fallback to attached users in Azure VM
+ </span>
+ <span
+ v-else-if="
+ dataSource.authenticationType ===
+ DataSource_AuthenticationType.AWS_RDS_IAM
+ "
+ >
+ Bytebase will read the credential from environment variables
+ <code class="code">AWS_ACCESS_KEY_ID</code>/
+ <code class="code">AWS_SECRET_ACCESS_KEY</code>/
+ <code class="code">AWS_SESSION_TOKEN</code>, fallback to shared
+ credentials file <code class="code">~/.aws/credentials</code> or IAM
+ role in AWS ECS
+ </span>
+ <span
+ v-else-if="
+ dataSource.authenticationType ===
+ DataSource_AuthenticationType.GOOGLE_CLOUD_SQL_IAM
+ "
+ >
+ Bytebase will read the credential from environment variable
+ <code class="code">GOOGLE_APPLICATION_CREDENTIALS</code>, fallback
+ to the attached service account in GCP GCE
+ </span>
</div>
</div>
<div
@@ -986,6 +1087,7 @@ MIIEvQ...
</template>
<script setup lang="ts">
+/* eslint-disable vue/no-mutating-props */
import {
NButton,
NCheckbox,
@@ -1004,6 +1106,7 @@ import { FeatureBadge } from "@/components/FeatureGuard";
import LearnMoreLink from "@/components/LearnMoreLink.vue";
import DroppableTextarea from "@/components/misc/DroppableTextarea.vue";
import type { DataSourceOptions } from "@/types/dataSource";
+import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { Engine } from "@/types/proto/v1/common";
import type { DataSource } from "@/types/proto/v1/instance_service";
import {
@@ -1014,12 +1117,13 @@ import {
DataSourceExternalSecret_SecretType,
DataSourceType,
DataSource_AuthenticationType,
- DataSource_ClientSecretCredential,
+ DataSource_AzureCredential,
+ DataSource_AWSCredential,
+ DataSource_GCPCredential,
DataSource_RedisType,
KerberosConfig,
SASLConfig,
} from "@/types/proto/v1/instance_service";
-import { PlanFeature } from "@/types/proto-es/v1/subscription_service_pb";
import { onlyAllowNumber } from "@/utils";
import type { EditDataSource } from "../common";
import { useInstanceFormContext } from "../context";
@@ -1029,14 +1133,16 @@ import OracleSIDAndServiceNameInput from "./OracleSIDAndServiceNameInput.vue";
import SshConnectionForm from "./SshConnectionForm.vue";
import SslCertificateFormV1 from "./SslCertificateFormV1.vue";
+type credentialSource = "default" | "specific-credential";
+
interface LocalState {
passwordType: DataSourceExternalSecret_SecretType;
- credentialSource: string;
+ credentialSource: credentialSource;
}
interface IAMExtensionOptions {
label: string;
- value: string;
+ value: credentialSource;
}
interface ExtraConnectionParam {
@@ -1073,7 +1179,7 @@ const {
const state = reactive<LocalState>({
passwordType: DataSourceExternalSecret_SecretType.SAECRET_TYPE_UNSPECIFIED,
- credentialSource: "default-credential",
+ credentialSource: "default",
});
// Use a simpler approach to track new parameters
@@ -1103,17 +1209,63 @@ watch(
);
watch(
- () => props.dataSource.clientSecretCredential,
- (clientSecretCredential) => {
- if (clientSecretCredential) {
- state.credentialSource = "client-secret-credential";
+ [
+ () => props.dataSource.azureCredential,
+ () => props.dataSource.awsCredential,
+ () => props.dataSource.gcpCredential,
+ ],
+ (credentials) => {
+ if (credentials.some((c) => c !== undefined)) {
+ state.credentialSource = "specific-credential";
} else {
- state.credentialSource = "default-credential";
+ state.credentialSource = "default";
}
},
{ immediate: true, deep: true }
);
+watch(
+ () => props.dataSource.authenticationType,
+ () => {
+ state.credentialSource = "default";
+ }
+);
+
+watch(
+ () => state.credentialSource,
+ (source) => {
+ switch (props.dataSource.authenticationType) {
+ case DataSource_AuthenticationType.AWS_RDS_IAM:
+ if (source === "default") {
+ props.dataSource.awsCredential = undefined;
+ } else {
+ props.dataSource.awsCredential = DataSource_AWSCredential.create(
+ props.dataSource.awsCredential
+ );
+ }
+ break;
+ case DataSource_AuthenticationType.GOOGLE_CLOUD_SQL_IAM:
+ if (source === "default") {
+ props.dataSource.gcpCredential = undefined;
+ } else {
+ props.dataSource.gcpCredential = DataSource_GCPCredential.create(
+ props.dataSource.gcpCredential
+ );
+ }
+ break;
+ case DataSource_AuthenticationType.AZURE_IAM:
+ if (source === "default") {
+ props.dataSource.azureCredential = undefined;
+ } else {
+ props.dataSource.azureCredential = DataSource_AzureCredential.create(
+ props.dataSource.azureCredential
+ );
+ }
+ break;
+ }
+ }
+);
+
const hiveAuthentication = computed(() => {
return props.dataSource.saslConfig?.krbConfig ? "KERBEROS" : "PASSWORD";
});
@@ -1340,35 +1492,24 @@ const handleKeytabUpload = (options: { file: UploadFileInfo }) => {
const getIAMExtensionOptions = (
authenticationType: DataSource_AuthenticationType
): IAMExtensionOptions[] => {
- if (authenticationType == DataSource_AuthenticationType.AZURE_IAM) {
- return [
- {
- label: "Default",
- value: "default-credential",
- },
- {
- label: "Client Secret Credential",
- value: "client-secret-credential",
- },
- ];
+ switch (authenticationType) {
+ case DataSource_AuthenticationType.AWS_RDS_IAM:
+ case DataSource_AuthenticationType.AZURE_IAM:
+ case DataSource_AuthenticationType.GOOGLE_CLOUD_SQL_IAM:
+ return [
+ {
+ label: t("common.default"),
+ value: "default",
+ },
+ {
+ label: t("instance.iam-extension.specific-credential"),
+ value: "specific-credential",
+ },
+ ];
}
return [];
};
-const onSelectIAMExtension = (value: string) => {
- state.credentialSource = value;
- resetIAMExtension();
- if (value === "client-secret-credential") {
- const ds = props.dataSource;
- ds.clientSecretCredential = DataSource_ClientSecretCredential.create();
- }
-};
-
-const resetIAMExtension = () => {
- const ds = props.dataSource;
- ds.clientSecretCredential = undefined;
-};
-
// Extra connection parameters management
const addNewParameter = () => {
// Skip if key is empty
@@ -1471,3 +1612,9 @@ const removeExtraConnectionParam = (index: number) => {
ds.extraConnectionParameters = plainParams;
};
</script>
+
+<style lang="postcss" scoped>
+.credential :deep(.code) {
+ @apply bg-gray-100 p-1 rounded-sm mr-1;
+}
+</style>
diff --git a/frontend/src/components/Project/ProjectArchiveRestoreButton.vue b/frontend/src/components/Project/ProjectArchiveRestoreButton.vue
index 336ccd3360..45a3ae15dd 100644
--- a/frontend/src/components/Project/ProjectArchiveRestoreButton.vue
+++ b/frontend/src/components/Project/ProjectArchiveRestoreButton.vue
@@ -40,8 +40,10 @@
<script setup lang="ts">
import { NCheckbox } from "naive-ui";
import { computed, ref } from "vue";
+import { useRouter } from "vue-router";
import { restartAppRoot } from "@/AppRootContext";
import { BBButtonConfirm } from "@/bbkit";
+import { PROJECT_V1_ROUTE_DASHBOARD } from "@/router/dashboard/workspaceRoutes";
import { useProjectV1Store } from "@/store";
import type { ComposedProject } from "@/types";
import { State } from "@/types/proto/v1/common";
@@ -52,6 +54,7 @@ const props = defineProps<{
}>();
const projectV1Store = useProjectV1Store();
+const router = useRouter();
const force = ref(false);
@@ -70,5 +73,11 @@ const archiveOrRestoreProject = async (archive: boolean) => {
}
restartAppRoot();
+
+ if (archive) {
+ router.push({
+ name: PROJECT_V1_ROUTE_DASHBOARD,
+ });
+ }
};
</script>
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index 1a8ac3e968..46ce8bafcb 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -1267,7 +1267,8 @@
"credential-source": "Credential Source",
"tenant-id": "Tenant ID",
"client-id": "Client ID",
- "client-secret": "Client Secret"
+ "client-secret": "Client Secret",
+ "specific-credential": "Specific Credential"
},
"database-region": "Database Region",
"external-secret-gcp": {
@@ -2729,10 +2730,8 @@
"vcs-type": {
"unspecified": "Unspecified"
},
- "actions": {
- },
- "messages": {
- },
+ "actions": {},
+ "messages": {},
"usage-description": "The release is only used in custom GitOps with API integration."
},
"export-data": {
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index 72838fab18..ffb8c11b3b 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -1267,7 +1267,8 @@
"credential-source": "Credential Source",
"tenant-id": "Tenant ID",
"client-id": "Client ID",
- "client-secret": "Client Secret"
+ "client-secret": "Client Secret",
+ "specific-credential": "Credencial específica"
},
"database-region": "Región de la base de datos",
"external-secret-gcp": {
@@ -2729,10 +2730,8 @@
"vcs-type": {
"unspecified": "No especificado"
},
- "actions": {
- },
- "messages": {
- },
+ "actions": {},
+ "messages": {},
"usage-description": "El lanzamiento solo se utiliza en GitOps personalizado con integración de API."
},
"export-data": {
diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.json
index 3b5cd1a0e2..faee8dbe34 100644
--- a/frontend/src/locales/ja-JP.json
+++ b/frontend/src/locales/ja-JP.json
@@ -1267,7 +1267,8 @@
"credential-source": "Credential Source",
"tenant-id": "Tenant ID",
"client-id": "Client ID",
- "client-secret": "Client Secret"
+ "client-secret": "Client Secret",
+ "specific-credential": "特定の資格情報"
},
"database-region": "データベース領域",
"external-secret-gcp": {
@@ -2729,10 +2730,8 @@
"vcs-type": {
"unspecified": "未指定"
},
- "actions": {
- },
- "messages": {
- },
+ "actions": {},
+ "messages": {},
"usage-description": "このリリースは、API統合を使用したカスタムGitOpsでのみ使用されます。"
},
"export-data": {
diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.json
index 777be1c5c7..a5a546130c 100644
--- a/frontend/src/locales/vi-VN.json
+++ b/frontend/src/locales/vi-VN.json
@@ -1267,7 +1267,8 @@
"credential-source": "Credential Source",
"tenant-id": "Tenant ID",
"client-id": "Client ID",
- "client-secret": "Client Secret"
+ "client-secret": "Client Secret",
+ "specific-credential": "Chứng chỉ cụ thể"
},
"database-region": "Khu vực cơ sở dữ liệu",
"external-secret-gcp": {
@@ -2729,10 +2730,8 @@
"vcs-type": {
"unspecified": "Không xác định"
},
- "actions": {
- },
- "messages": {
- },
+ "actions": {},
+ "messages": {},
"usage-description": "Bản phát hành chỉ được sử dụng trong GitOps tùy chỉnh với tích hợp API."
},
"export-data": {
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 0acc53466c..0e117332f7 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -1264,10 +1264,11 @@
"external-secret-gcp": "GCP Secret Manager"
},
"iam-extension": {
- "credential-source": "Credential Source",
+ "credential-source": "凭证来源",
"tenant-id": "Tenant ID",
"client-id": "Client ID",
- "client-secret": "Client Secret"
+ "client-secret": "Client Secret",
+ "specific-credential": "指定凭证"
},
"database-region": "数据库区域",
"external-secret-gcp": {
@@ -2729,10 +2730,8 @@
"vcs-type": {
"unspecified": "未指定"
},
- "actions": {
- },
- "messages": {
- },
+ "actions": {},
+ "messages": {},
"usage-description": "发布包仅用于自定义的 GitOps 与 Bytebase API 集成。"
},
"export-data": {
@@ -2788,4 +2787,4 @@
"last-visit": "上次访问",
"changelog-for-version": "{version} 的更新日志"
}
-}
\ No newline at end of file
+}
diff --git a/frontend/src/types/proto-es/v1/instance_service_pb.d.ts b/frontend/src/types/proto-es/v1/instance_service_pb.d.ts
index 334767a579..d2f7f58e5a 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
@@ -941,10 +941,22 @@ export declare type DataSource = Message<"bytebase.v1.DataSource"> & {
*/
iamExtension: {
/**
- * @generated from field: bytebase.v1.DataSource.ClientSecretCredential client_secret_credential = 23;
+ * @generated from field: bytebase.v1.DataSource.AzureCredential azure_credential = 23;
*/
- value: DataSource_ClientSecretCredential;
- case: "clientSecretCredential";
+ value: DataSource_AzureCredential;
+ case: "azureCredential";
+ } | {
+ /**
+ * @generated from field: bytebase.v1.DataSource.AWSCredential aws_credential = 37;
+ */
+ value: DataSource_AWSCredential;
+ case: "awsCredential";
+ } | {
+ /**
+ * @generated from field: bytebase.v1.DataSource.GCPCredential gcp_credential = 38;
+ */
+ value: DataSource_GCPCredential;
+ case: "gcpCredential";
} | { case: undefined; value?: undefined };
/**
@@ -1027,9 +1039,9 @@ export declare type DataSource = Message<"bytebase.v1.DataSource"> & {
export declare const DataSourceSchema: GenMessage<DataSource>;
/**
- * @generated from message bytebase.v1.DataSource.ClientSecretCredential
+ * @generated from message bytebase.v1.DataSource.AzureCredential
*/
-export declare type DataSource_ClientSecretCredential = Message<"bytebase.v1.DataSource.ClientSecretCredential"> & {
+export declare type DataSource_AzureCredential = Message<"bytebase.v1.DataSource.AzureCredential"> & {
/**
* @generated from field: string tenant_id = 1;
*/
@@ -1047,10 +1059,52 @@ export declare type DataSource_ClientSecretCredential = Message<"bytebase.v1.Dat
};
/**
- * Describes the message bytebase.v1.DataSource.ClientSecretCredential.
- * Use `create(DataSource_ClientSecretCredentialSchema)` to create a new message.
+ * Describes the message bytebase.v1.DataSource.AzureCredential.
+ * Use `create(DataSource_AzureCredentialSchema)` to create a new message.
+ */
+export declare const DataSource_AzureCredentialSchema: GenMessage<DataSource_AzureCredential>;
+
+/**
+ * @generated from message bytebase.v1.DataSource.AWSCredential
+ */
+export declare type DataSource_AWSCredential = Message<"bytebase.v1.DataSource.AWSCredential"> & {
+ /**
+ * @generated from field: string access_key_id = 1;
+ */
+ accessKeyId: string;
+
+ /**
+ * @generated from field: string secret_access_key = 2;
+ */
+ secretAccessKey: string;
+
+ /**
+ * @generated from field: string session_token = 3;
+ */
+ sessionToken: string;
+};
+
+/**
+ * Describes the message bytebase.v1.DataSource.AWSCredential.
+ * Use `create(DataSource_AWSCredentialSchema)` to create a new message.
+ */
+export declare const DataSource_AWSCredentialSchema: GenMessage<DataSource_AWSCredential>;
+
+/**
+ * @generated from message bytebase.v1.DataSource.GCPCredential
+ */
+export declare type DataSource_GCPCredential = Message<"bytebase.v1.DataSource.GCPCredential"> & {
+ /**
+ * @generated from field: string content = 1;
+ */
+ content: string;
+};
+
+/**
+ * Describes the message bytebase.v1.DataSource.GCPCredential.
+ * Use `create(DataSource_GCPCredentialSchema)` to create a new message.
*/
-export declare const DataSource_ClientSecretCredentialSchema: GenMessage<DataSource_ClientSecretCredential>;
+export declare const DataSource_GCPCredentialSchema: GenMessage<DataSource_GCPCredential>;
/**
* @generated from message bytebase.v1.DataSource.Address
diff --git a/frontend/src/types/proto-es/v1/instance_service_pb.js b/frontend/src/types/proto-es/v1/instance_service_pb.js
index da48da7ef4..74b68dd207 100644
--- a/frontend/src/types/proto-es/v1/instance_service_pb.js
+++ b/frontend/src/types/proto-es/v1/instance_service_pb.js
@@ -16,7 +16,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("Chl2MS9pbnN0YW5jZV9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSJCChJHZXRJbnN0YW5jZVJlcXVlc3QSLAoEbmFtZRgBIAEoCUIe4kEBAvpBFwoVYnl0ZWJhc2UuY29tL0luc3RhbmNlImMKFExpc3RJbnN0YW5jZXNSZXF1ZXN0EhEKCXBhZ2Vfc2l6ZRgBIAEoBRISCgpwYWdlX3Rva2VuGAIgASgJEhQKDHNob3dfZGVsZXRlZBgDIAEoCBIOCgZmaWx0ZXIYBCABKAkiWgoVTGlzdEluc3RhbmNlc1Jlc3BvbnNlEigKCWluc3RhbmNlcxgBIAMoCzIVLmJ5dGViYXNlLnYxLkluc3RhbmNlEhcKD25leHRfcGFnZV90b2tlbhgCIAEoCSJyChVDcmVhdGVJbnN0YW5jZVJlcXVlc3QSLQoIaW5zdGFuY2UYASABKAsyFS5ieXRlYmF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YXRjaFVwZGF0ZRKZAQoNQWRkRGF0YVNvdXJjZRIhLmJ5dGViYXNlLnYxLkFkZERhdGFTb3VyY2VSZXF1ZXN0GhUuYnl0ZWJhc2UudjEuSW5zdGFuY2UiTorqMBNiYi5pbnN0YW5jZXMudXBkYXRlkOowAZjqMAGC0+STAik6ASoiJC92MS97bmFtZT1pbnN0YW5jZXMvKn06YWRkRGF0YVNvdXJjZRKiAQoQUmVtb3ZlRGF0YVNvdXJjZRIkLmJ5dGViYXNlLnYxLlJlbW92ZURhdGFTb3VyY2VSZXF1ZXN0GhUuYnl0ZWJhc2UudjEuSW5zdGFuY2UiUYrqMBNiYi5pbnN0YW5jZXMudXBkYXRlkOowAZjqMAGC0+STAiw6ASoiJy92MS97bmFtZT1pbnN0YW5jZXMvKn06cmVtb3ZlRGF0YVNvdXJjZRKiAQoQVXBkYXRlRGF0YVNvdXJjZRIkLmJ5dGViYXNlLnYxLlVwZGF0ZURhdGFTb3VyY2VSZXF1ZXN0GhUuYnl0ZWJhc2UudjEuSW5zdGFuY2UiUYrqMBNiYi5pbnN0YW5jZXMudXBkYXRlkOowAZjqMAGC0+STAiw6ASoyJy92MS97bmFtZT1pbnN0YW5jZXMvKn06dXBkYXRlRGF0YVNvdXJjZUI0WjJnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL3Byb3RvL2dlbmVyYXRlZC1nby92MWIGcHJvdG8z", [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("Chl2MS9pbnN0YW5jZV9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSJCChJHZXRJbnN0YW5jZVJlcXVlc3QSLAoEbmFtZRgBIAEoCUIe4kEBAvpBFwoVYnl0ZWJhc2UuY29tL0luc3RhbmNlImMKFExpc3RJbnN0YW5jZXNSZXF1ZXN0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ZURhdGFTb3VyY2USogEKEFVwZGF0ZURhdGFTb3VyY2USJC5ieXRlYmFzZS52MS5VcGRhdGVEYXRhU291cmNlUmVxdWVzdBoVLmJ5dGViYXNlLnYxLkluc3RhbmNlIlGK6jATYmIuaW5zdGFuY2VzLnVwZGF0ZZDqMAGY6jABgtPkkwIsOgEqMicvdjEve25hbWU9aW5zdGFuY2VzLyp9OnVwZGF0ZURhdGFTb3VyY2VCNFoyZ2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9wcm90by9nZW5lcmF0ZWQtZ28vdjFiBnByb3RvMw", [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.
@@ -209,18 +209,32 @@ export const DataSourceSchema = /*@__PURE__*/
messageDesc(file_v1_instance_service, 20);
/**
- * Describes the message bytebase.v1.DataSource.ClientSecretCredential.
- * Use `create(DataSource_ClientSecretCredentialSchema)` to create a new message.
+ * Describes the message bytebase.v1.DataSource.AzureCredential.
+ * Use `create(DataSource_AzureCredentialSchema)` to create a new message.
*/
-export const DataSource_ClientSecretCredentialSchema = /*@__PURE__*/
+export const DataSource_AzureCredentialSchema = /*@__PURE__*/
messageDesc(file_v1_instance_service, 20, 0);
+/**
+ * Describes the message bytebase.v1.DataSource.AWSCredential.
+ * Use `create(DataSource_AWSCredentialSchema)` to create a new message.
+ */
+export const DataSource_AWSCredentialSchema = /*@__PURE__*/
+ messageDesc(file_v1_instance_service, 20, 1);
+
+/**
+ * Describes the message bytebase.v1.DataSource.GCPCredential.
+ * Use `create(DataSource_GCPCredentialSchema)` to create a new message.
+ */
+export const DataSource_GCPCredentialSchema = /*@__PURE__*/
+ messageDesc(file_v1_instance_service, 20, 2);
+
/**
* Describes the message bytebase.v1.DataSource.Address.
* Use `create(DataSource_AddressSchema)` to create a new message.
*/
export const DataSource_AddressSchema = /*@__PURE__*/
- messageDesc(file_v1_instance_service, 20, 1);
+ messageDesc(file_v1_instance_service, 20, 3);
/**
* Describes the enum bytebase.v1.DataSource.AuthenticationType.
diff --git a/frontend/src/types/proto/v1/instance_service.ts b/frontend/src/types/proto/v1/instance_service.ts
index 14319f8c57..34aea8d925 100644
--- a/frontend/src/types/proto/v1/instance_service.ts
+++ b/frontend/src/types/proto/v1/instance_service.ts
@@ -592,7 +592,9 @@ export interface DataSource {
authenticationPrivateKey: string;
externalSecret: DataSourceExternalSecret | undefined;
authenticationType: DataSource_AuthenticationType;
- clientSecretCredential?: DataSource_ClientSecretCredential | undefined;
+ azureCredential?: DataSource_AzureCredential | undefined;
+ awsCredential?: DataSource_AWSCredential | undefined;
+ gcpCredential?: DataSource_GCPCredential | undefined;
saslConfig:
| SASLConfig
| undefined;
@@ -749,12 +751,22 @@ export function dataSource_RedisTypeToNumber(object: DataSource_RedisType): numb
}
}
-export interface DataSource_ClientSecretCredential {
+export interface DataSource_AzureCredential {
tenantId: string;
clientId: string;
clientSecret: string;
}
+export interface DataSource_AWSCredential {
+ accessKeyId: string;
+ secretAccessKey: string;
+ sessionToken: string;
+}
+
+export interface DataSource_GCPCredential {
+ content: string;
+}
+
export interface DataSource_Address {
host: string;
port: string;
@@ -2757,7 +2769,9 @@ function createBaseDataSource(): DataSource {
authenticationPrivateKey: "",
externalSecret: undefined,
authenticationType: DataSource_AuthenticationType.AUTHENTICATION_UNSPECIFIED,
- clientSecretCredential: undefined,
+ azureCredential: undefined,
+ awsCredential: undefined,
+ gcpCredential: undefined,
saslConfig: undefined,
additionalAddresses: [],
directConnection: false,
@@ -2846,8 +2860,14 @@ export const DataSource: MessageFns<DataSource> = {
if (message.authenticationType !== DataSource_AuthenticationType.AUTHENTICATION_UNSPECIFIED) {
writer.uint32(176).int32(dataSource_AuthenticationTypeToNumber(message.authenticationType));
}
- if (message.clientSecretCredential !== undefined) {
- DataSource_ClientSecretCredential.encode(message.clientSecretCredential, writer.uint32(186).fork()).join();
+ if (message.azureCredential !== undefined) {
+ DataSource_AzureCredential.encode(message.azureCredential, writer.uint32(186).fork()).join();
+ }
+ if (message.awsCredential !== undefined) {
+ DataSource_AWSCredential.encode(message.awsCredential, writer.uint32(298).fork()).join();
+ }
+ if (message.gcpCredential !== undefined) {
+ DataSource_GCPCredential.encode(message.gcpCredential, writer.uint32(306).fork()).join();
}
if (message.saslConfig !== undefined) {
SASLConfig.encode(message.saslConfig, writer.uint32(194).fork()).join();
@@ -3089,7 +3109,23 @@ export const DataSource: MessageFns<DataSource> = {
break;
}
- message.clientSecretCredential = DataSource_ClientSecretCredential.decode(reader, reader.uint32());
+ message.azureCredential = DataSource_AzureCredential.decode(reader, reader.uint32());
+ continue;
+ }
+ case 37: {
+ if (tag !== 298) {
+ break;
+ }
+
+ message.awsCredential = DataSource_AWSCredential.decode(reader, reader.uint32());
+ continue;
+ }
+ case 38: {
+ if (tag !== 306) {
+ break;
+ }
+
+ message.gcpCredential = DataSource_GCPCredential.decode(reader, reader.uint32());
continue;
}
case 24: {
@@ -3226,9 +3262,11 @@ export const DataSource: MessageFns<DataSource> = {
authenticationType: isSet(object.authenticationType)
? dataSource_AuthenticationTypeFromJSON(object.authenticationType)
: DataSource_AuthenticationType.AUTHENTICATION_UNSPECIFIED,
- clientSecretCredential: isSet(object.clientSecretCredential)
- ? DataSource_ClientSecretCredential.fromJSON(object.clientSecretCredential)
+ azureCredential: isSet(object.azureCredential)
+ ? DataSource_AzureCredential.fromJSON(object.azureCredential)
: undefined,
+ awsCredential: isSet(object.awsCredential) ? DataSource_AWSCredential.fromJSON(object.awsCredential) : undefined,
+ gcpCredential: isSet(object.gcpCredential) ? DataSource_GCPCredential.fromJSON(object.gcpCredential) : undefined,
saslConfig: isSet(object.saslConfig) ? SASLConfig.fromJSON(object.saslConfig) : undefined,
additionalAddresses: globalThis.Array.isArray(object?.additionalAddresses)
? object.additionalAddresses.map((e: any) => DataSource_Address.fromJSON(e))
@@ -3326,8 +3364,14 @@ export const DataSource: MessageFns<DataSource> = {
if (message.authenticationType !== DataSource_AuthenticationType.AUTHENTICATION_UNSPECIFIED) {
obj.authenticationType = dataSource_AuthenticationTypeToJSON(message.authenticationType);
}
- if (message.clientSecretCredential !== undefined) {
- obj.clientSecretCredential = DataSource_ClientSecretCredential.toJSON(message.clientSecretCredential);
+ if (message.azureCredential !== undefined) {
+ obj.azureCredential = DataSource_AzureCredential.toJSON(message.azureCredential);
+ }
+ if (message.awsCredential !== undefined) {
+ obj.awsCredential = DataSource_AWSCredential.toJSON(message.awsCredential);
+ }
+ if (message.gcpCredential !== undefined) {
+ obj.gcpCredential = DataSource_GCPCredential.toJSON(message.gcpCredential);
}
if (message.saslConfig !== undefined) {
obj.saslConfig = SASLConfig.toJSON(message.saslConfig);
@@ -3402,10 +3446,15 @@ export const DataSource: MessageFns<DataSource> = {
? DataSourceExternalSecret.fromPartial(object.externalSecret)
: undefined;
message.authenticationType = object.authenticationType ?? DataSource_AuthenticationType.AUTHENTICATION_UNSPECIFIED;
- message.clientSecretCredential =
- (object.clientSecretCredential !== undefined && object.clientSecretCredential !== null)
- ? DataSource_ClientSecretCredential.fromPartial(object.clientSecretCredential)
- : undefined;
+ message.azureCredential = (object.azureCredential !== undefined && object.azureCredential !== null)
+ ? DataSource_AzureCredential.fromPartial(object.azureCredential)
+ : undefined;
+ message.awsCredential = (object.awsCredential !== undefined && object.awsCredential !== null)
+ ? DataSource_AWSCredential.fromPartial(object.awsCredential)
+ : undefined;
+ message.gcpCredential = (object.gcpCredential !== undefined && object.gcpCredential !== null)
+ ? DataSource_GCPCredential.fromPartial(object.gcpCredential)
+ : undefined;
message.saslConfig = (object.saslConfig !== undefined && object.saslConfig !== null)
? SASLConfig.fromPartial(object.saslConfig)
: undefined;
@@ -3430,12 +3479,12 @@ export const DataSource: MessageFns<DataSource> = {
},
};
-function createBaseDataSource_ClientSecretCredential(): DataSource_ClientSecretCredential {
+function createBaseDataSource_AzureCredential(): DataSource_AzureCredential {
return { tenantId: "", clientId: "", clientSecret: "" };
}
-export const DataSource_ClientSecretCredential: MessageFns<DataSource_ClientSecretCredential> = {
- encode(message: DataSource_ClientSecretCredential, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+export const DataSource_AzureCredential: MessageFns<DataSource_AzureCredential> = {
+ encode(message: DataSource_AzureCredential, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
if (message.tenantId !== "") {
writer.uint32(10).string(message.tenantId);
}
@@ -3448,10 +3497,10 @@ export const DataSource_ClientSecretCredential: MessageFns<DataSource_ClientSecr
return writer;
},
- decode(input: BinaryReader | Uint8Array, length?: number): DataSource_ClientSecretCredential {
+ decode(input: BinaryReader | Uint8Array, length?: number): DataSource_AzureCredential {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
- const message = createBaseDataSource_ClientSecretCredential();
+ const message = createBaseDataSource_AzureCredential();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
@@ -3488,7 +3537,7 @@ export const DataSource_ClientSecretCredential: MessageFns<DataSource_ClientSecr
return message;
},
- fromJSON(object: any): DataSource_ClientSecretCredential {
+ fromJSON(object: any): DataSource_AzureCredential {
return {
tenantId: isSet(object.tenantId) ? globalThis.String(object.tenantId) : "",
clientId: isSet(object.clientId) ? globalThis.String(object.clientId) : "",
@@ -3496,7 +3545,7 @@ export const DataSource_ClientSecretCredential: MessageFns<DataSource_ClientSecr
};
},
- toJSON(message: DataSource_ClientSecretCredential): unknown {
+ toJSON(message: DataSource_AzureCredential): unknown {
const obj: any = {};
if (message.tenantId !== "") {
obj.tenantId = message.tenantId;
@@ -3510,11 +3559,11 @@ export const DataSource_ClientSecretCredential: MessageFns<DataSource_ClientSecr
return obj;
},
- create(base?: DeepPartial<DataSource_ClientSecretCredential>): DataSource_ClientSecretCredential {
- return DataSource_ClientSecretCredential.fromPartial(base ?? {});
+ create(base?: DeepPartial<DataSource_AzureCredential>): DataSource_AzureCredential {
+ return DataSource_AzureCredential.fromPartial(base ?? {});
},
- fromPartial(object: DeepPartial<DataSource_ClientSecretCredential>): DataSource_ClientSecretCredential {
- const message = createBaseDataSource_ClientSecretCredential();
+ fromPartial(object: DeepPartial<DataSource_AzureCredential>): DataSource_AzureCredential {
+ const message = createBaseDataSource_AzureCredential();
message.tenantId = object.tenantId ?? "";
message.clientId = object.clientId ?? "";
message.clientSecret = object.clientSecret ?? "";
@@ -3522,6 +3571,156 @@ export const DataSource_ClientSecretCredential: MessageFns<DataSource_ClientSecr
},
};
+function createBaseDataSource_AWSCredential(): DataSource_AWSCredential {
+ return { accessKeyId: "", secretAccessKey: "", sessionToken: "" };
+}
+
+export const DataSource_AWSCredential: MessageFns<DataSource_AWSCredential> = {
+ encode(message: DataSource_AWSCredential, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.accessKeyId !== "") {
+ writer.uint32(10).string(message.accessKeyId);
+ }
+ if (message.secretAccessKey !== "") {
+ writer.uint32(18).string(message.secretAccessKey);
+ }
+ if (message.sessionToken !== "") {
+ writer.uint32(26).string(message.sessionToken);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): DataSource_AWSCredential {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseDataSource_AWSCredential();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 10) {
+ break;
+ }
+
+ message.accessKeyId = reader.string();
+ continue;
+ }
+ case 2: {
+ if (tag !== 18) {
+ break;
+ }
+
+ message.secretAccessKey = reader.string();
+ continue;
+ }
+ case 3: {
+ if (tag !== 26) {
+ break;
+ }
+
+ message.sessionToken = reader.string();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): DataSource_AWSCredential {
+ return {
+ accessKeyId: isSet(object.accessKeyId) ? globalThis.String(object.accessKeyId) : "",
+ secretAccessKey: isSet(object.secretAccessKey) ? globalThis.String(object.secretAccessKey) : "",
+ sessionToken: isSet(object.sessionToken) ? globalThis.String(object.sessionToken) : "",
+ };
+ },
+
+ toJSON(message: DataSource_AWSCredential): unknown {
+ const obj: any = {};
+ if (message.accessKeyId !== "") {
+ obj.accessKeyId = message.accessKeyId;
+ }
+ if (message.secretAccessKey !== "") {
+ obj.secretAccessKey = message.secretAccessKey;
+ }
+ if (message.sessionToken !== "") {
+ obj.sessionToken = message.sessionToken;
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial<DataSource_AWSCredential>): DataSource_AWSCredential {
+ return DataSource_AWSCredential.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial<DataSource_AWSCredential>): DataSource_AWSCredential {
+ const message = createBaseDataSource_AWSCredential();
+ message.accessKeyId = object.accessKeyId ?? "";
+ message.secretAccessKey = object.secretAccessKey ?? "";
+ message.sessionToken = object.sessionToken ?? "";
+ return message;
+ },
+};
+
+function createBaseDataSource_GCPCredential(): DataSource_GCPCredential {
+ return { content: "" };
+}
+
+export const DataSource_GCPCredential: MessageFns<DataSource_GCPCredential> = {
+ encode(message: DataSource_GCPCredential, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
+ if (message.content !== "") {
+ writer.uint32(10).string(message.content);
+ }
+ return writer;
+ },
+
+ decode(input: BinaryReader | Uint8Array, length?: number): DataSource_GCPCredential {
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseDataSource_GCPCredential();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1: {
+ if (tag !== 10) {
+ break;
+ }
+
+ message.content = reader.string();
+ continue;
+ }
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skip(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): DataSource_GCPCredential {
+ return { content: isSet(object.content) ? globalThis.String(object.content) : "" };
+ },
+
+ toJSON(message: DataSource_GCPCredential): unknown {
+ const obj: any = {};
+ if (message.content !== "") {
+ obj.content = message.content;
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial<DataSource_GCPCredential>): DataSource_GCPCredential {
+ return DataSource_GCPCredential.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial<DataSource_GCPCredential>): DataSource_GCPCredential {
+ const message = createBaseDataSource_GCPCredential();
+ message.content = object.content ?? "";
+ return message;
+ },
+};
+
function createBaseDataSource_Address(): DataSource_Address {
return { host: "", port: "" };
}
diff --git a/go.mod b/go.mod
index a3348a1aa1..2f40e433e0 100644
--- a/go.mod
+++ b/go.mod
@@ -23,6 +23,7 @@ require (
github.com/antlr4-go/antlr/v4 v4.13.1
github.com/aws/aws-sdk-go-v2 v1.36.3
github.com/aws/aws-sdk-go-v2/config v1.29.14
+ github.com/aws/aws-sdk-go-v2/credentials v1.17.67
github.com/aws/aws-sdk-go-v2/feature/rds/auth v1.5.11
github.com/aws/aws-sdk-go-v2/service/licensemanager v1.31.1
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.35.4
@@ -134,7 +135,6 @@ require (
github.com/apache/arrow-go/v18 v18.3.0 // indirect
github.com/apache/arrow/go/v15 v15.0.2 // indirect
github.com/apache/thrift v0.22.0 // indirect
- github.com/aws/aws-sdk-go-v2/credentials v1.17.67 // indirect
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.77 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.15 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.80.0 // indirect
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index b8e2779772..c92c00f35c 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -9483,8 +9483,12 @@ components:
- AZURE_IAM
type: string
format: enum
- clientSecretCredential:
- $ref: '#/components/schemas/DataSource_ClientSecretCredential'
+ azureCredential:
+ $ref: '#/components/schemas/DataSource_AzureCredential'
+ awsCredential:
+ $ref: '#/components/schemas/DataSource_AWSCredential'
+ gcpCredential:
+ $ref: '#/components/schemas/DataSource_GCPCredential'
saslConfig:
$ref: '#/components/schemas/SASLConfig'
additionalAddresses:
@@ -9582,6 +9586,18 @@ components:
mountPath:
type: string
description: The path where the approle auth method is mounted.
+ DataSource_AWSCredential:
+ type: object
+ properties:
+ accessKeyId:
+ writeOnly: true
+ type: string
+ secretAccessKey:
+ writeOnly: true
+ type: string
+ sessionToken:
+ writeOnly: true
+ type: string
DataSource_Address:
type: object
properties:
@@ -9589,7 +9605,7 @@ components:
type: string
port:
type: string
- DataSource_ClientSecretCredential:
+ DataSource_AzureCredential:
type: object
properties:
tenantId:
@@ -9597,7 +9613,13 @@ components:
clientId:
type: string
clientSecret:
- readOnly: true
+ writeOnly: true
+ type: string
+ DataSource_GCPCredential:
+ type: object
+ properties:
+ content:
+ writeOnly: true
type: string
Database:
type: object
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index b1ff701c72..c5e0e7baf4 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -128,9 +128,11 @@
- [store/instance.proto](#store_instance-proto)
- [DataSource](#bytebase-store-DataSource)
+ - [DataSource.AWSCredential](#bytebase-store-DataSource-AWSCredential)
- [DataSource.Address](#bytebase-store-DataSource-Address)
- - [DataSource.ClientSecretCredential](#bytebase-store-DataSource-ClientSecretCredential)
+ - [DataSource.AzureCredential](#bytebase-store-DataSource-AzureCredential)
- [DataSource.ExtraConnectionParametersEntry](#bytebase-store-DataSource-ExtraConnectionParametersEntry)
+ - [DataSource.GCPCredential](#bytebase-store-DataSource-GCPCredential)
- [DataSourceExternalSecret](#bytebase-store-DataSourceExternalSecret)
- [DataSourceExternalSecret.AppRoleAuthOption](#bytebase-store-DataSourceExternalSecret-AppRoleAuthOption)
- [Instance](#bytebase-store-Instance)
@@ -2256,7 +2258,9 @@ OIDCIdentityProviderConfig is the structure for OIDC identity provider config.
| obfuscated_authentication_private_key | [string](#string) | | |
| external_secret | [DataSourceExternalSecret](#bytebase-store-DataSourceExternalSecret) | | |
| authentication_type | [DataSource.AuthenticationType](#bytebase-store-DataSource-AuthenticationType) | | |
-| client_secret_credential | [DataSource.ClientSecretCredential](#bytebase-store-DataSource-ClientSecretCredential) | | |
+| azure_credential | [DataSource.AzureCredential](#bytebase-store-DataSource-AzureCredential) | | |
+| aws_credential | [DataSource.AWSCredential](#bytebase-store-DataSource-AWSCredential) | | |
+| gcp_credential | [DataSource.GCPCredential](#bytebase-store-DataSource-GCPCredential) | | |
| sasl_config | [SASLConfig](#bytebase-store-SASLConfig) | | |
| additional_addresses | [DataSource.Address](#bytebase-store-DataSource-Address) | repeated | additional_addresses is used for MongoDB replica set. |
| direct_connection | [bool](#bool) | | direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string. |
@@ -2275,6 +2279,26 @@ OIDCIdentityProviderConfig is the structure for OIDC identity provider config.
+<a name="bytebase-store-DataSource-AWSCredential"></a>
+
+### DataSource.AWSCredential
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| access_key_id | [string](#string) | | |
+| obfuscated_access_key_id | [string](#string) | | |
+| secret_access_key | [string](#string) | | |
+| obfuscated_secret_access_key | [string](#string) | | |
+| session_token | [string](#string) | | |
+| obfuscated_session_token | [string](#string) | | |
+
+
+
+
+
+
<a name="bytebase-store-DataSource-Address"></a>
### DataSource.Address
@@ -2291,9 +2315,9 @@ OIDCIdentityProviderConfig is the structure for OIDC identity provider config.
-<a name="bytebase-store-DataSource-ClientSecretCredential"></a>
+<a name="bytebase-store-DataSource-AzureCredential"></a>
-### DataSource.ClientSecretCredential
+### DataSource.AzureCredential
@@ -2325,6 +2349,22 @@ OIDCIdentityProviderConfig is the structure for OIDC identity provider config.
+<a name="bytebase-store-DataSource-GCPCredential"></a>
+
+### DataSource.GCPCredential
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| content | [string](#string) | | |
+| obfuscated_content | [string](#string) | | |
+
+
+
+
+
+
<a name="bytebase-store-DataSourceExternalSecret"></a>
### DataSourceExternalSecret
diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.html
index 1c89cdaf64..b829cd241e 100644
--- a/proto/gen/grpc-doc/store/index.html
+++ b/proto/gen/grpc-doc/store/index.html
@@ -682,18 +682,26 @@
<a href="#bytebase.store.DataSource"><span class="badge">M</span>DataSource</a>
</li>
+ <li>
+ <a href="#bytebase.store.DataSource.AWSCredential"><span class="badge">M</span>DataSource.AWSCredential</a>
+ </li>
+
<li>
<a href="#bytebase.store.DataSource.Address"><span class="badge">M</span>DataSource.Address</a>
</li>
<li>
- <a href="#bytebase.store.DataSource.ClientSecretCredential"><span class="badge">M</span>DataSource.ClientSecretCredential</a>
+ <a href="#bytebase.store.DataSource.AzureCredential"><span class="badge">M</span>DataSource.AzureCredential</a>
</li>
<li>
<a href="#bytebase.store.DataSource.ExtraConnectionParametersEntry"><span class="badge">M</span>DataSource.ExtraConnectionParametersEntry</a>
</li>
+ <li>
+ <a href="#bytebase.store.DataSource.GCPCredential"><span class="badge">M</span>DataSource.GCPCredential</a>
+ </li>
+
<li>
<a href="#bytebase.store.DataSourceExternalSecret"><span class="badge">M</span>DataSourceExternalSecret</a>
</li>
@@ -6565,8 +6573,22 @@ Used for authentication when connecting to the data source. </p></td>
</tr>
<tr>
- <td>client_secret_credential</td>
- <td><a href="#bytebase.store.DataSource.ClientSecretCredential">DataSource.ClientSecretCredential</a></td>
+ <td>azure_credential</td>
+ <td><a href="#bytebase.store.DataSource.AzureCredential">DataSource.AzureCredential</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>aws_credential</td>
+ <td><a href="#bytebase.store.DataSource.AWSCredential">DataSource.AWSCredential</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>gcp_credential</td>
+ <td><a href="#bytebase.store.DataSource.GCPCredential">DataSource.GCPCredential</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -6663,6 +6685,65 @@ For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p><
+ <h3 id="bytebase.store.DataSource.AWSCredential">DataSource.AWSCredential</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>access_key_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>obfuscated_access_key_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>secret_access_key</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>obfuscated_secret_access_key</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>session_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>obfuscated_session_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
<h3 id="bytebase.store.DataSource.Address">DataSource.Address</h3>
<p></p>
@@ -6694,7 +6775,7 @@ For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p><
- <h3 id="bytebase.store.DataSource.ClientSecretCredential">DataSource.ClientSecretCredential</h3>
+ <h3 id="bytebase.store.DataSource.AzureCredential">DataSource.AzureCredential</h3>
<p></p>
@@ -6770,6 +6851,37 @@ For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p><
+ <h3 id="bytebase.store.DataSource.GCPCredential">DataSource.GCPCredential</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>content</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>obfuscated_content</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
<h3 id="bytebase.store.DataSourceExternalSecret">DataSourceExternalSecret</h3>
<p></p>
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index ada06e6875..9a3f46f61c 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -54,9 +54,11 @@
- [BatchUpdateInstancesResponse](#bytebase-v1-BatchUpdateInstancesResponse)
- [CreateInstanceRequest](#bytebase-v1-CreateInstanceRequest)
- [DataSource](#bytebase-v1-DataSource)
+ - [DataSource.AWSCredential](#bytebase-v1-DataSource-AWSCredential)
- [DataSource.Address](#bytebase-v1-DataSource-Address)
- - [DataSource.ClientSecretCredential](#bytebase-v1-DataSource-ClientSecretCredential)
+ - [DataSource.AzureCredential](#bytebase-v1-DataSource-AzureCredential)
- [DataSource.ExtraConnectionParametersEntry](#bytebase-v1-DataSource-ExtraConnectionParametersEntry)
+ - [DataSource.GCPCredential](#bytebase-v1-DataSource-GCPCredential)
- [DataSourceExternalSecret](#bytebase-v1-DataSourceExternalSecret)
- [DataSourceExternalSecret.AppRoleAuthOption](#bytebase-v1-DataSourceExternalSecret-AppRoleAuthOption)
- [DeleteInstanceRequest](#bytebase-v1-DeleteInstanceRequest)
@@ -1341,7 +1343,9 @@ This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
| authentication_private_key | [string](#string) | | PKCS#8 private key in PEM format. If it&#39;s empty string, no private key is required. Used for authentication when connecting to the data source. |
| external_secret | [DataSourceExternalSecret](#bytebase-v1-DataSourceExternalSecret) | | |
| authentication_type | [DataSource.AuthenticationType](#bytebase-v1-DataSource-AuthenticationType) | | |
-| client_secret_credential | [DataSource.ClientSecretCredential](#bytebase-v1-DataSource-ClientSecretCredential) | | |
+| azure_credential | [DataSource.AzureCredential](#bytebase-v1-DataSource-AzureCredential) | | |
+| aws_credential | [DataSource.AWSCredential](#bytebase-v1-DataSource-AWSCredential) | | |
+| gcp_credential | [DataSource.GCPCredential](#bytebase-v1-DataSource-GCPCredential) | | |
| sasl_config | [SASLConfig](#bytebase-v1-SASLConfig) | | |
| additional_addresses | [DataSource.Address](#bytebase-v1-DataSource-Address) | repeated | additional_addresses is used for MongoDB replica set. |
| direct_connection | [bool](#bool) | | direct_connection is used for MongoDB to dispatch all the operations to the node specified in the connection string. |
@@ -1359,6 +1363,23 @@ This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
+<a name="bytebase-v1-DataSource-AWSCredential"></a>
+
+### DataSource.AWSCredential
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| access_key_id | [string](#string) | | |
+| secret_access_key | [string](#string) | | |
+| session_token | [string](#string) | | |
+
+
+
+
+
+
<a name="bytebase-v1-DataSource-Address"></a>
### DataSource.Address
@@ -1375,9 +1396,9 @@ This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
-<a name="bytebase-v1-DataSource-ClientSecretCredential"></a>
+<a name="bytebase-v1-DataSource-AzureCredential"></a>
-### DataSource.ClientSecretCredential
+### DataSource.AzureCredential
@@ -1408,6 +1429,21 @@ This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
+<a name="bytebase-v1-DataSource-GCPCredential"></a>
+
+### DataSource.GCPCredential
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| content | [string](#string) | | |
+
+
+
+
+
+
<a name="bytebase-v1-DataSourceExternalSecret"></a>
### DataSourceExternalSecret
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index f22dd78b45..57850c480b 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -370,18 +370,26 @@
<a href="#bytebase.v1.DataSource"><span class="badge">M</span>DataSource</a>
</li>
+ <li>
+ <a href="#bytebase.v1.DataSource.AWSCredential"><span class="badge">M</span>DataSource.AWSCredential</a>
+ </li>
+
<li>
<a href="#bytebase.v1.DataSource.Address"><span class="badge">M</span>DataSource.Address</a>
</li>
<li>
- <a href="#bytebase.v1.DataSource.ClientSecretCredential"><span class="badge">M</span>DataSource.ClientSecretCredential</a>
+ <a href="#bytebase.v1.DataSource.AzureCredential"><span class="badge">M</span>DataSource.AzureCredential</a>
</li>
<li>
<a href="#bytebase.v1.DataSource.ExtraConnectionParametersEntry"><span class="badge">M</span>DataSource.ExtraConnectionParametersEntry</a>
</li>
+ <li>
+ <a href="#bytebase.v1.DataSource.GCPCredential"><span class="badge">M</span>DataSource.GCPCredential</a>
+ </li>
+
<li>
<a href="#bytebase.v1.DataSourceExternalSecret"><span class="badge">M</span>DataSourceExternalSecret</a>
</li>
@@ -4431,8 +4439,22 @@ Used for authentication when connecting to the data source. </p></td>
</tr>
<tr>
- <td>client_secret_credential</td>
- <td><a href="#bytebase.v1.DataSource.ClientSecretCredential">DataSource.ClientSecretCredential</a></td>
+ <td>azure_credential</td>
+ <td><a href="#bytebase.v1.DataSource.AzureCredential">DataSource.AzureCredential</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>aws_credential</td>
+ <td><a href="#bytebase.v1.DataSource.AWSCredential">DataSource.AWSCredential</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>gcp_credential</td>
+ <td><a href="#bytebase.v1.DataSource.GCPCredential">DataSource.GCPCredential</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -4522,6 +4544,44 @@ For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p><
+ <h3 id="bytebase.v1.DataSource.AWSCredential">DataSource.AWSCredential</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>access_key_id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>secret_access_key</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>session_token</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
<h3 id="bytebase.v1.DataSource.Address">DataSource.Address</h3>
<p></p>
@@ -4553,7 +4613,7 @@ For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p><
- <h3 id="bytebase.v1.DataSource.ClientSecretCredential">DataSource.ClientSecretCredential</h3>
+ <h3 id="bytebase.v1.DataSource.AzureCredential">DataSource.AzureCredential</h3>
<p></p>
@@ -4622,6 +4682,30 @@ For PostgreSQL HA, this can be used to set target_session_attrs=read-write </p><
+ <h3 id="bytebase.v1.DataSource.GCPCredential">DataSource.GCPCredential</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>content</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
<h3 id="bytebase.v1.DataSourceExternalSecret">DataSourceExternalSecret</h3>
<p></p>
diff --git a/proto/generated-go/store/instance.pb.go b/proto/generated-go/store/instance.pb.go
index 7b9f1085d8..06f020d206 100644
--- a/proto/generated-go/store/instance.pb.go
+++ b/proto/generated-go/store/instance.pb.go
@@ -598,7 +598,9 @@ type DataSource struct {
AuthenticationType DataSource_AuthenticationType `protobuf:"varint,22,opt,name=authentication_type,json=authenticationType,proto3,enum=bytebase.store.DataSource_AuthenticationType" json:"authentication_type,omitempty"`
// Types that are valid to be assigned to IamExtension:
//
- // *DataSource_ClientSecretCredential_
+ // *DataSource_AzureCredential_
+ // *DataSource_AwsCredential
+ // *DataSource_GcpCredential
IamExtension isDataSource_IamExtension `protobuf_oneof:"iam_extension"`
SaslConfig *SASLConfig `protobuf:"bytes,24,opt,name=sasl_config,json=saslConfig,proto3" json:"sasl_config,omitempty"`
// additional_addresses is used for MongoDB replica set.
@@ -879,10 +881,28 @@ func (x *DataSource) GetIamExtension() isDataSource_IamExtension {
return nil
}
-func (x *DataSource) GetClientSecretCredential() *DataSource_ClientSecretCredential {
+func (x *DataSource) GetAzureCredential() *DataSource_AzureCredential {
if x != nil {
- if x, ok := x.IamExtension.(*DataSource_ClientSecretCredential_); ok {
- return x.ClientSecretCredential
+ if x, ok := x.IamExtension.(*DataSource_AzureCredential_); ok {
+ return x.AzureCredential
+ }
+ }
+ return nil
+}
+
+func (x *DataSource) GetAwsCredential() *DataSource_AWSCredential {
+ if x != nil {
+ if x, ok := x.IamExtension.(*DataSource_AwsCredential); ok {
+ return x.AwsCredential
+ }
+ }
+ return nil
+}
+
+func (x *DataSource) GetGcpCredential() *DataSource_GCPCredential {
+ if x != nil {
+ if x, ok := x.IamExtension.(*DataSource_GcpCredential); ok {
+ return x.GcpCredential
}
}
return nil
@@ -976,11 +996,23 @@ type isDataSource_IamExtension interface {
isDataSource_IamExtension()
}
-type DataSource_ClientSecretCredential_ struct {
- ClientSecretCredential *DataSource_ClientSecretCredential `protobuf:"bytes,23,opt,name=client_secret_credential,json=clientSecretCredential,proto3,oneof"`
+type DataSource_AzureCredential_ struct {
+ AzureCredential *DataSource_AzureCredential `protobuf:"bytes,23,opt,name=azure_credential,json=azureCredential,proto3,oneof"`
}
-func (*DataSource_ClientSecretCredential_) isDataSource_IamExtension() {}
+type DataSource_AwsCredential struct {
+ AwsCredential *DataSource_AWSCredential `protobuf:"bytes,45,opt,name=aws_credential,json=awsCredential,proto3,oneof"`
+}
+
+type DataSource_GcpCredential struct {
+ GcpCredential *DataSource_GCPCredential `protobuf:"bytes,46,opt,name=gcp_credential,json=gcpCredential,proto3,oneof"`
+}
+
+func (*DataSource_AzureCredential_) isDataSource_IamExtension() {}
+
+func (*DataSource_AwsCredential) isDataSource_IamExtension() {}
+
+func (*DataSource_GcpCredential) isDataSource_IamExtension() {}
type SASLConfig struct {
state protoimpl.MessageState `protogen:"open.v1"`
@@ -1273,7 +1305,7 @@ func (*DataSourceExternalSecret_AppRole) isDataSourceExternalSecret_AuthOption()
func (*DataSourceExternalSecret_Token) isDataSourceExternalSecret_AuthOption() {}
-type DataSource_ClientSecretCredential struct {
+type DataSource_AzureCredential struct {
state protoimpl.MessageState `protogen:"open.v1"`
TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
@@ -1283,20 +1315,20 @@ type DataSource_ClientSecretCredential struct {
sizeCache protoimpl.SizeCache
}
-func (x *DataSource_ClientSecretCredential) Reset() {
- *x = DataSource_ClientSecretCredential{}
+func (x *DataSource_AzureCredential) Reset() {
+ *x = DataSource_AzureCredential{}
mi := &file_store_instance_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
-func (x *DataSource_ClientSecretCredential) String() string {
+func (x *DataSource_AzureCredential) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*DataSource_ClientSecretCredential) ProtoMessage() {}
+func (*DataSource_AzureCredential) ProtoMessage() {}
-func (x *DataSource_ClientSecretCredential) ProtoReflect() protoreflect.Message {
+func (x *DataSource_AzureCredential) ProtoReflect() protoreflect.Message {
mi := &file_store_instance_proto_msgTypes[6]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -1308,39 +1340,175 @@ func (x *DataSource_ClientSecretCredential) ProtoReflect() protoreflect.Message
return mi.MessageOf(x)
}
-// Deprecated: Use DataSource_ClientSecretCredential.ProtoReflect.Descriptor instead.
-func (*DataSource_ClientSecretCredential) Descriptor() ([]byte, []int) {
+// Deprecated: Use DataSource_AzureCredential.ProtoReflect.Descriptor instead.
+func (*DataSource_AzureCredential) Descriptor() ([]byte, []int) {
return file_store_instance_proto_rawDescGZIP(), []int{2, 0}
}
-func (x *DataSource_ClientSecretCredential) GetTenantId() string {
+func (x *DataSource_AzureCredential) GetTenantId() string {
if x != nil {
return x.TenantId
}
return ""
}
-func (x *DataSource_ClientSecretCredential) GetClientId() string {
+func (x *DataSource_AzureCredential) GetClientId() string {
if x != nil {
return x.ClientId
}
return ""
}
-func (x *DataSource_ClientSecretCredential) GetClientSecret() string {
+func (x *DataSource_AzureCredential) GetClientSecret() string {
if x != nil {
return x.ClientSecret
}
return ""
}
-func (x *DataSource_ClientSecretCredential) GetObfuscatedClientSecret() string {
+func (x *DataSource_AzureCredential) GetObfuscatedClientSecret() string {
if x != nil {
return x.ObfuscatedClientSecret
}
return ""
}
+type DataSource_AWSCredential struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ AccessKeyId string `protobuf:"bytes,1,opt,name=access_key_id,json=accessKeyId,proto3" json:"access_key_id,omitempty"`
+ ObfuscatedAccessKeyId string `protobuf:"bytes,2,opt,name=obfuscated_access_key_id,json=obfuscatedAccessKeyId,proto3" json:"obfuscated_access_key_id,omitempty"`
+ SecretAccessKey string `protobuf:"bytes,3,opt,name=secret_access_key,json=secretAccessKey,proto3" json:"secret_access_key,omitempty"`
+ ObfuscatedSecretAccessKey string `protobuf:"bytes,4,opt,name=obfuscated_secret_access_key,json=obfuscatedSecretAccessKey,proto3" json:"obfuscated_secret_access_key,omitempty"`
+ SessionToken string `protobuf:"bytes,5,opt,name=session_token,json=sessionToken,proto3" json:"session_token,omitempty"`
+ ObfuscatedSessionToken string `protobuf:"bytes,6,opt,name=obfuscated_session_token,json=obfuscatedSessionToken,proto3" json:"obfuscated_session_token,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *DataSource_AWSCredential) Reset() {
+ *x = DataSource_AWSCredential{}
+ mi := &file_store_instance_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *DataSource_AWSCredential) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DataSource_AWSCredential) ProtoMessage() {}
+
+func (x *DataSource_AWSCredential) ProtoReflect() protoreflect.Message {
+ mi := &file_store_instance_proto_msgTypes[7]
+ 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 DataSource_AWSCredential.ProtoReflect.Descriptor instead.
+func (*DataSource_AWSCredential) Descriptor() ([]byte, []int) {
+ return file_store_instance_proto_rawDescGZIP(), []int{2, 1}
+}
+
+func (x *DataSource_AWSCredential) GetAccessKeyId() string {
+ if x != nil {
+ return x.AccessKeyId
+ }
+ return ""
+}
+
+func (x *DataSource_AWSCredential) GetObfuscatedAccessKeyId() string {
+ if x != nil {
+ return x.ObfuscatedAccessKeyId
+ }
+ return ""
+}
+
+func (x *DataSource_AWSCredential) GetSecretAccessKey() string {
+ if x != nil {
+ return x.SecretAccessKey
+ }
+ return ""
+}
+
+func (x *DataSource_AWSCredential) GetObfuscatedSecretAccessKey() string {
+ if x != nil {
+ return x.ObfuscatedSecretAccessKey
+ }
+ return ""
+}
+
+func (x *DataSource_AWSCredential) GetSessionToken() string {
+ if x != nil {
+ return x.SessionToken
+ }
+ return ""
+}
+
+func (x *DataSource_AWSCredential) GetObfuscatedSessionToken() string {
+ if x != nil {
+ return x.ObfuscatedSessionToken
+ }
+ return ""
+}
+
+type DataSource_GCPCredential struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
+ ObfuscatedContent string `protobuf:"bytes,2,opt,name=obfuscated_content,json=obfuscatedContent,proto3" json:"obfuscated_content,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *DataSource_GCPCredential) Reset() {
+ *x = DataSource_GCPCredential{}
+ mi := &file_store_instance_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *DataSource_GCPCredential) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DataSource_GCPCredential) ProtoMessage() {}
+
+func (x *DataSource_GCPCredential) ProtoReflect() protoreflect.Message {
+ mi := &file_store_instance_proto_msgTypes[8]
+ 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 DataSource_GCPCredential.ProtoReflect.Descriptor instead.
+func (*DataSource_GCPCredential) Descriptor() ([]byte, []int) {
+ return file_store_instance_proto_rawDescGZIP(), []int{2, 2}
+}
+
+func (x *DataSource_GCPCredential) GetContent() string {
+ if x != nil {
+ return x.Content
+ }
+ return ""
+}
+
+func (x *DataSource_GCPCredential) GetObfuscatedContent() string {
+ if x != nil {
+ return x.ObfuscatedContent
+ }
+ return ""
+}
+
type DataSource_Address struct {
state protoimpl.MessageState `protogen:"open.v1"`
Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
@@ -1351,7 +1519,7 @@ type DataSource_Address struct {
func (x *DataSource_Address) Reset() {
*x = DataSource_Address{}
- mi := &file_store_instance_proto_msgTypes[7]
+ mi := &file_store_instance_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1363,7 +1531,7 @@ func (x *DataSource_Address) String() string {
func (*DataSource_Address) ProtoMessage() {}
func (x *DataSource_Address) ProtoReflect() protoreflect.Message {
- mi := &file_store_instance_proto_msgTypes[7]
+ mi := &file_store_instance_proto_msgTypes[9]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1376,7 +1544,7 @@ func (x *DataSource_Address) ProtoReflect() protoreflect.Message {
// Deprecated: Use DataSource_Address.ProtoReflect.Descriptor instead.
func (*DataSource_Address) Descriptor() ([]byte, []int) {
- return file_store_instance_proto_rawDescGZIP(), []int{2, 1}
+ return file_store_instance_proto_rawDescGZIP(), []int{2, 3}
}
func (x *DataSource_Address) GetHost() string {
@@ -1407,7 +1575,7 @@ type DataSourceExternalSecret_AppRoleAuthOption struct {
func (x *DataSourceExternalSecret_AppRoleAuthOption) Reset() {
*x = DataSourceExternalSecret_AppRoleAuthOption{}
- mi := &file_store_instance_proto_msgTypes[9]
+ mi := &file_store_instance_proto_msgTypes[11]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -1419,7 +1587,7 @@ func (x *DataSourceExternalSecret_AppRoleAuthOption) String() string {
func (*DataSourceExternalSecret_AppRoleAuthOption) ProtoMessage() {}
func (x *DataSourceExternalSecret_AppRoleAuthOption) ProtoReflect() protoreflect.Message {
- mi := &file_store_instance_proto_msgTypes[9]
+ mi := &file_store_instance_proto_msgTypes[11]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -1493,7 +1661,7 @@ const file_store_instance_proto_rawDesc = "" +
"\x11_connection_limitB\x0e\n" +
"\f_valid_untilB\f\n" +
"\n" +
- "_attribute\"\xef\x13\n" +
+ "_attribute\"\x8d\x18\n" +
"\n" +
"DataSource\x12\x0e\n" +
"\x02id\x18\x01 \x01(\tR\x02id\x122\n" +
@@ -1528,8 +1696,10 @@ const file_store_instance_proto_rawDesc = "" +
"\x1aauthentication_private_key\x18+ \x01(\tR\x18authenticationPrivateKey\x12Q\n" +
"%obfuscated_authentication_private_key\x18\x14 \x01(\tR\"obfuscatedAuthenticationPrivateKey\x12Q\n" +
"\x0fexternal_secret\x18\x15 \x01(\v2(.bytebase.store.DataSourceExternalSecretR\x0eexternalSecret\x12^\n" +
- "\x13authentication_type\x18\x16 \x01(\x0e2-.bytebase.store.DataSource.AuthenticationTypeR\x12authenticationType\x12m\n" +
- "\x18client_secret_credential\x18\x17 \x01(\v21.bytebase.store.DataSource.ClientSecretCredentialH\x00R\x16clientSecretCredential\x12;\n" +
+ "\x13authentication_type\x18\x16 \x01(\x0e2-.bytebase.store.DataSource.AuthenticationTypeR\x12authenticationType\x12W\n" +
+ "\x10azure_credential\x18\x17 \x01(\v2*.bytebase.store.DataSource.AzureCredentialH\x00R\x0fazureCredential\x12Q\n" +
+ "\x0eaws_credential\x18- \x01(\v2(.bytebase.store.DataSource.AWSCredentialH\x00R\rawsCredential\x12Q\n" +
+ "\x0egcp_credential\x18. \x01(\v2(.bytebase.store.DataSource.GCPCredentialH\x00R\rgcpCredential\x12;\n" +
"\vsasl_config\x18\x18 \x01(\v2\x1a.bytebase.store.SASLConfigR\n" +
"saslConfig\x12U\n" +
"\x14additional_addresses\x18\x1a \x03(\v2\".bytebase.store.DataSource.AddressR\x13additionalAddresses\x12+\n" +
@@ -1544,12 +1714,22 @@ const file_store_instance_proto_rawDesc = "" +
"\n" +
"redis_type\x18\" \x01(\x0e2$.bytebase.store.DataSource.RedisTypeR\tredisType\x12\x18\n" +
"\acluster\x18# \x01(\tR\acluster\x12y\n" +
- "\x1bextra_connection_parameters\x18$ \x03(\v29.bytebase.store.DataSource.ExtraConnectionParametersEntryR\x19extraConnectionParameters\x1a\xb1\x01\n" +
- "\x16ClientSecretCredential\x12\x1b\n" +
+ "\x1bextra_connection_parameters\x18$ \x03(\v29.bytebase.store.DataSource.ExtraConnectionParametersEntryR\x19extraConnectionParameters\x1a\xaa\x01\n" +
+ "\x0fAzureCredential\x12\x1b\n" +
"\ttenant_id\x18\x01 \x01(\tR\btenantId\x12\x1b\n" +
"\tclient_id\x18\x02 \x01(\tR\bclientId\x12#\n" +
"\rclient_secret\x18\x03 \x01(\tR\fclientSecret\x128\n" +
- "\x18obfuscated_client_secret\x18\x04 \x01(\tR\x16obfuscatedClientSecret\x1a1\n" +
+ "\x18obfuscated_client_secret\x18\x04 \x01(\tR\x16obfuscatedClientSecret\x1a\xb8\x02\n" +
+ "\rAWSCredential\x12\"\n" +
+ "\raccess_key_id\x18\x01 \x01(\tR\vaccessKeyId\x127\n" +
+ "\x18obfuscated_access_key_id\x18\x02 \x01(\tR\x15obfuscatedAccessKeyId\x12*\n" +
+ "\x11secret_access_key\x18\x03 \x01(\tR\x0fsecretAccessKey\x12?\n" +
+ "\x1cobfuscated_secret_access_key\x18\x04 \x01(\tR\x19obfuscatedSecretAccessKey\x12#\n" +
+ "\rsession_token\x18\x05 \x01(\tR\fsessionToken\x128\n" +
+ "\x18obfuscated_session_token\x18\x06 \x01(\tR\x16obfuscatedSessionToken\x1aX\n" +
+ "\rGCPCredential\x12\x18\n" +
+ "\acontent\x18\x01 \x01(\tR\acontent\x12-\n" +
+ "\x12obfuscated_content\x18\x02 \x01(\tR\x11obfuscatedContent\x1a1\n" +
"\aAddress\x12\x12\n" +
"\x04host\x18\x01 \x01(\tR\x04host\x12\x12\n" +
"\x04port\x18\x02 \x01(\tR\x04port\x1aL\n" +
@@ -1634,7 +1814,7 @@ func file_store_instance_proto_rawDescGZIP() []byte {
}
var file_store_instance_proto_enumTypes = make([]protoimpl.EnumInfo, 6)
-var file_store_instance_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
+var file_store_instance_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
var file_store_instance_proto_goTypes = []any{
(DataSourceType)(0), // 0: bytebase.store.DataSourceType
(DataSource_AuthenticationType)(0), // 1: bytebase.store.DataSource.AuthenticationType
@@ -1648,38 +1828,42 @@ var file_store_instance_proto_goTypes = []any{
(*SASLConfig)(nil), // 9: bytebase.store.SASLConfig
(*KerberosConfig)(nil), // 10: bytebase.store.KerberosConfig
(*DataSourceExternalSecret)(nil), // 11: bytebase.store.DataSourceExternalSecret
- (*DataSource_ClientSecretCredential)(nil), // 12: bytebase.store.DataSource.ClientSecretCredential
- (*DataSource_Address)(nil), // 13: bytebase.store.DataSource.Address
- nil, // 14: bytebase.store.DataSource.ExtraConnectionParametersEntry
- (*DataSourceExternalSecret_AppRoleAuthOption)(nil), // 15: bytebase.store.DataSourceExternalSecret.AppRoleAuthOption
- (Engine)(0), // 16: bytebase.store.Engine
- (*durationpb.Duration)(nil), // 17: google.protobuf.Duration
- (*timestamppb.Timestamp)(nil), // 18: google.protobuf.Timestamp
+ (*DataSource_AzureCredential)(nil), // 12: bytebase.store.DataSource.AzureCredential
+ (*DataSource_AWSCredential)(nil), // 13: bytebase.store.DataSource.AWSCredential
+ (*DataSource_GCPCredential)(nil), // 14: bytebase.store.DataSource.GCPCredential
+ (*DataSource_Address)(nil), // 15: bytebase.store.DataSource.Address
+ nil, // 16: bytebase.store.DataSource.ExtraConnectionParametersEntry
+ (*DataSourceExternalSecret_AppRoleAuthOption)(nil), // 17: bytebase.store.DataSourceExternalSecret.AppRoleAuthOption
+ (Engine)(0), // 18: bytebase.store.Engine
+ (*durationpb.Duration)(nil), // 19: google.protobuf.Duration
+ (*timestamppb.Timestamp)(nil), // 20: google.protobuf.Timestamp
}
var file_store_instance_proto_depIdxs = []int32{
- 16, // 0: bytebase.store.Instance.engine:type_name -> bytebase.store.Engine
+ 18, // 0: bytebase.store.Instance.engine:type_name -> bytebase.store.Engine
8, // 1: bytebase.store.Instance.data_sources:type_name -> bytebase.store.DataSource
- 17, // 2: bytebase.store.Instance.sync_interval:type_name -> google.protobuf.Duration
- 18, // 3: bytebase.store.Instance.last_sync_time:type_name -> google.protobuf.Timestamp
+ 19, // 2: bytebase.store.Instance.sync_interval:type_name -> google.protobuf.Duration
+ 20, // 3: bytebase.store.Instance.last_sync_time:type_name -> google.protobuf.Timestamp
7, // 4: bytebase.store.Instance.roles:type_name -> bytebase.store.InstanceRole
0, // 5: bytebase.store.DataSource.type:type_name -> bytebase.store.DataSourceType
11, // 6: bytebase.store.DataSource.external_secret:type_name -> bytebase.store.DataSourceExternalSecret
1, // 7: bytebase.store.DataSource.authentication_type:type_name -> bytebase.store.DataSource.AuthenticationType
- 12, // 8: bytebase.store.DataSource.client_secret_credential:type_name -> bytebase.store.DataSource.ClientSecretCredential
- 9, // 9: bytebase.store.DataSource.sasl_config:type_name -> bytebase.store.SASLConfig
- 13, // 10: bytebase.store.DataSource.additional_addresses:type_name -> bytebase.store.DataSource.Address
- 2, // 11: bytebase.store.DataSource.redis_type:type_name -> bytebase.store.DataSource.RedisType
- 14, // 12: bytebase.store.DataSource.extra_connection_parameters:type_name -> bytebase.store.DataSource.ExtraConnectionParametersEntry
- 10, // 13: bytebase.store.SASLConfig.krb_config:type_name -> bytebase.store.KerberosConfig
- 3, // 14: bytebase.store.DataSourceExternalSecret.secret_type:type_name -> bytebase.store.DataSourceExternalSecret.SecretType
- 4, // 15: bytebase.store.DataSourceExternalSecret.auth_type:type_name -> bytebase.store.DataSourceExternalSecret.AuthType
- 15, // 16: bytebase.store.DataSourceExternalSecret.app_role:type_name -> bytebase.store.DataSourceExternalSecret.AppRoleAuthOption
- 5, // 17: bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.type:type_name -> bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.SecretType
- 18, // [18:18] is the sub-list for method output_type
- 18, // [18:18] is the sub-list for method input_type
- 18, // [18:18] is the sub-list for extension type_name
- 18, // [18:18] is the sub-list for extension extendee
- 0, // [0:18] is the sub-list for field type_name
+ 12, // 8: bytebase.store.DataSource.azure_credential:type_name -> bytebase.store.DataSource.AzureCredential
+ 13, // 9: bytebase.store.DataSource.aws_credential:type_name -> bytebase.store.DataSource.AWSCredential
+ 14, // 10: bytebase.store.DataSource.gcp_credential:type_name -> bytebase.store.DataSource.GCPCredential
+ 9, // 11: bytebase.store.DataSource.sasl_config:type_name -> bytebase.store.SASLConfig
+ 15, // 12: bytebase.store.DataSource.additional_addresses:type_name -> bytebase.store.DataSource.Address
+ 2, // 13: bytebase.store.DataSource.redis_type:type_name -> bytebase.store.DataSource.RedisType
+ 16, // 14: bytebase.store.DataSource.extra_connection_parameters:type_name -> bytebase.store.DataSource.ExtraConnectionParametersEntry
+ 10, // 15: bytebase.store.SASLConfig.krb_config:type_name -> bytebase.store.KerberosConfig
+ 3, // 16: bytebase.store.DataSourceExternalSecret.secret_type:type_name -> bytebase.store.DataSourceExternalSecret.SecretType
+ 4, // 17: bytebase.store.DataSourceExternalSecret.auth_type:type_name -> bytebase.store.DataSourceExternalSecret.AuthType
+ 17, // 18: bytebase.store.DataSourceExternalSecret.app_role:type_name -> bytebase.store.DataSourceExternalSecret.AppRoleAuthOption
+ 5, // 19: bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.type:type_name -> bytebase.store.DataSourceExternalSecret.AppRoleAuthOption.SecretType
+ 20, // [20:20] is the sub-list for method output_type
+ 20, // [20:20] is the sub-list for method input_type
+ 20, // [20:20] is the sub-list for extension type_name
+ 20, // [20:20] is the sub-list for extension extendee
+ 0, // [0:20] is the sub-list for field type_name
}
func init() { file_store_instance_proto_init() }
@@ -1690,7 +1874,9 @@ func file_store_instance_proto_init() {
file_store_common_proto_init()
file_store_instance_proto_msgTypes[1].OneofWrappers = []any{}
file_store_instance_proto_msgTypes[2].OneofWrappers = []any{
- (*DataSource_ClientSecretCredential_)(nil),
+ (*DataSource_AzureCredential_)(nil),
+ (*DataSource_AwsCredential)(nil),
+ (*DataSource_GcpCredential)(nil),
}
file_store_instance_proto_msgTypes[3].OneofWrappers = []any{
(*SASLConfig_KrbConfig)(nil),
@@ -1705,7 +1891,7 @@ func file_store_instance_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_instance_proto_rawDesc), len(file_store_instance_proto_rawDesc)),
NumEnums: 6,
- NumMessages: 10,
+ NumMessages: 12,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/proto/generated-go/v1/instance_service.pb.go b/proto/generated-go/v1/instance_service.pb.go
index 2082eddc55..967f5523b4 100644
--- a/proto/generated-go/v1/instance_service.pb.go
+++ b/proto/generated-go/v1/instance_service.pb.go
@@ -1674,7 +1674,9 @@ type DataSource struct {
AuthenticationType DataSource_AuthenticationType `protobuf:"varint,22,opt,name=authentication_type,json=authenticationType,proto3,enum=bytebase.v1.DataSource_AuthenticationType" json:"authentication_type,omitempty"`
// Types that are valid to be assigned to IamExtension:
//
- // *DataSource_ClientSecretCredential_
+ // *DataSource_AzureCredential_
+ // *DataSource_AwsCredential
+ // *DataSource_GcpCredential
IamExtension isDataSource_IamExtension `protobuf_oneof:"iam_extension"`
SaslConfig *SASLConfig `protobuf:"bytes,24,opt,name=sasl_config,json=saslConfig,proto3" json:"sasl_config,omitempty"`
// additional_addresses is used for MongoDB replica set.
@@ -1905,10 +1907,28 @@ func (x *DataSource) GetIamExtension() isDataSource_IamExtension {
return nil
}
-func (x *DataSource) GetClientSecretCredential() *DataSource_ClientSecretCredential {
+func (x *DataSource) GetAzureCredential() *DataSource_AzureCredential {
if x != nil {
- if x, ok := x.IamExtension.(*DataSource_ClientSecretCredential_); ok {
- return x.ClientSecretCredential
+ if x, ok := x.IamExtension.(*DataSource_AzureCredential_); ok {
+ return x.AzureCredential
+ }
+ }
+ return nil
+}
+
+func (x *DataSource) GetAwsCredential() *DataSource_AWSCredential {
+ if x != nil {
+ if x, ok := x.IamExtension.(*DataSource_AwsCredential); ok {
+ return x.AwsCredential
+ }
+ }
+ return nil
+}
+
+func (x *DataSource) GetGcpCredential() *DataSource_GCPCredential {
+ if x != nil {
+ if x, ok := x.IamExtension.(*DataSource_GcpCredential); ok {
+ return x.GcpCredential
}
}
return nil
@@ -1995,11 +2015,23 @@ type isDataSource_IamExtension interface {
isDataSource_IamExtension()
}
-type DataSource_ClientSecretCredential_ struct {
- ClientSecretCredential *DataSource_ClientSecretCredential `protobuf:"bytes,23,opt,name=client_secret_credential,json=clientSecretCredential,proto3,oneof"`
+type DataSource_AzureCredential_ struct {
+ AzureCredential *DataSource_AzureCredential `protobuf:"bytes,23,opt,name=azure_credential,json=azureCredential,proto3,oneof"`
}
-func (*DataSource_ClientSecretCredential_) isDataSource_IamExtension() {}
+type DataSource_AwsCredential struct {
+ AwsCredential *DataSource_AWSCredential `protobuf:"bytes,37,opt,name=aws_credential,json=awsCredential,proto3,oneof"`
+}
+
+type DataSource_GcpCredential struct {
+ GcpCredential *DataSource_GCPCredential `protobuf:"bytes,38,opt,name=gcp_credential,json=gcpCredential,proto3,oneof"`
+}
+
+func (*DataSource_AzureCredential_) isDataSource_IamExtension() {}
+
+func (*DataSource_AwsCredential) isDataSource_IamExtension() {}
+
+func (*DataSource_GcpCredential) isDataSource_IamExtension() {}
type InstanceResource struct {
state protoimpl.MessageState `protogen:"open.v1"`
@@ -2325,7 +2357,7 @@ func (x *DataSourceExternalSecret_AppRoleAuthOption) GetMountPath() string {
return ""
}
-type DataSource_ClientSecretCredential struct {
+type DataSource_AzureCredential struct {
state protoimpl.MessageState `protogen:"open.v1"`
TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
@@ -2334,20 +2366,20 @@ type DataSource_ClientSecretCredential struct {
sizeCache protoimpl.SizeCache
}
-func (x *DataSource_ClientSecretCredential) Reset() {
- *x = DataSource_ClientSecretCredential{}
+func (x *DataSource_AzureCredential) Reset() {
+ *x = DataSource_AzureCredential{}
mi := &file_v1_instance_service_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
-func (x *DataSource_ClientSecretCredential) String() string {
+func (x *DataSource_AzureCredential) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*DataSource_ClientSecretCredential) ProtoMessage() {}
+func (*DataSource_AzureCredential) ProtoMessage() {}
-func (x *DataSource_ClientSecretCredential) ProtoReflect() protoreflect.Message {
+func (x *DataSource_AzureCredential) ProtoReflect() protoreflect.Message {
mi := &file_v1_instance_service_proto_msgTypes[25]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
@@ -2359,32 +2391,136 @@ func (x *DataSource_ClientSecretCredential) ProtoReflect() protoreflect.Message
return mi.MessageOf(x)
}
-// Deprecated: Use DataSource_ClientSecretCredential.ProtoReflect.Descriptor instead.
-func (*DataSource_ClientSecretCredential) Descriptor() ([]byte, []int) {
+// Deprecated: Use DataSource_AzureCredential.ProtoReflect.Descriptor instead.
+func (*DataSource_AzureCredential) Descriptor() ([]byte, []int) {
return file_v1_instance_service_proto_rawDescGZIP(), []int{20, 0}
}
-func (x *DataSource_ClientSecretCredential) GetTenantId() string {
+func (x *DataSource_AzureCredential) GetTenantId() string {
if x != nil {
return x.TenantId
}
return ""
}
-func (x *DataSource_ClientSecretCredential) GetClientId() string {
+func (x *DataSource_AzureCredential) GetClientId() string {
if x != nil {
return x.ClientId
}
return ""
}
-func (x *DataSource_ClientSecretCredential) GetClientSecret() string {
+func (x *DataSource_AzureCredential) GetClientSecret() string {
if x != nil {
return x.ClientSecret
}
return ""
}
+type DataSource_AWSCredential struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ AccessKeyId string `protobuf:"bytes,1,opt,name=access_key_id,json=accessKeyId,proto3" json:"access_key_id,omitempty"`
+ SecretAccessKey string `protobuf:"bytes,2,opt,name=secret_access_key,json=secretAccessKey,proto3" json:"secret_access_key,omitempty"`
+ SessionToken string `protobuf:"bytes,3,opt,name=session_token,json=sessionToken,proto3" json:"session_token,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *DataSource_AWSCredential) Reset() {
+ *x = DataSource_AWSCredential{}
+ mi := &file_v1_instance_service_proto_msgTypes[26]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *DataSource_AWSCredential) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DataSource_AWSCredential) ProtoMessage() {}
+
+func (x *DataSource_AWSCredential) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_instance_service_proto_msgTypes[26]
+ 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 DataSource_AWSCredential.ProtoReflect.Descriptor instead.
+func (*DataSource_AWSCredential) Descriptor() ([]byte, []int) {
+ return file_v1_instance_service_proto_rawDescGZIP(), []int{20, 1}
+}
+
+func (x *DataSource_AWSCredential) GetAccessKeyId() string {
+ if x != nil {
+ return x.AccessKeyId
+ }
+ return ""
+}
+
+func (x *DataSource_AWSCredential) GetSecretAccessKey() string {
+ if x != nil {
+ return x.SecretAccessKey
+ }
+ return ""
+}
+
+func (x *DataSource_AWSCredential) GetSessionToken() string {
+ if x != nil {
+ return x.SessionToken
+ }
+ return ""
+}
+
+type DataSource_GCPCredential struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *DataSource_GCPCredential) Reset() {
+ *x = DataSource_GCPCredential{}
+ mi := &file_v1_instance_service_proto_msgTypes[27]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *DataSource_GCPCredential) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DataSource_GCPCredential) ProtoMessage() {}
+
+func (x *DataSource_GCPCredential) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_instance_service_proto_msgTypes[27]
+ 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 DataSource_GCPCredential.ProtoReflect.Descriptor instead.
+func (*DataSource_GCPCredential) Descriptor() ([]byte, []int) {
+ return file_v1_instance_service_proto_rawDescGZIP(), []int{20, 2}
+}
+
+func (x *DataSource_GCPCredential) GetContent() string {
+ if x != nil {
+ return x.Content
+ }
+ return ""
+}
+
type DataSource_Address struct {
state protoimpl.MessageState `protogen:"open.v1"`
Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
@@ -2395,7 +2531,7 @@ type DataSource_Address struct {
func (x *DataSource_Address) Reset() {
*x = DataSource_Address{}
- mi := &file_v1_instance_service_proto_msgTypes[26]
+ mi := &file_v1_instance_service_proto_msgTypes[28]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2407,7 +2543,7 @@ func (x *DataSource_Address) String() string {
func (*DataSource_Address) ProtoMessage() {}
func (x *DataSource_Address) ProtoReflect() protoreflect.Message {
- mi := &file_v1_instance_service_proto_msgTypes[26]
+ mi := &file_v1_instance_service_proto_msgTypes[28]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2420,7 +2556,7 @@ func (x *DataSource_Address) ProtoReflect() protoreflect.Message {
// Deprecated: Use DataSource_Address.ProtoReflect.Descriptor instead.
func (*DataSource_Address) Descriptor() ([]byte, []int) {
- return file_v1_instance_service_proto_rawDescGZIP(), []int{20, 1}
+ return file_v1_instance_service_proto_rawDescGZIP(), []int{20, 3}
}
func (x *DataSource_Address) GetHost() string {
@@ -2561,7 +2697,7 @@ const file_v1_instance_service_proto_rawDesc = "" +
"\x15AUTH_TYPE_UNSPECIFIED\x10\x00\x12\t\n" +
"\x05TOKEN\x10\x01\x12\x12\n" +
"\x0eVAULT_APP_ROLE\x10\x02B\r\n" +
- "\vauth_option\"\x91\x10\n" +
+ "\vauth_option\"\xde\x12\n" +
"\n" +
"DataSource\x12\x0e\n" +
"\x02id\x18\x01 \x01(\tR\x02id\x12/\n" +
@@ -2589,8 +2725,10 @@ const file_v1_instance_service_proto_rawDesc = "" +
"\x0fssh_private_key\x18\x13 \x01(\tB\x04\xe2A\x01\x04R\rsshPrivateKey\x12B\n" +
"\x1aauthentication_private_key\x18\x14 \x01(\tB\x04\xe2A\x01\x04R\x18authenticationPrivateKey\x12N\n" +
"\x0fexternal_secret\x18\x15 \x01(\v2%.bytebase.v1.DataSourceExternalSecretR\x0eexternalSecret\x12[\n" +
- "\x13authentication_type\x18\x16 \x01(\x0e2*.bytebase.v1.DataSource.AuthenticationTypeR\x12authenticationType\x12j\n" +
- "\x18client_secret_credential\x18\x17 \x01(\v2..bytebase.v1.DataSource.ClientSecretCredentialH\x00R\x16clientSecretCredential\x128\n" +
+ "\x13authentication_type\x18\x16 \x01(\x0e2*.bytebase.v1.DataSource.AuthenticationTypeR\x12authenticationType\x12T\n" +
+ "\x10azure_credential\x18\x17 \x01(\v2'.bytebase.v1.DataSource.AzureCredentialH\x00R\x0fazureCredential\x12N\n" +
+ "\x0eaws_credential\x18% \x01(\v2%.bytebase.v1.DataSource.AWSCredentialH\x00R\rawsCredential\x12N\n" +
+ "\x0egcp_credential\x18& \x01(\v2%.bytebase.v1.DataSource.GCPCredentialH\x00R\rgcpCredential\x128\n" +
"\vsasl_config\x18\x18 \x01(\v2\x17.bytebase.v1.SASLConfigR\n" +
"saslConfig\x12X\n" +
"\x14additional_addresses\x18\x1a \x03(\v2\x1f.bytebase.v1.DataSource.AddressB\x04\xe2A\x01\x01R\x13additionalAddresses\x12+\n" +
@@ -2604,11 +2742,17 @@ const file_v1_instance_service_proto_rawDesc = "" +
"\n" +
"redis_type\x18\" \x01(\x0e2!.bytebase.v1.DataSource.RedisTypeR\tredisType\x12\x18\n" +
"\acluster\x18# \x01(\tR\acluster\x12v\n" +
- "\x1bextra_connection_parameters\x18$ \x03(\v26.bytebase.v1.DataSource.ExtraConnectionParametersEntryR\x19extraConnectionParameters\x1a}\n" +
- "\x16ClientSecretCredential\x12\x1b\n" +
+ "\x1bextra_connection_parameters\x18$ \x03(\v26.bytebase.v1.DataSource.ExtraConnectionParametersEntryR\x19extraConnectionParameters\x1av\n" +
+ "\x0fAzureCredential\x12\x1b\n" +
"\ttenant_id\x18\x01 \x01(\tR\btenantId\x12\x1b\n" +
"\tclient_id\x18\x02 \x01(\tR\bclientId\x12)\n" +
- "\rclient_secret\x18\x03 \x01(\tB\x04\xe2A\x01\x03R\fclientSecret\x1a1\n" +
+ "\rclient_secret\x18\x03 \x01(\tB\x04\xe2A\x01\x04R\fclientSecret\x1a\x96\x01\n" +
+ "\rAWSCredential\x12(\n" +
+ "\raccess_key_id\x18\x01 \x01(\tB\x04\xe2A\x01\x04R\vaccessKeyId\x120\n" +
+ "\x11secret_access_key\x18\x02 \x01(\tB\x04\xe2A\x01\x04R\x0fsecretAccessKey\x12)\n" +
+ "\rsession_token\x18\x03 \x01(\tB\x04\xe2A\x01\x04R\fsessionToken\x1a/\n" +
+ "\rGCPCredential\x12\x1e\n" +
+ "\acontent\x18\x01 \x01(\tB\x04\xe2A\x01\x04R\acontent\x1a1\n" +
"\aAddress\x12\x12\n" +
"\x04host\x18\x01 \x01(\tR\x04host\x12\x12\n" +
"\x04port\x18\x02 \x01(\tR\x04port\x1aL\n" +
@@ -2683,7 +2827,7 @@ func file_v1_instance_service_proto_rawDescGZIP() []byte {
}
var file_v1_instance_service_proto_enumTypes = make([]protoimpl.EnumInfo, 6)
-var file_v1_instance_service_proto_msgTypes = make([]protoimpl.MessageInfo, 28)
+var file_v1_instance_service_proto_msgTypes = make([]protoimpl.MessageInfo, 30)
var file_v1_instance_service_proto_goTypes = []any{
(DataSourceType)(0), // 0: bytebase.v1.DataSourceType
(DataSourceExternalSecret_SecretType)(0), // 1: bytebase.v1.DataSourceExternalSecret.SecretType
@@ -2716,22 +2860,24 @@ var file_v1_instance_service_proto_goTypes = []any{
(*SASLConfig)(nil), // 28: bytebase.v1.SASLConfig
(*KerberosConfig)(nil), // 29: bytebase.v1.KerberosConfig
(*DataSourceExternalSecret_AppRoleAuthOption)(nil), // 30: bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption
- (*DataSource_ClientSecretCredential)(nil), // 31: bytebase.v1.DataSource.ClientSecretCredential
- (*DataSource_Address)(nil), // 32: bytebase.v1.DataSource.Address
- nil, // 33: bytebase.v1.DataSource.ExtraConnectionParametersEntry
- (*fieldmaskpb.FieldMask)(nil), // 34: google.protobuf.FieldMask
- (State)(0), // 35: bytebase.v1.State
- (Engine)(0), // 36: bytebase.v1.Engine
- (*InstanceRole)(nil), // 37: bytebase.v1.InstanceRole
- (*durationpb.Duration)(nil), // 38: google.protobuf.Duration
- (*timestamppb.Timestamp)(nil), // 39: google.protobuf.Timestamp
- (*emptypb.Empty)(nil), // 40: google.protobuf.Empty
+ (*DataSource_AzureCredential)(nil), // 31: bytebase.v1.DataSource.AzureCredential
+ (*DataSource_AWSCredential)(nil), // 32: bytebase.v1.DataSource.AWSCredential
+ (*DataSource_GCPCredential)(nil), // 33: bytebase.v1.DataSource.GCPCredential
+ (*DataSource_Address)(nil), // 34: bytebase.v1.DataSource.Address
+ nil, // 35: bytebase.v1.DataSource.ExtraConnectionParametersEntry
+ (*fieldmaskpb.FieldMask)(nil), // 36: google.protobuf.FieldMask
+ (State)(0), // 37: bytebase.v1.State
+ (Engine)(0), // 38: bytebase.v1.Engine
+ (*InstanceRole)(nil), // 39: bytebase.v1.InstanceRole
+ (*durationpb.Duration)(nil), // 40: google.protobuf.Duration
+ (*timestamppb.Timestamp)(nil), // 41: google.protobuf.Timestamp
+ (*emptypb.Empty)(nil), // 42: 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
- 34, // 3: bytebase.v1.UpdateInstanceRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 36, // 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
@@ -2739,59 +2885,61 @@ var file_v1_instance_service_proto_depIdxs = []int32{
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
- 34, // 11: bytebase.v1.UpdateDataSourceRequest.update_mask:type_name -> google.protobuf.FieldMask
- 35, // 12: bytebase.v1.Instance.state:type_name -> bytebase.v1.State
- 36, // 13: bytebase.v1.Instance.engine:type_name -> bytebase.v1.Engine
+ 36, // 11: bytebase.v1.UpdateDataSourceRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 37, // 12: bytebase.v1.Instance.state:type_name -> bytebase.v1.State
+ 38, // 13: bytebase.v1.Instance.engine:type_name -> bytebase.v1.Engine
26, // 14: bytebase.v1.Instance.data_sources:type_name -> bytebase.v1.DataSource
- 37, // 15: bytebase.v1.Instance.roles:type_name -> bytebase.v1.InstanceRole
- 38, // 16: bytebase.v1.Instance.sync_interval:type_name -> google.protobuf.Duration
- 39, // 17: bytebase.v1.Instance.last_sync_time:type_name -> google.protobuf.Timestamp
+ 39, // 15: bytebase.v1.Instance.roles:type_name -> bytebase.v1.InstanceRole
+ 40, // 16: bytebase.v1.Instance.sync_interval:type_name -> google.protobuf.Duration
+ 41, // 17: bytebase.v1.Instance.last_sync_time:type_name -> google.protobuf.Timestamp
1, // 18: bytebase.v1.DataSourceExternalSecret.secret_type:type_name -> bytebase.v1.DataSourceExternalSecret.SecretType
2, // 19: bytebase.v1.DataSourceExternalSecret.auth_type:type_name -> bytebase.v1.DataSourceExternalSecret.AuthType
30, // 20: bytebase.v1.DataSourceExternalSecret.app_role:type_name -> bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption
0, // 21: bytebase.v1.DataSource.type:type_name -> bytebase.v1.DataSourceType
25, // 22: bytebase.v1.DataSource.external_secret:type_name -> bytebase.v1.DataSourceExternalSecret
4, // 23: bytebase.v1.DataSource.authentication_type:type_name -> bytebase.v1.DataSource.AuthenticationType
- 31, // 24: bytebase.v1.DataSource.client_secret_credential:type_name -> bytebase.v1.DataSource.ClientSecretCredential
- 28, // 25: bytebase.v1.DataSource.sasl_config:type_name -> bytebase.v1.SASLConfig
- 32, // 26: bytebase.v1.DataSource.additional_addresses:type_name -> bytebase.v1.DataSource.Address
- 5, // 27: bytebase.v1.DataSource.redis_type:type_name -> bytebase.v1.DataSource.RedisType
- 33, // 28: bytebase.v1.DataSource.extra_connection_parameters:type_name -> bytebase.v1.DataSource.ExtraConnectionParametersEntry
- 36, // 29: bytebase.v1.InstanceResource.engine:type_name -> bytebase.v1.Engine
- 26, // 30: bytebase.v1.InstanceResource.data_sources:type_name -> bytebase.v1.DataSource
- 29, // 31: bytebase.v1.SASLConfig.krb_config:type_name -> bytebase.v1.KerberosConfig
- 3, // 32: bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.type:type_name -> bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType
- 6, // 33: bytebase.v1.InstanceService.GetInstance:input_type -> bytebase.v1.GetInstanceRequest
- 7, // 34: bytebase.v1.InstanceService.ListInstances:input_type -> bytebase.v1.ListInstancesRequest
- 9, // 35: bytebase.v1.InstanceService.CreateInstance:input_type -> bytebase.v1.CreateInstanceRequest
- 10, // 36: bytebase.v1.InstanceService.UpdateInstance:input_type -> bytebase.v1.UpdateInstanceRequest
- 11, // 37: bytebase.v1.InstanceService.DeleteInstance:input_type -> bytebase.v1.DeleteInstanceRequest
- 12, // 38: bytebase.v1.InstanceService.UndeleteInstance:input_type -> bytebase.v1.UndeleteInstanceRequest
- 13, // 39: bytebase.v1.InstanceService.SyncInstance:input_type -> bytebase.v1.SyncInstanceRequest
- 14, // 40: bytebase.v1.InstanceService.ListInstanceDatabase:input_type -> bytebase.v1.ListInstanceDatabaseRequest
- 17, // 41: bytebase.v1.InstanceService.BatchSyncInstances:input_type -> bytebase.v1.BatchSyncInstancesRequest
- 19, // 42: bytebase.v1.InstanceService.BatchUpdateInstances:input_type -> bytebase.v1.BatchUpdateInstancesRequest
- 21, // 43: bytebase.v1.InstanceService.AddDataSource:input_type -> bytebase.v1.AddDataSourceRequest
- 22, // 44: bytebase.v1.InstanceService.RemoveDataSource:input_type -> bytebase.v1.RemoveDataSourceRequest
- 23, // 45: bytebase.v1.InstanceService.UpdateDataSource:input_type -> bytebase.v1.UpdateDataSourceRequest
- 24, // 46: bytebase.v1.InstanceService.GetInstance:output_type -> bytebase.v1.Instance
- 8, // 47: bytebase.v1.InstanceService.ListInstances:output_type -> bytebase.v1.ListInstancesResponse
- 24, // 48: bytebase.v1.InstanceService.CreateInstance:output_type -> bytebase.v1.Instance
- 24, // 49: bytebase.v1.InstanceService.UpdateInstance:output_type -> bytebase.v1.Instance
- 40, // 50: bytebase.v1.InstanceService.DeleteInstance:output_type -> google.protobuf.Empty
- 24, // 51: bytebase.v1.InstanceService.UndeleteInstance:output_type -> bytebase.v1.Instance
- 16, // 52: bytebase.v1.InstanceService.SyncInstance:output_type -> bytebase.v1.SyncInstanceResponse
- 15, // 53: bytebase.v1.InstanceService.ListInstanceDatabase:output_type -> bytebase.v1.ListInstanceDatabaseResponse
- 18, // 54: bytebase.v1.InstanceService.BatchSyncInstances:output_type -> bytebase.v1.BatchSyncInstancesResponse
- 20, // 55: bytebase.v1.InstanceService.BatchUpdateInstances:output_type -> bytebase.v1.BatchUpdateInstancesResponse
- 24, // 56: bytebase.v1.InstanceService.AddDataSource:output_type -> bytebase.v1.Instance
- 24, // 57: bytebase.v1.InstanceService.RemoveDataSource:output_type -> bytebase.v1.Instance
- 24, // 58: bytebase.v1.InstanceService.UpdateDataSource:output_type -> bytebase.v1.Instance
- 46, // [46:59] is the sub-list for method output_type
- 33, // [33:46] is the sub-list for method input_type
- 33, // [33:33] is the sub-list for extension type_name
- 33, // [33:33] is the sub-list for extension extendee
- 0, // [0:33] is the sub-list for field type_name
+ 31, // 24: bytebase.v1.DataSource.azure_credential:type_name -> bytebase.v1.DataSource.AzureCredential
+ 32, // 25: bytebase.v1.DataSource.aws_credential:type_name -> bytebase.v1.DataSource.AWSCredential
+ 33, // 26: bytebase.v1.DataSource.gcp_credential:type_name -> bytebase.v1.DataSource.GCPCredential
+ 28, // 27: bytebase.v1.DataSource.sasl_config:type_name -> bytebase.v1.SASLConfig
+ 34, // 28: bytebase.v1.DataSource.additional_addresses:type_name -> bytebase.v1.DataSource.Address
+ 5, // 29: bytebase.v1.DataSource.redis_type:type_name -> bytebase.v1.DataSource.RedisType
+ 35, // 30: bytebase.v1.DataSource.extra_connection_parameters:type_name -> bytebase.v1.DataSource.ExtraConnectionParametersEntry
+ 38, // 31: bytebase.v1.InstanceResource.engine:type_name -> bytebase.v1.Engine
+ 26, // 32: bytebase.v1.InstanceResource.data_sources:type_name -> bytebase.v1.DataSource
+ 29, // 33: bytebase.v1.SASLConfig.krb_config:type_name -> bytebase.v1.KerberosConfig
+ 3, // 34: bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.type:type_name -> bytebase.v1.DataSourceExternalSecret.AppRoleAuthOption.SecretType
+ 6, // 35: bytebase.v1.InstanceService.GetInstance:input_type -> bytebase.v1.GetInstanceRequest
+ 7, // 36: bytebase.v1.InstanceService.ListInstances:input_type -> bytebase.v1.ListInstancesRequest
+ 9, // 37: bytebase.v1.InstanceService.CreateInstance:input_type -> bytebase.v1.CreateInstanceRequest
+ 10, // 38: bytebase.v1.InstanceService.UpdateInstance:input_type -> bytebase.v1.UpdateInstanceRequest
+ 11, // 39: bytebase.v1.InstanceService.DeleteInstance:input_type -> bytebase.v1.DeleteInstanceRequest
+ 12, // 40: bytebase.v1.InstanceService.UndeleteInstance:input_type -> bytebase.v1.UndeleteInstanceRequest
+ 13, // 41: bytebase.v1.InstanceService.SyncInstance:input_type -> bytebase.v1.SyncInstanceRequest
+ 14, // 42: bytebase.v1.InstanceService.ListInstanceDatabase:input_type -> bytebase.v1.ListInstanceDatabaseRequest
+ 17, // 43: bytebase.v1.InstanceService.BatchSyncInstances:input_type -> bytebase.v1.BatchSyncInstancesRequest
+ 19, // 44: bytebase.v1.InstanceService.BatchUpdateInstances:input_type -> bytebase.v1.BatchUpdateInstancesRequest
+ 21, // 45: bytebase.v1.InstanceService.AddDataSource:input_type -> bytebase.v1.AddDataSourceRequest
+ 22, // 46: bytebase.v1.InstanceService.RemoveDataSource:input_type -> bytebase.v1.RemoveDataSourceRequest
+ 23, // 47: bytebase.v1.InstanceService.UpdateDataSource:input_type -> bytebase.v1.UpdateDataSourceRequest
+ 24, // 48: bytebase.v1.InstanceService.GetInstance:output_type -> bytebase.v1.Instance
+ 8, // 49: bytebase.v1.InstanceService.ListInstances:output_type -> bytebase.v1.ListInstancesResponse
+ 24, // 50: bytebase.v1.InstanceService.CreateInstance:output_type -> bytebase.v1.Instance
+ 24, // 51: bytebase.v1.InstanceService.UpdateInstance:output_type -> bytebase.v1.Instance
+ 42, // 52: bytebase.v1.InstanceService.DeleteInstance:output_type -> google.protobuf.Empty
+ 24, // 53: bytebase.v1.InstanceService.UndeleteInstance:output_type -> bytebase.v1.Instance
+ 16, // 54: bytebase.v1.InstanceService.SyncInstance:output_type -> bytebase.v1.SyncInstanceResponse
+ 15, // 55: bytebase.v1.InstanceService.ListInstanceDatabase:output_type -> bytebase.v1.ListInstanceDatabaseResponse
+ 18, // 56: bytebase.v1.InstanceService.BatchSyncInstances:output_type -> bytebase.v1.BatchSyncInstancesResponse
+ 20, // 57: bytebase.v1.InstanceService.BatchUpdateInstances:output_type -> bytebase.v1.BatchUpdateInstancesResponse
+ 24, // 58: bytebase.v1.InstanceService.AddDataSource:output_type -> bytebase.v1.Instance
+ 24, // 59: bytebase.v1.InstanceService.RemoveDataSource:output_type -> bytebase.v1.Instance
+ 24, // 60: bytebase.v1.InstanceService.UpdateDataSource:output_type -> bytebase.v1.Instance
+ 48, // [48:61] is the sub-list for method output_type
+ 35, // [35:48] is the sub-list for method input_type
+ 35, // [35:35] is the sub-list for extension type_name
+ 35, // [35:35] is the sub-list for extension extendee
+ 0, // [0:35] is the sub-list for field type_name
}
func init() { file_v1_instance_service_proto_init() }
@@ -2808,7 +2956,9 @@ func file_v1_instance_service_proto_init() {
(*DataSourceExternalSecret_Token)(nil),
}
file_v1_instance_service_proto_msgTypes[20].OneofWrappers = []any{
- (*DataSource_ClientSecretCredential_)(nil),
+ (*DataSource_AzureCredential_)(nil),
+ (*DataSource_AwsCredential)(nil),
+ (*DataSource_GcpCredential)(nil),
}
file_v1_instance_service_proto_msgTypes[22].OneofWrappers = []any{
(*SASLConfig_KrbConfig)(nil),
@@ -2819,7 +2969,7 @@ func file_v1_instance_service_proto_init() {
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,
- NumMessages: 28,
+ NumMessages: 30,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/proto/store/store/instance.proto b/proto/store/store/instance.proto
index 70d14bd89e..4eb8d30e74 100644
--- a/proto/store/store/instance.proto
+++ b/proto/store/store/instance.proto
@@ -113,14 +113,28 @@ message DataSource {
}
AuthenticationType authentication_type = 22;
- message ClientSecretCredential {
+ message AzureCredential {
string tenant_id = 1;
string client_id = 2;
string client_secret = 3;
string obfuscated_client_secret = 4;
}
+ message AWSCredential {
+ string access_key_id = 1;
+ string obfuscated_access_key_id = 2;
+ string secret_access_key = 3;
+ string obfuscated_secret_access_key = 4;
+ string session_token = 5;
+ string obfuscated_session_token = 6;
+ }
+ message GCPCredential {
+ string content = 1;
+ string obfuscated_content = 2;
+ }
oneof iam_extension {
- ClientSecretCredential client_secret_credential = 23;
+ AzureCredential azure_credential = 23;
+ AWSCredential aws_credential = 45;
+ GCPCredential gcp_credential = 46;
}
SASLConfig sasl_config = 24;
diff --git a/proto/v1/v1/instance_service.proto b/proto/v1/v1/instance_service.proto
index 50ebbff684..4c1a8311d9 100644
--- a/proto/v1/v1/instance_service.proto
+++ b/proto/v1/v1/instance_service.proto
@@ -517,13 +517,23 @@ message DataSource {
}
AuthenticationType authentication_type = 22;
- message ClientSecretCredential {
+ message AzureCredential {
string tenant_id = 1;
string client_id = 2;
- string client_secret = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
+ string client_secret = 3 [(google.api.field_behavior) = INPUT_ONLY];
+ }
+ message AWSCredential {
+ string access_key_id = 1 [(google.api.field_behavior) = INPUT_ONLY];
+ string secret_access_key = 2 [(google.api.field_behavior) = INPUT_ONLY];
+ string session_token = 3 [(google.api.field_behavior) = INPUT_ONLY];
+ }
+ message GCPCredential {
+ string content = 1 [(google.api.field_behavior) = INPUT_ONLY];
}
oneof iam_extension {
- ClientSecretCredential client_secret_credential = 23;
+ AzureCredential azure_credential = 23;
+ AWSCredential aws_credential = 37;
+ GCPCredential gcp_credential = 38;
}
SASLConfig sasl_config = 24;