mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 22:27:22 +00:00
Merge pull request #4724 from Infisical/daniel/fix-aws-auth-2
fix: aws auth identity assume role
This commit is contained in:
@@ -4,7 +4,10 @@ import { z } from "zod";
|
|||||||
|
|
||||||
const twelveDigitRegex = new RE2(/^\d{12}$/);
|
const twelveDigitRegex = new RE2(/^\d{12}$/);
|
||||||
// akhilmhdh: change this to a normal function later. Checked no redosable at the moment
|
// 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
|
export const validateAccountIds = z
|
||||||
.string()
|
.string()
|
||||||
@@ -52,7 +55,7 @@ export const validatePrincipalArns = z
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
message:
|
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
|
// Transform to normalize the spaces around commas
|
||||||
|
|||||||
Reference in New Issue
Block a user