-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
feat(iam): allow changing the effect to 'deny' for policy statements #3165
Conversation
I have a general question about the class Should we make it immutable? I feel like if we keep it mutable, it prevents us from ever being able to implement statement normalization in policies (to make them smaller), which we might want to do in the future. |
That's a good question. I feel like maybe so, but some APIs we have now explicitly assume that they're mutable, and that they can be freely modified by adding conditions, for example. In fact, we document this somewhere. |
@rix0rrr would it be possible to implement statement normalization using CDK lifecycle callbacks? Like we now do for simple de-duplication of identical statements? |
Yes. |
So perhaps leaving PolicyStatement mutable is not Carry on. |
I just noticed that I can not set a policy statement to "deny". Maybe I'm missing something, but otherwise this should be an easy fix.
Please read the contribution guidelines and follow the pull-request checklist.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license