-
Notifications
You must be signed in to change notification settings - Fork 652
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
fix: correct recognition and zeroing of cache-wrapped credentials on client init #2404
Merged
Conversation
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
AnonymousCredentials
isaiahvita
approved these changes
Dec 1, 2023
wty-Bryant
approved these changes
Dec 1, 2023
mmoghaddam385
added a commit
to polygon-io/aws-sdk-go-v2
that referenced
this pull request
Feb 1, 2024
* feat: sra identity&auth refactor (aws#2364) * Update API model * Update endpoints model * Update SDK's smithy-go dependency to v1.17.0 * Regenerated Clients * Release 2023-11-15 * fix trailing comment parse in properties (aws#2371) * Update API model * Update endpoints model * Regenerated Clients * Release 2023-11-16 * Remove macie service * Add changelog for last commit * Merge customizations for service s3 * Update API model * Update endpoints model * Regenerated Clients * Release 2023-11-17 * deprecate v4.SignHTTPRequestMiddleware (aws#2375) * Update API model * Update endpoints model * Regenerated Clients * Release 2023-11-20 * fix: don't send 0 max items for object version and multipart upload paginators (aws#2380) * fix: don't expect response to be json in endpointcreds provider (aws#2381) * Update API model * Update endpoints model * Regenerated Clients * Release 2023-11-21 * breakfix: convert public access block config fields to nilable like s3 (aws#2385) * Update API model * Regenerated Clients * Release 2023-11-22 * rebase to main branch * Add changelog * Update API model * Update endpoints model * Regenerated Clients * Release 2023-11-27 * Update API model * Regenerated Clients * Release 2023-11-27.2 * fix: respect functional option modifications to RetryMaxAttempts (aws#2390) * Update API model * Update endpoints model * Regenerated Clients * Release 2023-11-28 * Change request compression codegen to operation level * Merge customizations for service s3 * Update API model * Update endpoints model * Regenerated Clients * Release 2023-11-28.2 * fix: correct wiring of disable s3express auth toggle (aws#2394) * Change requestion compression comment * Release 2023-11-28.3 * Update golang.org/x/net dependency (aws#2391) * feat: add Options() getter to service clients (aws#2398) * Update API model * Update SDK's smithy-go dependency to v1.18.0 * Regenerated Clients * Release 2023-11-29 * regenerate sdk * Update API model * Update endpoints model * Update SDK's smithy-go dependency to v1.18.1 * Regenerated Clients * Release 2023-11-30 * fix: use region overrides in endpoint discovery (aws#2393) * Update API model * Regenerated Clients * Release 2023-11-30.2 * fix: correct wrapping of errors in authentication workflow (aws#2403) * fix: correct recognition and zeroing of cache-wrapped AnonymousCredentials (aws#2404) * Update API model * Regenerated Clients * Release 2023-12-01 * feat: add express integration test (aws#2402) * Update API model * Update endpoints model * Regenerated Clients * Release 2023-12-04 * Add request compression assertion to protocol unit tests * Smithy upgrade (aws#2407) * Update API model * Regenerated Clients * Release 2023-12-05 * Restore pre-SRA optionalAuth/no-auth behaviors (aws#2410) * Update API model * Regenerated Clients * Release 2023-12-06 * Change config loading logic * regenerate partitions (aws#2415) * fix codegen ci (aws#2418) * Update API model * Update endpoints model * Update SDK's smithy-go dependency to v1.19.0 * Regenerated Clients * Release 2023-12-07 * fix: add non-vhostable buckets to path when using legacy endpoint resolver (aws#2417) * update express cache key (aws#2414) * fix: translation of ini service sections into shared config (aws#2416) * fix: reinstate presence of retryer when functional opts run but still respect max attempts set therein (aws#2420) * Update API model * Regenerated Clients * Release 2023-12-08 * Update API model * Regenerated Clients * Release 2023-12-11 * Update API model * Update endpoints model * Regenerated Clients * Release 2023-12-12 * fix missing smithy-go checkout on main * Update API model * Update endpoints model * Regenerated Clients * Release 2023-12-13 * Update API model * Update endpoints model * Regenerated Clients * Release 2023-12-14 * Update API model * Update endpoints model * Regenerated Clients * Release 2023-12-15 * Update API model * Update endpoints model * Regenerated Clients * Release 2023-12-18 * Update API model * Update endpoints model * Regenerated Clients * Release 2023-12-19 * Update API model * Update endpoints model * Update partitions file * Regenerated Clients * Release 2023-12-20 * Update API model * Update endpoints model * Regenerated Clients * Release 2023-12-21 * Update API model * Update endpoints model * Regenerated Clients * Release 2023-12-22 * Update API model * Update endpoints model * Regenerated Clients * Release 2023-12-26 * Update API model * Update endpoints model * Regenerated Clients * Release 2023-12-27 * Update API model * Update endpoints model * Regenerated Clients * Release 2023-12-28 * Update API model * Regenerated Clients * Release 2023-12-29 * removed incorrect description * changelog added * Update API model * Update endpoints model * Regenerated Clients * Release 2024-01-03 * Fix SRA auth trailing checksum retry bug (aws#2438) * Update API model * Regenerated Clients * Release 2024-01-04 * codegen: track upstream sigv4a trait changes (aws#2442) * Update API model * Regenerated Clients * Release 2024-01-05 * Update API model * Regenerated Clients * Release 2024-01-08 * Update API model * Update endpoints model * Regenerated Clients * Release 2024-01-10 * Add smoke test traits dep Adds a dependency on smithy-smoke-test-traits in the sdk code gen package so aws service models that use the smokeTests trait won't fail to build because of unknown traits. Generated a client with a smoke test and confirmed there was no diff. Adding the dependency in the code gen package since it's the models that need the dependency, not the code generator. When smoke tests are implemented in the generator, we can add the dep there. * Update API model * Update endpoints model * Regenerated Clients * Release 2024-01-11 * Update API model * Update endpoints model * Regenerated Clients * Release 2024-01-12 * Update API model * Regenerated Clients * Release 2024-01-14 * Fix signing bug in CFKVS service (aws#2452) * Update API model * Update endpoints model * Regenerated Clients * Release 2024-01-16 * Update API model * Regenerated Clients * Release 2024-01-17 * Remove invalid defaults from a few services (aws#2458) * Update API model * Update endpoints model * Regenerated Clients * Release 2024-01-18 * Update API model * Update endpoints model * Regenerated Clients * Release 2024-01-19 * fix: remove invalid escaping of shared config values (aws#2461) * Update API model * Regenerated Clients * Release 2024-01-22 * Update API model * Regenerated Clients * Release 2024-01-23 * codegen: normalize adding of sigv4a config based on trait presence (aws#2465) * Update API model * Regenerated Clients * Release 2024-01-24 * Update API model * Regenerated Clients * Release 2024-01-25 * Minor GitHub workflow changes (aws#2466) * chore: a more polite closed issue message * chore: relax stale issue timing * Update API model * Regenerated Clients * Release 2024-01-26 * Update API model * Update endpoints model * Regenerated Clients * Release 2024-01-29 * Update API model * Regenerated Clients * Release 2024-01-30 * Update API model * Update endpoints model * Regenerated Clients * Release 2024-01-31 --------- Co-authored-by: Luc Talatinian <102624213+lucix-aws@users.noreply.github.com> Co-authored-by: AWS SDK for Go v2 automation user <aws-sdk-go-v2-github@amazon.com> Co-authored-by: Tianyi Wang <wty@amazon.com> Co-authored-by: Eren Yeager <92114074+wty-Bryant@users.noreply.github.com> Co-authored-by: Isaiah Vita <82135527+isaiahvita@users.noreply.github.com> Co-authored-by: Luc Talatinian <lucix@amazon.com> Co-authored-by: Ran Vaknin <username@users.noreply.github.com> Co-authored-by: Ran Vaknin <50976344+RanVaknin@users.noreply.github.com> Co-authored-by: Miles Ziemer <mziemer@amazon.com> Co-authored-by: Miles Ziemer <45497130+milesziemer@users.noreply.github.com> Co-authored-by: Tom Keller <1083460+kellertk@users.noreply.github.com>
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.
To enable selection of the anonymous auth scheme you must NOT have a sigv4 credentials provider configured. To do this you can either zero the
Credentials
provider in your client construction or set it to the historically respected sentinel ofaws.AnonymousCredentials
.The auth changes for the SRA auth refactor failed to recognize the sentinel in cases where it was wrapped in a credential cache, which is the case when setting a global credential provider through
LoadDefaultConfig
e.g.:This patch corrects that behavior -
aws.IsCredentialsProvider
delegates to the underlying equality check of the cache itself, which considers its own underlying provider.