From 43ede4adc17b2e55d3c6168713fed52dc92185f6 Mon Sep 17 00:00:00 2001 From: TianTan Date: Thu, 1 Aug 2024 16:10:34 +0800 Subject: [PATCH] fix(vaultform): fix compatibility of STS endpoint url in Konnect (#1525) --- .../entities/entities-vaults/src/components/VaultForm.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/entities/entities-vaults/src/components/VaultForm.vue b/packages/entities/entities-vaults/src/components/VaultForm.vue index fe650e4625..d179e40c28 100644 --- a/packages/entities/entities-vaults/src/components/VaultForm.vue +++ b/packages/entities/entities-vaults/src/components/VaultForm.vue @@ -640,7 +640,6 @@ const configFields = reactive({ endpoint_url: '', assume_role_arn: '', role_session_name: 'KongVault', - sts_endpoint_url: '', } as AWSVaultConfig, [VaultProviders.GCP]: { project_id: '', @@ -683,7 +682,6 @@ const originalConfigFields = reactive({ endpoint_url: '', assume_role_arn: '', role_session_name: 'KongVault', - sts_endpoint_url: '', } as AWSVaultConfig, [VaultProviders.GCP]: { project_id: '', @@ -964,7 +962,7 @@ const getPayload = computed((): Record => { ...configFields[vaultProvider.value], endpoint_url: (configFields[vaultProvider.value] as AWSVaultConfig).endpoint_url || null, assume_role_arn: (configFields[vaultProvider.value] as AWSVaultConfig).assume_role_arn || null, - sts_endpoint_url: (configFields[vaultProvider.value] as AWSVaultConfig).sts_endpoint_url || null, + ...(props.config.awsStsEndpointUrlAvailable ? { sts_endpoint_url: (configFields[vaultProvider.value] as AWSVaultConfig).sts_endpoint_url || null } : {}), } let config: VaultPayload['config'] = configFields[vaultProvider.value]