Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Address PR comments for Azure Client Secret Rotation
carlosmonastyrski98bb5d7aa77f
diff --git a/backend/src/ee/services/secret-rotation-v2/azure-client-secret/azure-client-secret-rotation-fns.ts b/backend/src/ee/services/secret-rotation-v2/azure-client-secret/azure-client-secret-rotation-fns.tsindex 7363e18b2b..039033fe6b 100644--- a/backend/src/ee/services/secret-rotation-v2/azure-client-secret/azure-client-secret-rotation-fns.ts+++ b/backend/src/ee/services/secret-rotation-v2/azure-client-secret/azure-client-secret-rotation-fns.ts@@ -46,7 +46,8 @@ export const azureClientSecretRotationFactory: TRotationFactory<endpoint,{passwordCredential: {- displayName: `Infisical Rotated Secret (${formattedDate})`+ displayName: `Infisical Rotated Secret (${formattedDate})`,+ endDateTime: "2299-12-31T23:59:59Z" // effectively no expiration}},{diff --git a/backend/src/services/app-connection/azure-client-secrets/azure-client-secrets-connection-fns.ts b/backend/src/services/app-connection/azure-client-secrets/azure-client-secrets-connection-fns.tsindex be07a33a0d..830cbbec35 100644--- a/backend/src/services/app-connection/azure-client-secrets/azure-client-secrets-connection-fns.ts+++ b/backend/src/services/app-connection/azure-client-secrets/azure-client-secrets-connection-fns.ts@@ -127,7 +127,7 @@ export const validateAzureClientSecretsConnectionCredentials = async (config: TAscope: `openid offline_access https://graph.microsoft.com/.default`,client_id: INF_APP_CONNECTION_AZURE_CLIENT_ID,client_secret: INF_APP_CONNECTION_AZURE_CLIENT_SECRET,- redirect_uri: `${SITE_URL}/organization/app-connections/azure-client-secrets/oauth/callback`+ redirect_uri: `${SITE_URL}/organization/app-connections/azure/oauth/callback`}));} catch (e: unknown) {diff --git a/docs/images/app-connections/azure/client-secrets/create-oauth-method.png b/docs/images/app-connections/azure/client-secrets/create-oauth-method.pngindex ae02705d6a..e38707ea18 100644Binary files a/docs/images/app-connections/azure/client-secrets/create-oauth-method.png and b/docs/images/app-connections/azure/client-secrets/create-oauth-method.png differdiff --git a/docs/integrations/app-connections/azure-client-secrets.mdx b/docs/integrations/app-connections/azure-client-secrets.mdxindex 7e50348d20..dd91205f51 100644--- a/docs/integrations/app-connections/azure-client-secrets.mdx+++ b/docs/integrations/app-connections/azure-client-secrets.mdx@@ -23,7 +23,7 @@ Infisical currently only supports one method for connecting to Azure, which is O- Create the application. As part of the form, set the **Redirect URI** to `https://your-domain.com/organization/app-connections/azure-client-secrets/oauth/callback`.+ Create the application. As part of the form, set the **Redirect URI** to `https://your-domain.com/organization/app-connections/azure/oauth/callback`.<Tip>The domain you defined in the Redirect URI should be equivalent to the `SITE_URL` configured in your Infisical instance.</Tip>@@ -36,13 +36,20 @@ Infisical currently only supports one method for connecting to Azure, which is O#### Azure Client Secrets permissions- Set the API permissions of the Azure application to include the following Azure Client Secrets permissions: `Application.ReadWrite.All`.+ Set the API permissions of the Azure application to include the following Azure Client Secrets permissions:+ - Microsoft Graph+ - `Application.ReadWrite.All`+ - Azure App Configuration+ - `KeyValue.Delete`+ - `KeyValue.Read`+ - `KeyValue.Write`+</Step><Step title="Add your application credentials to Infisical">- Obtain the **Application (Client) ID** and **Directory (Tenant) ID** in Overview and generate a **Client Secret** in Certificate & secrets for your Azure application.+ Obtain the **Application (Client) ID** and **Directory (Tenant) ID** (this will be used later in the Infisical connection) in Overview and generate a **Client Secret** in Certificate & secrets for your Azure application.@@ -70,7 +77,7 @@ Infisical currently only supports one method for connecting to Azure, which is OSelect the **Azure Connection** option from the connection options modal. </Step><Step title="Authorize Connection">- You can optionally authenticate against a specific tenant by providing the Azure Tenant or Directory ID.+ Fill in the **Tenant ID** field with the Directory (Tenant) ID you obtained in the previous step.Now select the **OAuth** method and click **Connect to Azure**.diff --git a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AzureClientSecretsConnectionForm.tsx b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AzureClientSecretsConnectionForm.tsxindex 4b7071f611..9076c95ce3 100644--- a/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AzureClientSecretsConnectionForm.tsx+++ b/frontend/src/pages/organization/AppConnections/AppConnectionsPage/components/AppConnectionForm/AzureClientSecretsConnectionForm.tsx@@ -27,7 +27,7 @@ type Props = {const formSchema = genericAppConnectionFieldsSchema.extend({app: z.literal(AppConnection.AzureClientSecrets),method: z.nativeEnum(AzureClientSecretsConnectionMethod),- tenantId: z.string().trim()+ tenantId: z.string().trim().min(1, "Tenant ID is required")});type FormData = z.infer<typeof formSchema>;@@ -75,7 +75,7 @@ export const AzureClientSecretsConnectionForm = ({ appConnection }: Props) => {switch (formData.method) {case AzureClientSecretsConnectionMethod.OAuth:window.location.assign(- `https://login.microsoftonline.com/${formData.tenantId || "common"}/oauth2/v2.0/authorize?client_id=${oauthClientId}&response_type=code&redirect_uri=${window.location.origin}/organization/app-connections/azure-client-secrets/oauth/callback&response_mode=query&scope=https://azconfig.io/.default%20openid%20offline_access&state=${state}<:>azure-client-secrets`+ `https://login.microsoftonline.com/${formData.tenantId || "common"}/oauth2/v2.0/authorize?client_id=${oauthClientId}&response_type=code&redirect_uri=${window.location.origin}/organization/app-connections/azure/oauth/callback&response_mode=query&scope=https://azconfig.io/.default%20openid%20offline_access&state=${state}<:>azure-client-secrets`);break;default:@@ -97,7 +97,7 @@ export const AzureClientSecretsConnectionForm = ({ appConnection }: Props) => {control={control}render={({ field, fieldState: { error } }) => (<FormControl- tooltipText="The Active Directory (Entra ID) Tenant ID."+ tooltipText="The Directory (tenant) ID."isError={Boolean(error?.message)}label="Tenant ID"errorText={error?.message}