-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[v2] Fix bug with auth_scheme_preference #10169
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
Open
aemous
wants to merge
23
commits into
aws:v2
Choose a base branch
from
aemous:bugfix-auth-scheme-pref
base: v2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
527f455
Prototype fix for respecting auth scheme preference.
aemous 5be9c66
Rename bearer auth function.
aemous e09d885
Remove debug statement
aemous 77e7f7c
Remove unused print statement.
aemous 24c9076
MAke sure operation-level auth is in candidates list.
aemous b5e9d0b
Remove debug print.
aemous 7a4c270
Extract common code.
aemous 9a8cd56
Remove UnsupportedSignatureVersionError try-except clause; was not th…
aemous 0563fe8
Update code architecture to be cleaner, based on feedback.
aemous 8daf219
Remove dead code.
aemous 5e9e1a2
Migrate import to botocore from awscli.
aemous 9847e4e
Move the function to the right location.
aemous cc0548f
Simplify reordering code added to EndpointRulesetResolver.
aemous edc7fd5
Add changelog entry.
aemous a40c847
Merge branch 'v2' into bugfix-auth-scheme-pref
aemous 5681b21
Add unit test cases for EP2.0 auth_scheme_preference.
aemous cd01f69
Remove unused import.
aemous fb7201f
Rename local variables based on PR feedback.
aemous 8f3212e
Refactor endpoint preference resolution to use utility function.
aemous 7f9f88b
Remove redundant code.
aemous ee60b5b
Fix tests based on latest revisions.
aemous bb313cd
Merge remote-tracking branch 'origin/v2' into bugfix-auth-scheme-pref
aemous 7697542
Clean regions code to use resolve_auth_scheme_preference
aemous 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "type": "bugfix", | ||
| "category": "signing", | ||
| "description": "Fix bug so that configured auth scheme preference is used when auth scheme is resolved from endpoints rulesets, or from operation-level auth trait. Auth scheme preference can be configured using the existing ``auth_scheme_preference`` shared config setting, or the existing ``AWS_AUTH_SCHEME_PREFERENCE`` environment variable." | ||
| } | ||
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
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
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
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
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.
High level note:
Jonathan has a semi-related bugfix that will likely need to apply here as well - https://github.com/boto/botocore/pull/3663/changes.
When we resolve v4a via auth scheme preference, we need to make sure we are also respecting the signing region set
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.
Good callout. I approved and merged the v2 port. I'll now merge it into this branch and make sure the signing set is applied when v4a is resolved via preference in all cases (including EP2.0 and operation-level traits).
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.
After merging in Jonathan's code to this branch, and refactoring the code based on your feedback, I have manually tested various resolution cases (EP2.0, operation-level modeled, with auth scheme preference and sigv4a signing region set configured, and everything seems to work correctly).