-
Notifications
You must be signed in to change notification settings - Fork 84
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
Updating AWS security policy example #348
Conversation
According to AWS, using a wildcard in the PassRole permission allows the action on multiple resources, what raises a security warning when creating the policy. Therefore, to be extra safe, we should add a condition, to limit its application only on EC2 resources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
Can you update the description with the following?
- Link to the documentation that backs up your first sentence
- Testing or verification steps you took to ensure this works
], | ||
"Condition": { | ||
"StringEquals": { | ||
"iam:PassedToService": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this Condition applies only to iam:PassRole
, I recommend we split it out into its own Statement to make the distinction clearer. Whether it works this way or not, having separate Statements for the two kinds of IAM actions will be easier to read.
I updated the PR and the commit ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
According to AWS, using a wildcard in the PassRole permission allows the action on multiple resources, what raises a security warning when creating the policy.
Source: Security Warning – Pass role with star in resource.
Therefore, to be extra safe, we should add a condition, to limit its application only on EC2 resources.
In order to test this modification, currently, I use the plugin with the given policy without any issues.
Link to relevant issues in GitHub or Jira(Not appliable)Link to relevant pull requests, esp. upstream and downstream changes(Not appliable)Ensure you have provided tests - that demonstrates feature works or fixes the issue(Not appliable)