From f3715f6608482db26357210415720900a99247db Mon Sep 17 00:00:00 2001 From: Elena Makarova Date: Fri, 17 Oct 2025 13:28:56 +0300 Subject: [PATCH 1/4] feat: add aws auth method --- .../ExternalDataSource/ExternalDataSource.tsx | 17 +++++++++++++---- src/containers/Tenant/Info/i18n/en.json | 1 + 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/containers/Tenant/Info/ExternalDataSource/ExternalDataSource.tsx b/src/containers/Tenant/Info/ExternalDataSource/ExternalDataSource.tsx index d4aab238f1..816f61ad38 100644 --- a/src/containers/Tenant/Info/ExternalDataSource/ExternalDataSource.tsx +++ b/src/containers/Tenant/Info/ExternalDataSource/ExternalDataSource.tsx @@ -28,8 +28,19 @@ const prepareExternalDataSourceSummary = (data: TEvDescribeSchemeResult) => { return info; }; +function getAuthMethodValue(data: TEvDescribeSchemeResult) { + const {Auth} = data.PathDescription?.ExternalDataSourceDescription || {}; + if (Auth?.ServiceAccount) { + return i18n('external-objects.auth-method.service-account'); + } + if (Auth?.Aws) { + return i18n('external-objects.auth-method.aws'); + } + return i18n('external-objects.auth-method.none'); +} + const prepareExternalDataSourceInfo = (data: TEvDescribeSchemeResult): InfoViewerItem[] => { - const {Location, Auth} = data.PathDescription?.ExternalDataSourceDescription || {}; + const {Location} = data.PathDescription?.ExternalDataSourceDescription || {}; return [ ...prepareExternalDataSourceSummary(data), @@ -47,9 +58,7 @@ const prepareExternalDataSourceInfo = (data: TEvDescribeSchemeResult): InfoViewe }, { label: i18n('external-objects.auth-method'), - value: Auth?.ServiceAccount - ? i18n('external-objects.auth-method.service-account') - : i18n('external-objects.auth-method.none'), + value: getAuthMethodValue(data), }, ]; }; diff --git a/src/containers/Tenant/Info/i18n/en.json b/src/containers/Tenant/Info/i18n/en.json index 2b0392cedd..c657fe4024 100644 --- a/src/containers/Tenant/Info/i18n/en.json +++ b/src/containers/Tenant/Info/i18n/en.json @@ -5,6 +5,7 @@ "external-objects.auth-method": "Auth Method", "external-objects.auth-method.none": "None", "external-objects.auth-method.service-account": "Service Account", + "external-objects.auth-method.aws": "AWS", "view.query-text": "Query Text", From 7278eaf015be5e427470738c12fcf7f8b045ad20 Mon Sep 17 00:00:00 2001 From: Elena Makarova Date: Fri, 17 Oct 2025 13:29:58 +0300 Subject: [PATCH 2/4] types --- src/types/api/schema/externalDataSource.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/types/api/schema/externalDataSource.ts b/src/types/api/schema/externalDataSource.ts index 7eaaadc139..f483ba8bbf 100644 --- a/src/types/api/schema/externalDataSource.ts +++ b/src/types/api/schema/externalDataSource.ts @@ -14,6 +14,7 @@ export interface TExternalDataSourceDescription { interface TAuth { None?: NoneAuth; ServiceAccount?: ServiceAccountAuth; + Aws?: AwsAuth; } interface NoneAuth {} @@ -22,3 +23,8 @@ interface ServiceAccountAuth { Id?: string; SecretName?: string; } +interface AwsAuth { + AwsSecretAccessKeySecretName?: string; + AwsRegion?: string; + AwsAccessKeyIdSecretName?: string; +} From 07c0b59f650000dbb699a50f6aa9392a6a09800e Mon Sep 17 00:00:00 2001 From: Elena Makarova Date: Fri, 17 Oct 2025 13:46:46 +0300 Subject: [PATCH 3/4] add other methods --- .../ExternalDataSource/ExternalDataSource.tsx | 9 +++++++++ src/containers/Tenant/Info/i18n/en.json | 3 +++ src/types/api/schema/externalDataSource.ts | 15 +++++++++++++++ 3 files changed, 27 insertions(+) diff --git a/src/containers/Tenant/Info/ExternalDataSource/ExternalDataSource.tsx b/src/containers/Tenant/Info/ExternalDataSource/ExternalDataSource.tsx index 816f61ad38..24775aea80 100644 --- a/src/containers/Tenant/Info/ExternalDataSource/ExternalDataSource.tsx +++ b/src/containers/Tenant/Info/ExternalDataSource/ExternalDataSource.tsx @@ -36,6 +36,15 @@ function getAuthMethodValue(data: TEvDescribeSchemeResult) { if (Auth?.Aws) { return i18n('external-objects.auth-method.aws'); } + if (Auth?.Token) { + return i18n('external-objects.auth-method.token'); + } + if (Auth?.Basic) { + return i18n('external-objects.auth-method.basic'); + } + if (Auth?.MdbBasic) { + return i18n('external-objects.auth-method.mdb-basic'); + } return i18n('external-objects.auth-method.none'); } diff --git a/src/containers/Tenant/Info/i18n/en.json b/src/containers/Tenant/Info/i18n/en.json index c657fe4024..a96d0e34e2 100644 --- a/src/containers/Tenant/Info/i18n/en.json +++ b/src/containers/Tenant/Info/i18n/en.json @@ -6,6 +6,9 @@ "external-objects.auth-method.none": "None", "external-objects.auth-method.service-account": "Service Account", "external-objects.auth-method.aws": "AWS", + "external-objects.auth-method.token": "Token", + "external-objects.auth-method.basic": "Basic", + "external-objects.auth-method.mdb-basic": "MDB Basic", "view.query-text": "Query Text", diff --git a/src/types/api/schema/externalDataSource.ts b/src/types/api/schema/externalDataSource.ts index f483ba8bbf..8125bb2f76 100644 --- a/src/types/api/schema/externalDataSource.ts +++ b/src/types/api/schema/externalDataSource.ts @@ -15,6 +15,9 @@ interface TAuth { None?: NoneAuth; ServiceAccount?: ServiceAccountAuth; Aws?: AwsAuth; + Token?: string; + MdbBasic?: MdbBasic; + Basic?: Basic; } interface NoneAuth {} @@ -28,3 +31,15 @@ interface AwsAuth { AwsRegion?: string; AwsAccessKeyIdSecretName?: string; } + +interface Basic { + Login?: string; + PasswordSecretName?: string; +} + +interface MdbBasic { + ServiceAccountId?: string; + ServiceAccountSecretName?: string; + Login?: string; + PasswordSecretName?: string; +} From 73b5921c39a442553d26d76c5a8ba9141ea78fff Mon Sep 17 00:00:00 2001 From: Elena Makarova Date: Fri, 17 Oct 2025 13:48:44 +0300 Subject: [PATCH 4/4] types --- src/types/api/schema/externalDataSource.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/types/api/schema/externalDataSource.ts b/src/types/api/schema/externalDataSource.ts index 8125bb2f76..37b07fd5f7 100644 --- a/src/types/api/schema/externalDataSource.ts +++ b/src/types/api/schema/externalDataSource.ts @@ -15,7 +15,7 @@ interface TAuth { None?: NoneAuth; ServiceAccount?: ServiceAccountAuth; Aws?: AwsAuth; - Token?: string; + Token?: Token; MdbBasic?: MdbBasic; Basic?: Basic; } @@ -43,3 +43,7 @@ interface MdbBasic { Login?: string; PasswordSecretName?: string; } + +interface Token { + TokenSecretName?: string; +}