Skip to content
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

Revert "Revert Presigners to pre SRA Identity & Auth (#4515)" #4534

Merged

Conversation

gosar
Copy link
Contributor

@gosar gosar commented Oct 3, 2023

Motivation and Context

#4515 caused S3PresignerIntegrationTest.keysWithScaryCharactersWorks to fail when useSraAuth=true.

In master, the DefaultS3Presigner would include S3EndpointAuthSchemeInterceptor as seen here. With SRA codegen changes, there is no longer S3EndpointAuthSchemeInterceptor but it's functionality is part of S3ResolveEndpointInterceptor. However, because of #4505 S3ResolveEndpointInterceptor behaves differently for useSraAuth=false v/s true. The integ test is fine with useSraAuth=false, but with useSraAuth=true,

            if (!endpointAuthScheme.schemeId().equals(selectedAuthScheme.authSchemeOption().schemeId())) {
                continue;
            }

check added and that causes the test to fail. So DefaultS3Presigner using S3ResolveEndpointInterceptor generated with useSraAuth=true doesn't work unless DefaultS3Presigner also sets up the rest of SRA things like authSchemes, authSchemeProvider. This part was reverted in #4515 not realizing this issue that it matters to the presigner - the integ test wasn't run earlier with useSraAuth=true.

So to fix the issue, undoing the revert from #4515. Have ensured locally that S3PresignerIntegrationTest passes both with useSraAuth=false/true.

Modifications

This reverts commit cadb6ab from #4515.

Testing

Have ensured locally that S3PresignerIntegrationTest passes both with useSraAuth=false/true.

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 requested a review from a team as a code owner October 3, 2023 22:38
@sonarcloud
Copy link

sonarcloud bot commented Oct 4, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug C 9 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 2 Security Hotspots
Code Smell A 486 Code Smells

85.2% 85.2% Coverage
4.2% 4.2% Duplication

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

@gosar gosar merged commit 9593cf4 into feature/master/sra-identity-auth Oct 4, 2023
6 of 7 checks passed
@gosar gosar deleted the gosar/sra-ia-presigner-revert branch October 4, 2023 00:52
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