From 8d52011173c811b77b85df28c3370ae209627a0b Mon Sep 17 00:00:00 2001 From: Daniel Hougaard Date: Fri, 7 Feb 2025 23:41:07 +0400 Subject: [PATCH] requested changes --- .../app-connection/app-connection-service.ts | 3 +- ...re-app-configuration-connection-schemas.ts | 1 - .../azure-key-vault-connection-schemas.ts | 1 - .../azure-app-configuration-sync-fns.ts | 29 +++++++++++++--- .../azure-key-vault-sync-fns.ts | 8 ++++- .../azure-app-configuration/available.mdx | 4 +++ .../azure-app-configuration/create.mdx | 10 ++++++ .../azure-app-configuration/delete.mdx | 4 +++ .../azure-app-configuration/get-by-id.mdx | 4 +++ .../azure-app-configuration/get-by-name.mdx | 4 +++ .../azure-app-configuration/list.mdx | 4 +++ .../azure-app-configuration/update.mdx | 10 ++++++ .../azure-key-vault/available.mdx | 4 +++ .../azure-key-vault/create.mdx | 10 ++++++ .../azure-key-vault/delete.mdx | 4 +++ .../azure-key-vault/get-by-id.mdx | 4 +++ .../azure-key-vault/get-by-name.mdx | 4 +++ .../app-connections/azure-key-vault/list.mdx | 4 +++ .../azure-key-vault/update.mdx | 10 ++++++ .../azure-app-configuration.mdx | 2 +- .../app-connections/azure-key-vault.mdx | 4 +-- .../secret-syncs/azure-app-configuration.mdx | 10 +++--- .../secret-syncs/azure-key-vault.mdx | 5 ++- docs/mint.json | 26 ++++++++++++++- .../OauthCallbackPage/OauthCallbackPage.tsx | 33 ++++++++++++------- .../AzureAppConfigurationConnectionForm.tsx | 3 +- .../AzureKeyVaultConnectionForm.tsx | 3 +- 27 files changed, 173 insertions(+), 35 deletions(-) create mode 100644 docs/api-reference/endpoints/app-connections/azure-app-configuration/available.mdx create mode 100644 docs/api-reference/endpoints/app-connections/azure-app-configuration/create.mdx create mode 100644 docs/api-reference/endpoints/app-connections/azure-app-configuration/delete.mdx create mode 100644 docs/api-reference/endpoints/app-connections/azure-app-configuration/get-by-id.mdx create mode 100644 docs/api-reference/endpoints/app-connections/azure-app-configuration/get-by-name.mdx create mode 100644 docs/api-reference/endpoints/app-connections/azure-app-configuration/list.mdx create mode 100644 docs/api-reference/endpoints/app-connections/azure-app-configuration/update.mdx create mode 100644 docs/api-reference/endpoints/app-connections/azure-key-vault/available.mdx create mode 100644 docs/api-reference/endpoints/app-connections/azure-key-vault/create.mdx create mode 100644 docs/api-reference/endpoints/app-connections/azure-key-vault/delete.mdx create mode 100644 docs/api-reference/endpoints/app-connections/azure-key-vault/get-by-id.mdx create mode 100644 docs/api-reference/endpoints/app-connections/azure-key-vault/get-by-name.mdx create mode 100644 docs/api-reference/endpoints/app-connections/azure-key-vault/list.mdx create mode 100644 docs/api-reference/endpoints/app-connections/azure-key-vault/update.mdx diff --git a/backend/src/services/app-connection/app-connection-service.ts b/backend/src/services/app-connection/app-connection-service.ts index 5504bdf18..b5397b915 100644 --- a/backend/src/services/app-connection/app-connection-service.ts +++ b/backend/src/services/app-connection/app-connection-service.ts @@ -28,6 +28,7 @@ import { githubConnectionService } from "@app/services/app-connection/github/git import { TKmsServiceFactory } from "@app/services/kms/kms-service"; import { TAppConnectionDALFactory } from "./app-connection-dal"; +import { ValidateAzureAppConfigurationConnectionCredentialsSchema } from "./azure-app-configuration"; import { ValidateAzureKeyVaultConnectionCredentialsSchema } from "./azure-key-vault"; import { ValidateGcpConnectionCredentialsSchema } from "./gcp"; import { gcpConnectionService } from "./gcp/gcp-connection-service"; @@ -45,7 +46,7 @@ const VALIDATE_APP_CONNECTION_CREDENTIALS_MAP: Record [entry.key, entry.value]) ); + const azureAppConfigSecrets = Object.fromEntries( + ( + await $getCompleteAzureAppConfigValues( + accessToken, + secretSync.destinationConfig.configurationUrl, + azureAppConfigValuesUrlAllSecrets + ) + ).map((entry) => [ + entry.key, + { + value: entry.value, + label: entry.label + } + ]) + ); + // add the secrets to azure app config, that are in infisical for await (const key of Object.keys(secretMap)) { - if (!(key in azureAppConfigSecrets) || secretMap[key]?.value !== azureAppConfigSecrets[key]) { + if (!(key in azureAppConfigSecretsLabeled) || secretMap[key]?.value !== azureAppConfigSecretsLabeled[key]) { await request.put( `${secretSync.destinationConfig.configurationUrl}/kv/${key}?api-version=2023-11-01`, { @@ -117,14 +136,14 @@ export const azureAppConfigurationSecretSyncFactory = ({ } } - // delete the secrets that are in azure app config, but not in infisical for await (const key of Object.keys(azureAppConfigSecrets)) { - if (!(key in secretMap) || secretMap[key] === null) { + const azureSecret = azureAppConfigSecrets[key]; + if (!(key in secretMap) || secretMap[key] === null || azureSecret.label !== secretSync.destinationConfig.label) { await $deleteAzureSecret( accessToken, secretSync.destinationConfig.configurationUrl, key, - secretSync.destinationConfig.label + azureSecret.label // use the secret's actual label for deletion ); } } diff --git a/backend/src/services/secret-sync/azure-key-vault/azure-key-vault-sync-fns.ts b/backend/src/services/secret-sync/azure-key-vault/azure-key-vault-sync-fns.ts index ea3e251ad..e4254074d 100644 --- a/backend/src/services/secret-sync/azure-key-vault/azure-key-vault-sync-fns.ts +++ b/backend/src/services/secret-sync/azure-key-vault/azure-key-vault-sync-fns.ts @@ -7,6 +7,7 @@ import { getAzureConnectionAccessToken } from "@app/services/app-connection/azur import { TKmsServiceFactory } from "@app/services/kms/kms-service"; import { TSecretMap } from "@app/services/secret-sync/secret-sync-types"; +import { SecretSyncError } from "../secret-sync-errors"; import { GetAzureKeyVaultSecret, TAzureKeyVaultSyncWithCredentials } from "./azure-key-vault-sync-types"; type TAzureKeyVaultSecretSyncFactoryDeps = { @@ -127,6 +128,7 @@ export const azureKeyVaultSecretSyncFactory = ({ const setSecretAzureKeyVault = async ({ key, value }: { key: string; value: string }) => { let isSecretSet = false; + let syncError: Error | null = null; let maxTries = 6; if (disabledAzureKeyVaultSecretKeys.includes(key)) return; @@ -147,6 +149,7 @@ export const azureKeyVaultSecretSyncFactory = ({ isSecretSet = true; } catch (err) { + syncError = err as Error; if (err instanceof AxiosError) { // eslint-disable-next-line if (err.response?.data?.error?.innererror?.code === "ObjectIsDeletedButRecoverable") { @@ -174,7 +177,10 @@ export const azureKeyVaultSecretSyncFactory = ({ } if (!isSecretSet) { - throw new Error(`Failed to set secret ${key}`); + throw new SecretSyncError({ + error: syncError, + secretKey: key + }); } }; diff --git a/docs/api-reference/endpoints/app-connections/azure-app-configuration/available.mdx b/docs/api-reference/endpoints/app-connections/azure-app-configuration/available.mdx new file mode 100644 index 000000000..03d5f3537 --- /dev/null +++ b/docs/api-reference/endpoints/app-connections/azure-app-configuration/available.mdx @@ -0,0 +1,4 @@ +--- +title: "Available" +openapi: "GET /api/v1/app-connections/azure-app-configuration/available" +--- diff --git a/docs/api-reference/endpoints/app-connections/azure-app-configuration/create.mdx b/docs/api-reference/endpoints/app-connections/azure-app-configuration/create.mdx new file mode 100644 index 000000000..6c429c369 --- /dev/null +++ b/docs/api-reference/endpoints/app-connections/azure-app-configuration/create.mdx @@ -0,0 +1,10 @@ +--- +title: "Create" +openapi: "POST /api/v1/app-connections/azure-app-configuration" +--- + + + Azure App Configuration Connections must be created through the Infisical UI. + Check out the configuration docs for [Azure App Configuration Connections](/integrations/app-connections/azure-app-configuration) for a step-by-step + guide. + \ No newline at end of file diff --git a/docs/api-reference/endpoints/app-connections/azure-app-configuration/delete.mdx b/docs/api-reference/endpoints/app-connections/azure-app-configuration/delete.mdx new file mode 100644 index 000000000..cc2e4ca38 --- /dev/null +++ b/docs/api-reference/endpoints/app-connections/azure-app-configuration/delete.mdx @@ -0,0 +1,4 @@ +--- +title: "Delete" +openapi: "DELETE /api/v1/app-connections/azure-app-configuration/{connectionId}" +--- diff --git a/docs/api-reference/endpoints/app-connections/azure-app-configuration/get-by-id.mdx b/docs/api-reference/endpoints/app-connections/azure-app-configuration/get-by-id.mdx new file mode 100644 index 000000000..c49afe500 --- /dev/null +++ b/docs/api-reference/endpoints/app-connections/azure-app-configuration/get-by-id.mdx @@ -0,0 +1,4 @@ +--- +title: "Get by ID" +openapi: "GET /api/v1/app-connections/azure-app-configuration/{connectionId}" +--- diff --git a/docs/api-reference/endpoints/app-connections/azure-app-configuration/get-by-name.mdx b/docs/api-reference/endpoints/app-connections/azure-app-configuration/get-by-name.mdx new file mode 100644 index 000000000..a38365b01 --- /dev/null +++ b/docs/api-reference/endpoints/app-connections/azure-app-configuration/get-by-name.mdx @@ -0,0 +1,4 @@ +--- +title: "Get by Name" +openapi: "GET /api/v1/app-connections/azure-app-configuration/connection-name/{connectionName}" +--- diff --git a/docs/api-reference/endpoints/app-connections/azure-app-configuration/list.mdx b/docs/api-reference/endpoints/app-connections/azure-app-configuration/list.mdx new file mode 100644 index 000000000..4da96476d --- /dev/null +++ b/docs/api-reference/endpoints/app-connections/azure-app-configuration/list.mdx @@ -0,0 +1,4 @@ +--- +title: "List" +openapi: "GET /api/v1/app-connections/azure-app-configuration" +--- diff --git a/docs/api-reference/endpoints/app-connections/azure-app-configuration/update.mdx b/docs/api-reference/endpoints/app-connections/azure-app-configuration/update.mdx new file mode 100644 index 000000000..65d29899e --- /dev/null +++ b/docs/api-reference/endpoints/app-connections/azure-app-configuration/update.mdx @@ -0,0 +1,10 @@ +--- +title: "Update" +openapi: "PATCH /api/v1/app-connections/azure-app-configuration/{connectionId}" +--- + + + Azure App Configuration Connections must be updated through the Infisical UI. + Check out the configuration docs for [Azure App Configuration Connections](/integrations/app-connections/azure-app-configuration) for a step-by-step + guide. + diff --git a/docs/api-reference/endpoints/app-connections/azure-key-vault/available.mdx b/docs/api-reference/endpoints/app-connections/azure-key-vault/available.mdx new file mode 100644 index 000000000..4b1c758ee --- /dev/null +++ b/docs/api-reference/endpoints/app-connections/azure-key-vault/available.mdx @@ -0,0 +1,4 @@ +--- +title: "Available" +openapi: "GET /api/v1/app-connections/azure-key-vault/available" +--- diff --git a/docs/api-reference/endpoints/app-connections/azure-key-vault/create.mdx b/docs/api-reference/endpoints/app-connections/azure-key-vault/create.mdx new file mode 100644 index 000000000..d0d9f7e6f --- /dev/null +++ b/docs/api-reference/endpoints/app-connections/azure-key-vault/create.mdx @@ -0,0 +1,10 @@ +--- +title: "Create" +openapi: "POST /api/v1/app-connections/azure-key-vault" +--- + + + Azure Key Vault Connections must be created through the Infisical UI. + Check out the configuration docs for [Azure Key Vault Connections](/integrations/app-connections/azure-key-vault) for a step-by-step + guide. + \ No newline at end of file diff --git a/docs/api-reference/endpoints/app-connections/azure-key-vault/delete.mdx b/docs/api-reference/endpoints/app-connections/azure-key-vault/delete.mdx new file mode 100644 index 000000000..02fbe4a31 --- /dev/null +++ b/docs/api-reference/endpoints/app-connections/azure-key-vault/delete.mdx @@ -0,0 +1,4 @@ +--- +title: "Delete" +openapi: "DELETE /api/v1/app-connections/azure-key-vault/{connectionId}" +--- diff --git a/docs/api-reference/endpoints/app-connections/azure-key-vault/get-by-id.mdx b/docs/api-reference/endpoints/app-connections/azure-key-vault/get-by-id.mdx new file mode 100644 index 000000000..e5d3e77a1 --- /dev/null +++ b/docs/api-reference/endpoints/app-connections/azure-key-vault/get-by-id.mdx @@ -0,0 +1,4 @@ +--- +title: "Get by ID" +openapi: "GET /api/v1/app-connections/azure-key-vault/{connectionId}" +--- diff --git a/docs/api-reference/endpoints/app-connections/azure-key-vault/get-by-name.mdx b/docs/api-reference/endpoints/app-connections/azure-key-vault/get-by-name.mdx new file mode 100644 index 000000000..55502def8 --- /dev/null +++ b/docs/api-reference/endpoints/app-connections/azure-key-vault/get-by-name.mdx @@ -0,0 +1,4 @@ +--- +title: "Get by Name" +openapi: "GET /api/v1/app-connections/azure-key-vault/connection-name/{connectionName}" +--- diff --git a/docs/api-reference/endpoints/app-connections/azure-key-vault/list.mdx b/docs/api-reference/endpoints/app-connections/azure-key-vault/list.mdx new file mode 100644 index 000000000..76f1f8b88 --- /dev/null +++ b/docs/api-reference/endpoints/app-connections/azure-key-vault/list.mdx @@ -0,0 +1,4 @@ +--- +title: "List" +openapi: "GET /api/v1/app-connections/azure-key-vault" +--- diff --git a/docs/api-reference/endpoints/app-connections/azure-key-vault/update.mdx b/docs/api-reference/endpoints/app-connections/azure-key-vault/update.mdx new file mode 100644 index 000000000..8637b838a --- /dev/null +++ b/docs/api-reference/endpoints/app-connections/azure-key-vault/update.mdx @@ -0,0 +1,10 @@ +--- +title: "Update" +openapi: "PATCH /api/v1/app-connections/azure-key-vault/{connectionId}" +--- + + + Azure Key Vault Connections must be updated through the Infisical UI. + Check out the configuration docs for [Azure Key Vault Connections](/integrations/app-connections/azure-key-vault) for a step-by-step + guide. + diff --git a/docs/integrations/app-connections/azure-app-configuration.mdx b/docs/integrations/app-connections/azure-app-configuration.mdx index 4c4fcb733..0d481986d 100644 --- a/docs/integrations/app-connections/azure-app-configuration.mdx +++ b/docs/integrations/app-connections/azure-app-configuration.mdx @@ -80,7 +80,7 @@ Infisical currently only supports one method for connecting to Azure, which is O - You will then be redirected to Azure to grant Infisical access to your Azure account (organization and repo privileges). Once granted, + You will then be redirected to Azure to grant Infisical access to your Azure account. Once granted, you will redirect you back to Infisical's App Connections page. ![Azure App Configuration Authorization](/images/app-connections/azure/grant-access.png) diff --git a/docs/integrations/app-connections/azure-key-vault.mdx b/docs/integrations/app-connections/azure-key-vault.mdx index 037337204..705401708 100644 --- a/docs/integrations/app-connections/azure-key-vault.mdx +++ b/docs/integrations/app-connections/azure-key-vault.mdx @@ -32,7 +32,7 @@ Infisical currently only supports one method for connecting to Azure, which is O - For the Azure Connection to work with both Key Vault, you need to assign multiple permissions to the application. + For the Azure Connection to work with Key Vault, you need to assign multiple permissions to the application. #### Azure Key Vault permissions @@ -79,7 +79,7 @@ Infisical currently only supports one method for connecting to Azure, which is O - You will then be redirected to Azure to grant Infisical access to your Azure account (organization and repo privileges). Once granted, + You will then be redirected to Azure to grant Infisical access to your Azure account. Once granted, you will redirect you back to Infisical's App Connections page. ![Azure Key Vault Authorization](/images/app-connections/azure/grant-access.png) diff --git a/docs/integrations/secret-syncs/azure-app-configuration.mdx b/docs/integrations/secret-syncs/azure-app-configuration.mdx index 924eac5bd..3b443c672 100644 --- a/docs/integrations/secret-syncs/azure-app-configuration.mdx +++ b/docs/integrations/secret-syncs/azure-app-configuration.mdx @@ -12,8 +12,7 @@ description: "Learn how to configure an Azure App Configuration Sync for Infisic The Azure App Configuration Secret Sync requires the following permissions to be set on the user / service principal for Infisical to sync secrets to Azure App Configuration: `Read Key-Value`, `Write Key-Value`, `Delete Key-Value`. - Any role with these permissions would work such as the **App Configuration Data Owner** role. Alternatively, you can use the - **App Configuration Data Reader** role for read-only access or **App Configuration Data Contributor** role for read/write access. + Any role with these permissions would work such as the **App Configuration Data Owner** role. Alternatively, you can use the **App Configuration Data Contributor** role for read/write access. @@ -44,11 +43,12 @@ description: "Learn how to configure an Azure App Configuration Sync for Infisic 5. Configure the **Sync Options** to specify how secrets should be synced, then click **Next**. ![Configure Options](/images/secret-syncs/azure-app-configuration/app-config-options.png) + - **Initial Sync Behavior**: Determines how Infisical should resolve the initial sync. - **Overwrite Destination Secrets**: Removes any secrets at the destination endpoint not present in Infisical. - - Azure App Configuration does not support importing secrets. - + - **Import Secrets (Prioritize Infisical)**: Imports secrets from the destination endpoint before syncing, prioritizing values from Infisical over Secrets Manager when keys conflict. + - **Import Secrets (Prioritize Azure App Configuration)**: Imports secrets from the destination endpoint before syncing, prioritizing values from Secrets Manager over Infisical when keys conflict. + - **Auto-Sync Enabled**: If enabled, secrets will automatically be synced from the source location when changes occur. Disable to enforce manual syncing only. 6. Configure the **Details** of your Azure App Configuration Sync, then click **Next**. diff --git a/docs/integrations/secret-syncs/azure-key-vault.mdx b/docs/integrations/secret-syncs/azure-key-vault.mdx index 7f6c7ef3b..766c215e4 100644 --- a/docs/integrations/secret-syncs/azure-key-vault.mdx +++ b/docs/integrations/secret-syncs/azure-key-vault.mdx @@ -49,9 +49,8 @@ description: "Learn how to configure a Azure Key Vault Sync for Infisical." - **Initial Sync Behavior**: Determines how Infisical should resolve the initial sync. - **Overwrite Destination Secrets**: Removes any secrets at the destination endpoint not present in Infisical. - - Azure Key Vault does not support importing secrets. - + - **Import Secrets (Prioritize Infisical)**: Imports secrets from the destination endpoint before syncing, prioritizing values from Infisical over Secrets Manager when keys conflict. + - **Import Secrets (Prioritize Azure Key Vault)**: Imports secrets from the destination endpoint before syncing, prioritizing values from Secrets Manager over Infisical when keys conflict. - **Auto-Sync Enabled**: If enabled, secrets will automatically be synced from the source location when changes occur. Disable to enforce manual syncing only. 6. Configure the **Details** of your Azure Key Vault Sync, then click **Next**. diff --git a/docs/mint.json b/docs/mint.json index 65adbb735..4b55a687a 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -1,6 +1,6 @@ { "name": "Infisical", - "openapi": "https://2eb781d275f5.ngrok.app/api/docs/json", + "openapi": "https://app.infisical.com/api/docs/json", "logo": { "dark": "/logo/dark.svg", "light": "/logo/light.svg", @@ -847,6 +847,30 @@ "api-reference/endpoints/app-connections/gcp/update", "api-reference/endpoints/app-connections/gcp/delete" ] + }, + { + "group": "Azure Key Vault", + "pages": [ + "api-reference/endpoints/app-connections/azure-key-vault/list", + "api-reference/endpoints/app-connections/azure-key-vault/available", + "api-reference/endpoints/app-connections/azure-key-vault/get-by-id", + "api-reference/endpoints/app-connections/azure-key-vault/get-by-name", + "api-reference/endpoints/app-connections/azure-key-vault/create", + "api-reference/endpoints/app-connections/azure-key-vault/update", + "api-reference/endpoints/app-connections/azure-key-vault/delete" + ] + }, + { + "group": "Azure App Configuration", + "pages": [ + "api-reference/endpoints/app-connections/azure-app-configuration/list", + "api-reference/endpoints/app-connections/azure-app-configuration/available", + "api-reference/endpoints/app-connections/azure-app-configuration/get-by-id", + "api-reference/endpoints/app-connections/azure-app-configuration/get-by-name", + "api-reference/endpoints/app-connections/azure-app-configuration/create", + "api-reference/endpoints/app-connections/azure-app-configuration/update", + "api-reference/endpoints/app-connections/azure-app-configuration/delete" + ] } ] }, diff --git a/frontend/src/pages/organization/AppConnections/OauthCallbackPage/OauthCallbackPage.tsx b/frontend/src/pages/organization/AppConnections/OauthCallbackPage/OauthCallbackPage.tsx index 5210e31e5..3e6769406 100644 --- a/frontend/src/pages/organization/AppConnections/OauthCallbackPage/OauthCallbackPage.tsx +++ b/frontend/src/pages/organization/AppConnections/OauthCallbackPage/OauthCallbackPage.tsx @@ -8,6 +8,7 @@ import { AzureAppConfigurationConnectionMethod, AzureKeyVaultConnectionMethod, GitHubConnectionMethod, + TAzureAppConfigurationConnection, TAzureKeyVaultConnection, TGitHubConnection, useCreateAppConnection, @@ -15,20 +16,25 @@ import { } from "@app/hooks/api/appConnections"; import { AppConnection } from "@app/hooks/api/appConnections/enums"; -type GithubFormData = Pick & { +type BaseFormData = { returnUrl?: string; connectionId?: string; }; -type AzureFormData = Pick & { - returnUrl?: string; - connectionId?: string; -} & Pick; +type GithubFormData = BaseFormData & Pick; + +type AzureKeyVaultFormData = BaseFormData & + Pick & + Pick; + +type AzureAppConfigurationFormData = BaseFormData & + Pick & + Pick; type FormDataMap = { [AppConnection.GitHub]: GithubFormData & { app: AppConnection.GitHub }; - [AppConnection.AzureKeyVault]: AzureFormData & { app: AppConnection.AzureKeyVault }; - [AppConnection.AzureAppConfiguration]: AzureFormData & { + [AppConnection.AzureKeyVault]: AzureKeyVaultFormData & { app: AppConnection.AzureKeyVault }; + [AppConnection.AzureAppConfiguration]: AzureAppConfigurationFormData & { app: AppConnection.AzureAppConfiguration; }; }; @@ -105,7 +111,8 @@ export const OAuthCallbackPage = () => { app: AppConnection.AzureKeyVault, connectionId, credentials: { - code: code as string + code: code as string, + tenantId: formData.tenantId } }); } else { @@ -122,7 +129,7 @@ export const OAuthCallbackPage = () => { } } catch (err: any) { createNotification({ - title: `Failed to ${connectionId ? "update" : "add"} Azure Connection`, + title: `Failed to ${connectionId ? "update" : "add"} Azure Key Vault Connection`, text: err?.message, type: "error" }); @@ -152,7 +159,8 @@ export const OAuthCallbackPage = () => { app: AppConnection.AzureAppConfiguration, connectionId, credentials: { - code: code as string + code: code as string, + tenantId: formData.tenantId } }); } else { @@ -162,13 +170,14 @@ export const OAuthCallbackPage = () => { description, method: AzureAppConfigurationConnectionMethod.OAuth, credentials: { - code: code as string + code: code as string, + tenantId: formData.tenantId } }); } } catch (err: any) { createNotification({ - title: `Failed to ${connectionId ? "update" : "add"} Azure Connection`, + title: `Failed to ${connectionId ? "update" : "add"} Azure App Configuration Connection`, text: err?.message, type: "error" }); diff --git a/frontend/src/pages/organization/SettingsPage/components/AppConnectionsTab/components/AppConnectionForm/AzureAppConfigurationConnectionForm.tsx b/frontend/src/pages/organization/SettingsPage/components/AppConnectionsTab/components/AppConnectionForm/AzureAppConfigurationConnectionForm.tsx index 84bb3910c..75449fed3 100644 --- a/frontend/src/pages/organization/SettingsPage/components/AppConnectionsTab/components/AppConnectionForm/AzureAppConfigurationConnectionForm.tsx +++ b/frontend/src/pages/organization/SettingsPage/components/AppConnectionsTab/components/AppConnectionForm/AzureAppConfigurationConnectionForm.tsx @@ -45,7 +45,8 @@ export const AzureAppConfigurationConnectionForm = ({ appConnection }: Props) => resolver: zodResolver(formSchema), defaultValues: appConnection ? { - ...appConnection + ...appConnection, + tenantId: appConnection.credentials.tenantId } : { app: AppConnection.AzureAppConfiguration, diff --git a/frontend/src/pages/organization/SettingsPage/components/AppConnectionsTab/components/AppConnectionForm/AzureKeyVaultConnectionForm.tsx b/frontend/src/pages/organization/SettingsPage/components/AppConnectionsTab/components/AppConnectionForm/AzureKeyVaultConnectionForm.tsx index 92f1eb821..58f9739ec 100644 --- a/frontend/src/pages/organization/SettingsPage/components/AppConnectionsTab/components/AppConnectionForm/AzureKeyVaultConnectionForm.tsx +++ b/frontend/src/pages/organization/SettingsPage/components/AppConnectionsTab/components/AppConnectionForm/AzureKeyVaultConnectionForm.tsx @@ -45,7 +45,8 @@ export const AzureKeyVaultConnectionForm = ({ appConnection }: Props) => { resolver: zodResolver(formSchema), defaultValues: appConnection ? { - ...appConnection + ...appConnection, + tenantId: appConnection.credentials.tenantId } : { app: AppConnection.AzureKeyVault,