mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
fix: smaller fixes
This commit is contained in:
@@ -15,6 +15,4 @@ export const registerAzureConnectionRouter = async (server: FastifyZodProvider)
|
||||
createSchema: CreateAzureConnectionSchema,
|
||||
updateSchema: UpdateAzureConnectionSchema
|
||||
});
|
||||
|
||||
// The below endpoints are not exposed and for Infisical App use
|
||||
};
|
||||
|
||||
@@ -131,6 +131,11 @@ export const SecretSyncFns = {
|
||||
kmsService
|
||||
});
|
||||
|
||||
const azureAppConfigurationSecretSync = azureAppConfigurationSecretSyncFactory({
|
||||
appConnectionDAL,
|
||||
kmsService
|
||||
});
|
||||
|
||||
let secretMap: TSecretMap;
|
||||
switch (secretSync.destination) {
|
||||
case SecretSync.AWSParameterStore:
|
||||
@@ -148,7 +153,9 @@ export const SecretSyncFns = {
|
||||
case SecretSync.AzureKeyVault:
|
||||
secretMap = await azureKeyVaultSecretSync.getSecrets(secretSync);
|
||||
break;
|
||||
|
||||
case SecretSync.AzureAppConfiguration:
|
||||
secretMap = await azureAppConfigurationSecretSync.getSecrets(secretSync);
|
||||
break;
|
||||
default:
|
||||
throw new Error(
|
||||
`Unhandled sync destination for get secrets fns: ${(secretSync as TSecretSyncWithCredentials).destination}`
|
||||
@@ -170,6 +177,11 @@ export const SecretSyncFns = {
|
||||
kmsService
|
||||
});
|
||||
|
||||
const azureAppConfigurationSecretSync = azureAppConfigurationSecretSyncFactory({
|
||||
appConnectionDAL,
|
||||
kmsService
|
||||
});
|
||||
|
||||
switch (secretSync.destination) {
|
||||
case SecretSync.AWSParameterStore:
|
||||
return AwsParameterStoreSyncFns.removeSecrets(secretSync, secretMap);
|
||||
@@ -181,6 +193,8 @@ export const SecretSyncFns = {
|
||||
return GcpSyncFns.removeSecrets(secretSync, secretMap);
|
||||
case SecretSync.AzureKeyVault:
|
||||
return azureKeyVaultSecretSync.removeSecrets(secretSync, secretMap);
|
||||
case SecretSync.AzureAppConfiguration:
|
||||
return azureAppConfigurationSecretSync.removeSecrets(secretSync, secretMap);
|
||||
default:
|
||||
throw new Error(
|
||||
`Unhandled sync destination for remove secrets fns: ${(secretSync as TSecretSyncWithCredentials).destination}`
|
||||
|
||||
@@ -36,7 +36,7 @@ export const AzureAppConfigurationSyncFields = () => {
|
||||
<FormControl
|
||||
isError={Boolean(error)}
|
||||
errorText={error?.message}
|
||||
label="Vault Base URL"
|
||||
label="Configuration URL"
|
||||
tooltipText="Enter your Azure App Configuration URL. This is the base URL for your Azure App Configuration, e.g. https://resource-name-here.azconfig.io."
|
||||
>
|
||||
<Input {...field} placeholder="https://resource-name-here.azconfig.io" />
|
||||
|
||||
@@ -95,6 +95,8 @@ const UpdateForm = ({ appConnection, onComplete }: UpdateFormProps) => {
|
||||
return <GitHubConnectionForm appConnection={appConnection} />;
|
||||
case AppConnection.GCP:
|
||||
return <GcpConnectionForm appConnection={appConnection} onSubmit={onSubmit} />;
|
||||
case AppConnection.Azure:
|
||||
return <AzureConnectionForm appConnection={appConnection} />;
|
||||
default:
|
||||
throw new Error(`Unhandled App ${(appConnection as TAppConnection).app}`);
|
||||
}
|
||||
|
||||
@@ -50,11 +50,16 @@ export const AzureConnectionForm = ({ appConnection }: Props) => {
|
||||
|
||||
const form = useForm<FormData>({
|
||||
resolver: zodResolver(formSchema),
|
||||
defaultValues: appConnection ?? {
|
||||
app: AppConnection.Azure,
|
||||
method: AzureConnectionMethod.OAuth,
|
||||
resource: AzureResources.KeyVault
|
||||
}
|
||||
defaultValues: appConnection
|
||||
? {
|
||||
...appConnection,
|
||||
resource: appConnection?.credentials.resource
|
||||
}
|
||||
: {
|
||||
app: AppConnection.Azure,
|
||||
method: AzureConnectionMethod.OAuth,
|
||||
resource: AzureResources.KeyVault
|
||||
}
|
||||
});
|
||||
|
||||
const {
|
||||
|
||||
Reference in New Issue
Block a user