Skip to content

Add additional backwards-compatibility testing for legacy clients. #4493

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

Merged

Conversation

millems
Copy link
Contributor

@millems millems commented Sep 27, 2023

  1. Ensure anonymous credentials function correctly
  2. Ensure attributes set in custom execution interceptors make it to the legacy signer

1. Ensure anonymous credentials function correctly
2. Ensure attributes set in custom execution interceptors make it to the legacy signer
@millems millems requested a review from a team as a code owner September 27, 2023 20:29
Comment on lines +272 to +275
T currentValue = get(attributes);
if (currentValue == null) {
set(attributes, value);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is more correct, since the presence of the real attribute does not necessarily indicate that the execution attribute value is present (e.g. a signer property's existence isn't guaranteed even if the selected auth scheme is present).

Copy link
Contributor

Choose a reason for hiding this comment

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

This fixed issues we've identified in other testing, even with new clients, since we still have code in core that does putIfAbsent after auth scheme is selected. Thank you!

Copy link
Contributor

@gosar gosar left a comment

Choose a reason for hiding this comment

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

Were you thinking of testing S3SignerExecutionAttributes in later PR?

import software.amazon.awssdk.testutils.service.http.MockSyncHttpClient;

/**
* Ensure that attributes set in execution interceptors are passed to custom signers.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can you add a note here saying the attributes being tested here are SdkProtectedApi, but we still want to make sure if works if customer set these via interceptors.

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug C 4 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 2 Security Hotspots
Code Smell A 465 Code Smells

84.2% 84.2% Coverage
4.0% 4.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@millems millems merged commit 32fb40f into feature/master/sra-identity-auth Sep 28, 2023
@millems millems deleted the millem/backwards-compatible-testing-2 branch September 28, 2023 19:20
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.

2 participants