Closed
Conversation
o be honored when the user has configured gimme-aws-creds to generate creds for all roles. Now will generat e for the selection.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR combines two existing PRs from the Nike repo:
Reproduced below.
Reproduction of PR 294
Support AWS account IDs or aliases as profile names
Description
In many orgs (like mine) we use a single role in multiple accounts.
Related Issue
Resolves Nike-Inc/gimme-aws-creds#293
Motivation and Context
We have a lot of AWS accounts, and their names are long enough - using the roles makes it hard to use the cli with the resulting credentials.
How Has This Been Tested?
Added UT
Types of changes
Checklist:
Reproduction of PR 316
Feat filter selection: adds --filter-selection/-f option to filter generated role selection screen
Description
This option will filter out the list of roles generated when calling
gimme-aws-credsto show only those that contain a match on the passed in string.Example:
gimme-aws-credsmight return:And
gimme-aws-creds -f devwould return:If only one match is found, it is auto selected (already the default behavior - not part of this feature).
If the user has their
~/.okta_aws_login_configfile set so thataws_rolename = allthen passing in the-foption causes creds to be generated against the filtered list instead of every role available to the user. I.e:gimme-aws-creds -f pocwould grab creds only for matching roles, whereasaws-gimme-credswould still grab creds for all roles.Related Issue
None
Motivation and Context
This change is helpful for users with access to many roles. For instance, my team at WarnerBros has access to hundreds of roles across hundreds of AWS accounts, and selecting the one we need at a given time from a long list is tedious. This option lets us call the specific account we need access to, or a part of it (the list of poc accounts, or dev accounts, or prod accounts), and select from a much smaller list.
How Has This Been Tested?
This change was tested manually by running:
gimme-aws-credsby itself and verifying the resulting list.gimme-aws-creds -f pocand verifying the resulting list, selecting one and verifying the resulting creds worked with anaws --profile aws-aio-poc sts get-caller-identitycall.gimme-aws-creds -f aws-aio-pocand verifying the generated creds worked with anaws --profile aws-aio-poc sts get-caller-identitycall.Screenshots (if appropriate):
Types of changes
Checklist: