mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 19:28:16 +00:00
Address PR comments for Azure Client Secret Rotation
This commit is contained in:
+2
-1
@@ -46,7 +46,8 @@ export const azureClientSecretRotationFactory: TRotationFactory<
|
|||||||
endpoint,
|
endpoint,
|
||||||
{
|
{
|
||||||
passwordCredential: {
|
passwordCredential: {
|
||||||
displayName: `Infisical Rotated Secret (${formattedDate})`
|
displayName: `Infisical Rotated Secret (${formattedDate})`,
|
||||||
|
endDateTime: "2299-12-31T23:59:59Z" // effectively no expiration
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -127,7 +127,7 @@ export const validateAzureClientSecretsConnectionCredentials = async (config: TA
|
|||||||
scope: `openid offline_access https://graph.microsoft.com/.default`,
|
scope: `openid offline_access https://graph.microsoft.com/.default`,
|
||||||
client_id: INF_APP_CONNECTION_AZURE_CLIENT_ID,
|
client_id: INF_APP_CONNECTION_AZURE_CLIENT_ID,
|
||||||
client_secret: INF_APP_CONNECTION_AZURE_CLIENT_SECRET,
|
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) {
|
} catch (e: unknown) {
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 531 KiB After Width: | Height: | Size: 578 KiB |
@@ -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>
|
<Tip>
|
||||||
The domain you defined in the Redirect URI should be equivalent to the `SITE_URL` configured in your Infisical instance.
|
The domain you defined in the Redirect URI should be equivalent to the `SITE_URL` configured in your Infisical instance.
|
||||||
</Tip>
|
</Tip>
|
||||||
@@ -36,13 +36,20 @@ Infisical currently only supports one method for connecting to Azure, which is O
|
|||||||
|
|
||||||
#### Azure Client Secrets permissions
|
#### 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>
|
||||||
<Step title="Add your application credentials to Infisical">
|
<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 O
|
|||||||
Select the **Azure Connection** option from the connection options modal. 
|
Select the **Azure Connection** option from the connection options modal. 
|
||||||
</Step>
|
</Step>
|
||||||
<Step title="Authorize Connection">
|
<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**.
|
Now select the **OAuth** method and click **Connect to Azure**.
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -27,7 +27,7 @@ type Props = {
|
|||||||
const formSchema = genericAppConnectionFieldsSchema.extend({
|
const formSchema = genericAppConnectionFieldsSchema.extend({
|
||||||
app: z.literal(AppConnection.AzureClientSecrets),
|
app: z.literal(AppConnection.AzureClientSecrets),
|
||||||
method: z.nativeEnum(AzureClientSecretsConnectionMethod),
|
method: z.nativeEnum(AzureClientSecretsConnectionMethod),
|
||||||
tenantId: z.string().trim()
|
tenantId: z.string().trim().min(1, "Tenant ID is required")
|
||||||
});
|
});
|
||||||
|
|
||||||
type FormData = z.infer<typeof formSchema>;
|
type FormData = z.infer<typeof formSchema>;
|
||||||
@@ -75,7 +75,7 @@ export const AzureClientSecretsConnectionForm = ({ appConnection }: Props) => {
|
|||||||
switch (formData.method) {
|
switch (formData.method) {
|
||||||
case AzureClientSecretsConnectionMethod.OAuth:
|
case AzureClientSecretsConnectionMethod.OAuth:
|
||||||
window.location.assign(
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -97,7 +97,7 @@ export const AzureClientSecretsConnectionForm = ({ appConnection }: Props) => {
|
|||||||
control={control}
|
control={control}
|
||||||
render={({ field, fieldState: { error } }) => (
|
render={({ field, fieldState: { error } }) => (
|
||||||
<FormControl
|
<FormControl
|
||||||
tooltipText="The Active Directory (Entra ID) Tenant ID."
|
tooltipText="The Directory (tenant) ID."
|
||||||
isError={Boolean(error?.message)}
|
isError={Boolean(error?.message)}
|
||||||
label="Tenant ID"
|
label="Tenant ID"
|
||||||
errorText={error?.message}
|
errorText={error?.message}
|
||||||
|
|||||||
Reference in New Issue
Block a user