Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/w/7.70/bugfix/ARSN-367-principal…
Browse files Browse the repository at this point in the history
…-user-arn-on-policy' into w/8.1/bugfix/ARSN-367-principal-user-arn-on-policy
  • Loading branch information
benzekrimaha committed Sep 25, 2023
2 parents 5b66f8d + 0177fbe commit dcf0f90
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/policy/resourcePolicySchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
},
"principalAWSUserArn": {
"type": "string",
"pattern": "^arn:aws:iam::[0-9]{12}:user/(?!\\*)[\\w+=,.@ -/]{1,64}$"
"pattern": "^arn:aws:iam::[0-9]{12}:user/(?!\\*)[\\w+=,.@ -/]{1,2017}$"
},
"principalAWSRoleArn": {
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion lib/policy/userPolicySchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"principalAWSUserArn": {
"type": "string",
"pattern": "^arn:aws:iam::[0-9]{12}:user/(?!\\*)[\\w+=,.@ -/]{1,64}$"
"pattern": "^arn:aws:iam::[0-9]{12}:user/(?!\\*)[\\w+=,.@ -/]{1,2017}$"
},
"principalAWSRoleArn": {
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"engines": {
"node": ">=16"
},
"version": "8.1.109",
"version": "8.1.110",
"description": "Common utilities for the S3 project components",
"main": "build/index.js",
"repository": {
Expand Down
5 changes: 5 additions & 0 deletions tests/unit/policy/test_policyValidator.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ describe('Policies validation - Principal', () => {
value: { AWS: 'arn:aws:iam::111111111111:user/path/in/org/leaf' },
policyType: [user, resource],
},
{
name: 'user arn with vault made path',
value: { AWS: 'arn:aws:iam::767707094035:user/user2/TENANT_USER/null/5417be27-8709-48bd-adfb-865ebc58b9f0/1a464be02ea631bdaf2a9ee884434233374a457460e925bf10d9e4665f8fa796/c1d83067-a3f3-41a4-bd45-d6bf47270bd0' }, // eslint-disable-line max-len
policyType: [user, resource],
},
{
name: 'multiple user arns',
value: {
Expand Down

0 comments on commit dcf0f90

Please sign in to comment.