forked from WithSecureLabs/IAMSpy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Demonstrate lack of enforcement of conditions in resource policy with…
… a test case. Permission summary: * no policies attached to Identity via allow-testing-s3.json GAAD * bucket policy allows GetObject, but only if aws:PrincipalArn matches (a different arn) Can I? Expect: False (Denied) Actual: True
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[ | ||
{ | ||
"Resource": "arn:aws:s3:::bucket", | ||
"Policy": { | ||
"Version": "2012-10-17", | ||
"Id": "ImplicitDenyAlmostAll", | ||
"Statement": [ | ||
{ | ||
"Sid": "AllowNonExistentPrincipal", | ||
"Effect": "Allow", | ||
"Principal": "*", | ||
"Action": "s3:GetObject", | ||
"Resource": [ | ||
"arn:aws:s3:::bucket", | ||
"arn:aws:s3:::bucket/*" | ||
], | ||
"Condition": { | ||
"ArnEquals": { | ||
"aws:PrincipalArn": [ | ||
"arn:aws:iam::111111111111:user/some-other-user" | ||
] | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"Account": "111111111111" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters