-
Notifications
You must be signed in to change notification settings - Fork 6
feat(ingestor-api): expose ingestor handler role #39
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
Merged
+18
−18
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 hidden or 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
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.
@emileten Take a look at this (no longer applicable) description. The intention of the manual name was so that the Data Access Role (possibly created outside of the scope of this CDK codebase) could be conveniently configured to permit the execution/handler role to grant access. For example, in the VEDA Project, there is a manually created Data Access Role. It has a policy to allow it to be assumed by any role matching the pattern
stac-ingestion-api-*.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.
I see @alukach. Just to be more transparent. The rationale for that change was, using explicit names sometimes causes issues when resources are destroyed. I didn't provide enough motivation in the description of this PR, but here is the idea (trying to clarify a slack message I sent some time ago...).
Now, if for some reason you delete the role of deployment X, something weird happens. In the assumed role trust relationship, the name of the deleted role is replaced by a key id, something that is useless. Even when recreating the deleted role with the same name, the trust relationship isn't updated, and the bug is left there.
Maybe that's what the warning means in the
role_nameparameter of the role constructor : https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_iam/Role.html.But the general idea of the change was 'using a role name is restrictive, and it looks like we don't use that feature anymore, so let AWS choose the name'.
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.
Even with this change, part of the role ARN remains predictable it seems ? For example, in my current deployment using this branch, the execution role has this ARN :
arn:aws:iam::916098889494:role/MAAP-STAC-test-pgSTAC-stacingestorexecutionrole599-1QRRAG5IZJBZZ. It looks like the CDK still plugs the stack name +stacingestorexecutionrole(that one I am not sure where it comes from) to the ARN.