Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

address review

x58ae89e03a44
diff --git a/backend/src/ee/services/pam-account/pam-account-schemas.ts b/backend/src/ee/services/pam-account/pam-account-schemas.ts
index e521248231..5d32b1d459 100644
--- a/backend/src/ee/services/pam-account/pam-account-schemas.ts
+++ b/backend/src/ee/services/pam-account/pam-account-schemas.ts
@@ -570,12 +570,7 @@ export const ACCOUNT_TYPE_CONFIGS = {
}),
credentials: z.object({
clientId: z.string().trim().uuid("Must be a valid Azure application (client) ID"),
- clientSecret: z
- .string()
- .trim()
- .max(512)
- .transform((v) => v || undefined)
- .optional()
+ clientSecret: z.string().trim().min(1).max(512)
}),
sanitizedCredentials: z.object({
clientId: z.string().optional()
diff --git a/backend/src/ee/services/pam-session/pam-session-service.ts b/backend/src/ee/services/pam-session/pam-session-service.ts
index 03c8669136..d67d879d29 100644
--- a/backend/src/ee/services/pam-session/pam-session-service.ts
+++ b/backend/src/ee/services/pam-session/pam-session-service.ts
@@ -311,9 +311,6 @@ export const pamSessionServiceFactory = ({
}
if (account.accountType === PamAccountType.AzureCli) {
- if (!credentials.clientSecret) {
- throw new BadRequestError({ message: "Azure account has no client secret configured" });
- }
credentials.tokens = await getAzureAccessTokens({
tenantId: connectionDetails.tenantId as string,
clientId: credentials.clientId as string,