feat(secret-syncs): azure app config & key vault support

This commit is contained in:
Daniel Hougaard
2025-02-08 04:27:17 +04:00
parent 4e41e84491
commit 5cd6a66989
70 changed files with 2065 additions and 204 deletions
@@ -0,0 +1,21 @@
import { SecretSyncLabel } from "@app/components/secret-syncs";
import { TAzureAppConfigurationSync } from "@app/hooks/api/secretSyncs/types/azure-app-configuration-sync";
type Props = {
secretSync: TAzureAppConfigurationSync;
};
export const AzureAppConfigurationSyncDestinationSection = ({ secretSync }: Props) => {
const {
destinationConfig: { configurationUrl, label }
} = secretSync;
return (
<>
<SecretSyncLabel label="Configuration URL">{configurationUrl}</SecretSyncLabel>
<SecretSyncLabel label="Label">
{label && label.length > 0 ? label : <span className="opacity-40">Not set</span>}
</SecretSyncLabel>
</>
);
};
@@ -0,0 +1,14 @@
import { SecretSyncLabel } from "@app/components/secret-syncs";
import { TAzureKeyVaultSync } from "@app/hooks/api/secretSyncs/types/azure-key-vault-sync";
type Props = {
secretSync: TAzureKeyVaultSync;
};
export const AzureKeyVaultSyncDestinationSection = ({ secretSync }: Props) => {
const {
destinationConfig: { vaultBaseUrl }
} = secretSync;
return <SecretSyncLabel label="Vault URL">{vaultBaseUrl}</SecretSyncLabel>;
};
@@ -13,6 +13,8 @@ import { AwsParameterStoreSyncDestinationSection } from "@app/pages/secret-manag
import { AwsSecretsManagerSyncDestinationSection } from "@app/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/AwsSecretsManagerSyncDestinationSection";
import { GitHubSyncDestinationSection } from "@app/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncDestinationSection/GitHubSyncDestinationSection";
import { AzureAppConfigurationSyncDestinationSection } from "./AzureAppConfigurationSyncDestinationSection";
import { AzureKeyVaultSyncDestinationSection } from "./AzureKeyVaultSyncDestinationSection";
import { GcpSyncDestinationSection } from "./GcpSyncDestinationSection";
type Props = {
@@ -39,6 +41,15 @@ export const SecretSyncDestinationSection = ({ secretSync, onEditDestination }:
case SecretSync.GCPSecretManager:
DestinationComponents = <GcpSyncDestinationSection secretSync={secretSync} />;
break;
case SecretSync.AzureKeyVault:
DestinationComponents = <AzureKeyVaultSyncDestinationSection secretSync={secretSync} />;
break;
case SecretSync.AzureAppConfiguration:
DestinationComponents = (
<AzureAppConfigurationSyncDestinationSection secretSync={secretSync} />
);
break;
default:
throw new Error(`Unhandled Destination Section components: ${destination}`);
}