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
Update identity-aws-auth-validators.ts
Daniel Hougaard1f5deb9f56a4
diff --git a/backend/src/services/identity-aws-auth/identity-aws-auth-validators.ts b/backend/src/services/identity-aws-auth/identity-aws-auth-validators.tsindex 098bdcf9aa..527d508f56 100644--- a/backend/src/services/identity-aws-auth/identity-aws-auth-validators.ts+++ b/backend/src/services/identity-aws-auth/identity-aws-auth-validators.ts@@ -4,7 +4,10 @@ import { z } from "zod";const twelveDigitRegex = new RE2(/^\d{12}$/);// akhilmhdh: change this to a normal function later. Checked no redosable at the moment-const arnRegex = new RE2(/^arn:aws:iam::\d{12}:(user\/[a-zA-Z0-9_.@+*/-]+|role\/[a-zA-Z0-9_.@+*/-]+|\*)$/);++const arnRegex = new RE2(+ /^arn:aws:iam::\d{12}:(user\/[a-zA-Z0-9_.@+*/-]+|role\/[a-zA-Z0-9_.@+*/-]+|assume-role\/[a-zA-Z0-9_.@+*/-]+|\*)$/+);export const validateAccountIds = z.string()@@ -52,7 +55,7 @@ export const validatePrincipalArns = z},{message:- "Each ARN must be in the format of 'arn:aws:iam::123456789012:user/UserName', 'arn:aws:iam::123456789012:role/RoleName', or 'arn:aws:iam::123456789012:*'."+ "Each ARN must be in the format of 'arn:aws:iam::123456789012:user/UserName', 'arn:aws:iam::123456789012:role/RoleName', 'arn:aws:iam::123456789012:assume-role/RoleName', or 'arn:aws:iam::123456789012:*'."})// Transform to normalize the spaces around commas