-
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
fix(appconfig): scope generated alarm role policy to '*' for composite alarm support #29171
Merged
Merged
Changes from 8 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
e3f1873
fix(appconfig): correctly scope composite alarm policy to '*'
chenjane-dev 24577ff
fix(appconfig): scope generated alarm role policy to '*' for composit…
chenjane-dev 41c3922
rename private method
chenjane-dev 0f0b773
update integ tests and add reasoning for full scope policy
chenjane-dev 3c1ef5b
Merge branch 'main' into composite-alarm
chenjane-dev 8f419ff
update role logical id
chenjane-dev c07e6ea
fix eslint
chenjane-dev 316d421
Merge branch 'aws:main' into composite-alarm
chenjane-dev c393c86
update integ tests and add reasoning for full scope policy
chenjane-dev b778fb4
fix eslint
chenjane-dev 7aa65c9
update snapshot
chenjane-dev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...g.environment.js.snapshot/appconfigenvironmentDefaultTestDeployAssert75BD28E7.assets.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
6 changes: 3 additions & 3 deletions
6
...-appconfig-alpha/test/integ.environment.js.snapshot/aws-appconfig-environment.assets.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why '*' and not
monitor.alarmArn
? I don't like the default to all resources from a security perspective, so if this has to stay, we have to document exactly why we are doing it this way.*
sends off alarm bells in a lot of customer use cases.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.
The integ test already tests this because there is only one policy being created now with resource set to
*
.Yeah, I discussed this with a senior engineer on my team and it is only being scoped to all resources for
DescribeAlarms
so I think this should be okay. But, after doing some personal testing, I found out that the original policy we had for composite alarms actually works when scoped narrower than*
so the CW docs must be incorrect here. We could change this to that if you want toohttps://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DescribeAlarms.html
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.
re: integ test
the test checks if the policy is being created with the resource set to
*
. it does not yet test that that policy can be used successfully. i argue that the latter is the important part, the former is simply a unit test.edit: you know what I'm fine with this as is. disregard the above statement.
re: resource
since it is just a scope for
describeAlarms
, i.e. a readonly prop, we should be fine with*
. Can you document in the code that we are okay with this for the readonly permissions and link to the doc page?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.
updated