Revert "Revert Presigners to pre SRA Identity & Auth (#4515)" #4534
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.
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,
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
Checklist
mvn install
succeedsscripts/new-change
script and following the instructions. Commit the new file created by the script in.changes/next-release
with your changes.License