-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
I'm testing IAMSpy and it looks like policy conditions in resource policy are / may not be enforced. What behavior is expected?
I've created a failing test case here:
skuenzli@3614947
But basically the test case uses:
- allow-testing-s3.json GAAD which grants no permissions to role
testingvia Identity policies - a bucket policy that Allows
s3:GetObjectto principal*and narrows that with anaws:PrincipalArncondition
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"
]
}
}
}
IAMSpy can_i reports the testing principal has the s3:GetObject permission to the bucket.
FWIW, I have tried both strict_conditions=True and False
Is this behavior expected?
AFAICT (from debug output in my private library integration), the condition is parsed from the statement in the resource policy.
taharah
Metadata
Metadata
Assignees
Labels
No labels