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