-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
principalOrgId condition for wildcard principal #47
Comments
Do you want to enforce that any sns topic policy must have "aws:PrincipalOrgID"==xxx? |
Thank for your reply Just add condition for check if wildcard for policy (sns policy or another policy) If condition contain principalorgid |
@pju-d2si so your best bet with the existing code base is to write a custom rule. given that XXX is something you'd like to parameterize... there's not really a great way to make that bit easy to change at runtime. I appreciate you reaching out with this use case and I will try to consider a more generic way to support parameterizing rules. That said, the following code is probably a good bit of the ways toward what you want. To be honest I did not test this code - but if you send me an actual template I will spend the time to test it. To use this, you would save the code in a file, update xxxxx to the proper value and then you could put the file in a directory and point the cli to use that custom rule directory.
|
thank you, Thank you for your help |
You have a few options for suppressing F18 in favor of this new rule. The easiest path is to put the original rule F18 on a global blacklist, and then add this rule as a custom rule - this will effectively replace F18 with the new rule. You could also use resource-level suppressions (via metadata) or use the profile concept to only include the rules you care about (and leave out F18). |
Hi!
I am using cfn_nag lastest version 0.3.84, we have a usecase with wildcard on policy
with an sns policy we would authorize any account in our aws organization to publish on it, on our policy we have an condition aws:principalOrgId.
https://aws.amazon.com/fr/blogs/security/control-access-to-aws-resources-by-using-the-aws-organization-of-iam-principals/
We have devellop a small and durty function to catch this condition, my question is
make sense to implement this on model/statements, for add a condition if orgid is specify and value equal with our orgid ?
thank's for your work on cfn_nag and your support
The text was updated successfully, but these errors were encountered: