Skip to content

Conversation

@gosar
Copy link
Contributor

@gosar gosar commented Sep 27, 2023

Motivation and Context

This is follow up from #4491, where I forced s3control to useSraAuth=true path since tests were failing with useSraAuth=false. Fixing it here.

Modifications

With #4396 since we could have a dummy auth scheme (which would definitely be true for useSraAuth=false), we add the SignerProperties to the SelectedAuthScheme, irrespective of the schemeId. For useSraAuth path, where old Signer is used, this effectively adds the ExecutionAttributes that old Signer needs because of #4396.

Testing

./mvnw clean install -pl :codegen,:s3control passes locally.

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

@gosar gosar mentioned this pull request Sep 28, 2023
12 tasks
@gosar gosar force-pushed the gosar/sra-ia-s3control-preSRA branch from db74c34 to 6228139 Compare September 28, 2023 09:00
@gosar gosar changed the base branch from feature/master/sra-identity-auth to gosar/sra-ia-SraIdentityResolutionTest September 28, 2023 09:01
@gosar gosar marked this pull request as ready for review September 28, 2023 09:09
@gosar gosar requested a review from a team as a code owner September 28, 2023 09:09
@gosar gosar changed the base branch from gosar/sra-ia-SraIdentityResolutionTest to feature/master/sra-identity-auth September 28, 2023 16:50
@gosar gosar merged commit b978c4c into feature/master/sra-identity-auth Sep 28, 2023
@gosar gosar deleted the gosar/sra-ia-s3control-preSRA branch September 28, 2023 16:52
@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 450 Code Smells

84.5% 84.5% Coverage
4.0% 4.0% Duplication

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

private <T extends Identity> SelectedAuthScheme<T> authSchemeWithEndpointSignerProperties(
List<EndpointAuthScheme> endpointAuthSchemes, SelectedAuthScheme<T> selectedAuthScheme) {
for (EndpointAuthScheme endpointAuthScheme : endpointAuthSchemes) {
if (!endpointAuthScheme.schemeId().equals(selectedAuthScheme.authSchemeOption().schemeId())) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @millems for highlighting that not checking this could be an issue for useSraAuth=true client, in a case for example where SelectedAuthScheme=sigv4a, but endpointAuthSchemes=["sigv4","sigv4a"] and the shared signer properties like disableDoubleEncoding have different values from endpoint rules. Without this check, the value from sigv4 EndpointAuthScheme will get used, even though it should use from sigv4a EndpointAuthScheme.

Will address this is separate PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

addressing in #4505

aws-sdk-java-automation added a commit that referenced this pull request Nov 14, 2025
…1304dfad7

Pull request: release <- staging/d73ba50f-8835-45de-888c-6b41304dfad7
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