Skip to content

Commit

Permalink
aws - cross-account filter - use case-insensitive checks for allowed …
Browse files Browse the repository at this point in the history
…condition keys (cloud-custodian#7889)
  • Loading branch information
Rajath-55 authored Nov 21, 2022
1 parent 3e5992c commit e941054
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion c7n/filters/iamaccess.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def check_actions(self):

@property
def whitelist_conditions(self):
return self.checker_config.get('whitelist_conditions', ())
return set(v.lower() for v in self.checker_config.get('whitelist_conditions', ()))

@property
def allowed_vpce(self):
Expand Down
1 change: 1 addition & 0 deletions tests/test_iam.py
Original file line number Diff line number Diff line change
Expand Up @@ -1950,6 +1950,7 @@ def test_sns_cross_account_endpoint_condition(self):
{
"type": "cross-account",
"whitelist_endpoints": ["@whitelist.com"],
"whitelist_conditions": ["aws:UserName"]
},
],
},
Expand Down

0 comments on commit e941054

Please sign in to comment.