diff --git a/backend/src/lib/api-docs/constants.ts b/backend/src/lib/api-docs/constants.ts index 5f6f243b9..32829a1d7 100644 --- a/backend/src/lib/api-docs/constants.ts +++ b/backend/src/lib/api-docs/constants.ts @@ -1739,6 +1739,15 @@ export const SecretSyncs = { OWNER: "The name of the GitHub account owner of the repository.", REPO: "The name of the GitHub repository.", ENV: "The name of the GitHub environment." + }, + AZURE_KEY_VAULT: { + VAULT_BASE_URL: + "The base URL of the Azure Key Vault to sync secrets to. Example: https://example.vault.azure.net/" + }, + AZURE_APP_CONFIGURATION: { + CONFIGURATION_URL: + "The URL of the Azure App Configuration to sync secrets to. Example: https://example.azconfig.io/", + LABEL: "An optional label to assign to secrets created in Azure App Configuration." } } }; diff --git a/backend/src/services/secret-sync/azure-app-configuration/azure-app-configuration-sync-schemas.ts b/backend/src/services/secret-sync/azure-app-configuration/azure-app-configuration-sync-schemas.ts index 6b1e4a9e6..b11d67858 100644 --- a/backend/src/services/secret-sync/azure-app-configuration/azure-app-configuration-sync-schemas.ts +++ b/backend/src/services/secret-sync/azure-app-configuration/azure-app-configuration-sync-schemas.ts @@ -1,5 +1,6 @@ import { z } from "zod"; +import { SecretSyncs } from "@app/lib/api-docs"; import { AppConnection } from "@app/services/app-connection/app-connection-enums"; import { SecretSync } from "@app/services/secret-sync/secret-sync-enums"; import { @@ -10,8 +11,11 @@ import { import { TSyncOptionsConfig } from "@app/services/secret-sync/secret-sync-types"; const AzureAppConfigurationSyncDestinationConfigSchema = z.object({ - configurationUrl: z.string().min(1, "App Configuration URL required"), - label: z.string().optional() + configurationUrl: z + .string() + .min(1, "App Configuration URL required") + .describe(SecretSyncs.DESTINATION_CONFIG.AZURE_APP_CONFIGURATION.CONFIGURATION_URL), + label: z.string().optional().describe(SecretSyncs.DESTINATION_CONFIG.AZURE_APP_CONFIGURATION.LABEL) }); const AzureAppConfigurationSyncOptionsConfig: TSyncOptionsConfig = { canImportSecrets: true }; diff --git a/backend/src/services/secret-sync/azure-key-vault/azure-key-vault-sync-schemas.ts b/backend/src/services/secret-sync/azure-key-vault/azure-key-vault-sync-schemas.ts index f66eda481..40b476744 100644 --- a/backend/src/services/secret-sync/azure-key-vault/azure-key-vault-sync-schemas.ts +++ b/backend/src/services/secret-sync/azure-key-vault/azure-key-vault-sync-schemas.ts @@ -1,5 +1,6 @@ import { z } from "zod"; +import { SecretSyncs } from "@app/lib/api-docs"; import { AppConnection } from "@app/services/app-connection/app-connection-enums"; import { SecretSync } from "@app/services/secret-sync/secret-sync-enums"; import { @@ -10,7 +11,11 @@ import { import { TSyncOptionsConfig } from "@app/services/secret-sync/secret-sync-types"; const AzureKeyVaultSyncDestinationConfigSchema = z.object({ - vaultBaseUrl: z.string().url("Invalid vault base URL format").min(1, "Vault base URL required") + vaultBaseUrl: z + .string() + .url("Invalid vault base URL format") + .min(1, "Vault base URL required") + .describe(SecretSyncs.DESTINATION_CONFIG.AZURE_KEY_VAULT.VAULT_BASE_URL) }); const AzureKeyVaultSyncOptionsConfig: TSyncOptionsConfig = { canImportSecrets: true }; diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureKeyVaultSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureKeyVaultSyncFields.tsx index 9008a9877..2220255b7 100644 --- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureKeyVaultSyncFields.tsx +++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/AzureKeyVaultSyncFields.tsx @@ -5,6 +5,8 @@ import { FormControl, Input } from "@app/components/v2"; import { SecretSync } from "@app/hooks/api/secretSyncs"; import { TSecretSyncForm } from "../schemas"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { faInfoCircle } from "@fortawesome/free-solid-svg-icons"; export const AzureKeyVaultSyncFields = () => { const { control, setValue } = useFormContext< @@ -32,6 +34,14 @@ export const AzureKeyVaultSyncFields = () => { )} /> + +
+ Secret keys with underscores (_) will be converted to hyphens (-) when syncing to Azure + Key Vault. +
+