Skip to content

Support auth scheme preference config #3268

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
wants to merge 5 commits into
base: version-3
Choose a base branch
from
Open

Conversation

mullermp
Copy link
Contributor

@mullermp mullermp commented Jul 7, 2025

Support auth scheme preference config using ENV['AWS_AUTH_SCHEME_PREFERENCE'] or auth_scheme_preference shared config. Configuration values are an array in code and a comma separated string in env/shared config and do not use name spaces. Invalid values are ignored. If an auth scheme is resolved and preferred, the credentials/token is expected. This differs from original design because v3 does not resolve auth per operation but rather on client initialize.

Copy link

github-actions bot commented Jul 7, 2025

Detected 2 possible performance regressions:

  • aws-sdk-cloudwatch.gem_size_kb - z-score regression: 122.5 -> 123.0. Z-score: Infinity
  • aws-sdk-kinesis.gem_size_kb - z-score regression: 76.0 -> 76.5. Z-score: Infinity

Copy link
Contributor

@richardwang1124 richardwang1124 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall approach looks good to me! Left a question.

ordered_auth = preferred_auth.each_with_object([]) do |pref, list|
next unless ENDPOINT_AUTH_PREFERENCE_MAP.key?(pref)

ENDPOINT_AUTH_PREFERENCE_MAP[pref].each { |name| list << { 'name' => name } }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the list adding hashes of name to auth scheme names rather than just being a list of names? Is auth_schemes a list of name, auth_scheme_name key pairs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The endpoint auth schemes model has a list of maps in the same way, so I transformed the preference list to be the same, then added them together. This overall made the logic and change simpler.

Copy link
Contributor

@jterapin jterapin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢✨

mullermp and others added 2 commits July 8, 2025 01:11
…ration.rb

Co-authored-by: Juli Tera <57973151+jterapin@users.noreply.github.com>
…ration.rb

Co-authored-by: Juli Tera <57973151+jterapin@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants