-
Notifications
You must be signed in to change notification settings - Fork 8
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
Use version 2 STS tokens to query opt-in regions #79
Closed
Closed
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
8226117
Refactor session and client init
iainelder fac2c6b
Use a regional STS endpoint for opt-in regions
iainelder eddcaed
Remove the endpoint_url stuff for now
iainelder fc77748
Add tests for assuming_session
iainelder 9029c4c
Use mock_sqs to fix one test
iainelder d1cb108
Move main helper up with explanatory comment
iainelder 469851e
Fix when assuming session has region and no default region
iainelder 3494b01
Query region in assuming session tests
iainelder 0f958a6
Test preferred region
iainelder dad9637
Add more tests and reorder
iainelder 55d0f17
Use ec2 extras as dev dependency
iainelder 28a19e3
Obtain version 2 session tokens valid in all AWS regions
iainelder 0a36c25
Move comment to module docstring
iainelder cc1f4c8
Fix region tests for version 2 tokens
iainelder 9ec3dab
Fix decorator tests for version 2 tokens
iainelder 5b5a0a7
Fix exception tests for version 2 tokens
iainelder a76fe67
Fix session tests for version 2 tokens
iainelder 1b1092c
Fix target ID tests for version 2 tokens
iainelder 1af2f9b
Delete tests of cove internals
iainelder 1fd83f6
Remove duplicate test
iainelder 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
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
This file was deleted.
Oops, something went wrong.
180 changes: 0 additions & 180 deletions
180
tests/moto_mock_org/test_host_account/test_resolve_targets.py
This file was deleted.
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.
I'm not following why this is required - I'm sure I'm missing something obvious but could you explain?
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.
cove_output
:{k: v for k, v in r.items() if v is not None}
, so region key is excluded when it'sNone
CoveHostAccount.__init__
:self.target_regions = [self._session.region_name]
, so the region is neverNone
I think
self.target_regions = [self._session.region_name]
was the easiest way to pass one of theassuming_session
tests, but it's unclear now from this big PR.And it always made me feel uneasy to see that
[None]
for the regions list. It was a nice hack to add multi-region support in a backwards-compatible way, but it is confusing.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.
Gotcha - makes sense. I don't think we need to maintain this behaviour in a new release: we can just always emit a Region key in the output and bump the sem ver appropriately. I'm not overly worried about adding to output, it's removing things that's more of a place to be wary of previous API contracts.