- 
                Notifications
    You must be signed in to change notification settings 
- Fork 9.1k
HADOOP-19004. S3A: Support Authentication through HttpSigner API #6324
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
HADOOP-19004. S3A: Support Authentication through HttpSigner API #6324
Conversation
| This patch is from @HarshitGupta11; I've added my wrapping changes to it so its going to have yetus and steve happy | 
| 💔 -1 overall 
 
 
 This message was automatically generated. | 
| 🎊 +1 overall 
 
 This message was automatically generated. | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good mostly.
But we are now configuring signers twice -
Once in AwsClientConfig.createClientConfigBuilder() and here. If someone has fs.s3a.custom.signers and fs.s3a.http.signer.enabled, I don't know what happens.
The way I was thinking about doing this was removing all the current code we have for configuring Signers and only having the new auth scheme stuff. Also use the existing config names instead of adding new ones. The old Signer interface has been deprecated I think, and that interface was a breaking change with V2 anyway, so should be able to update to new AuthSchemes only.
Is this enough for providing S3Express auth scheme support too? From what I saw before the Auth scheme needs to implement S3ExpressAuthScheme. So we'll need to check if the custom Signer is for S3Express. Maybe adding a test for S3Express will be useful too. Also will need documentation, this is all a bit confusing now and easy to use the the wrong Signer type with S3Express and miss out on the fast createSession auth.
I am happy to merge this once the createSession() comment is addressed, and I can do all of the above in a follow up PR.
| .build(); | ||
| } | ||
|  | ||
| public CreateSessionResponse createSessionInternal(CreateSessionRequest createSessionRequest){ | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unused, consider removing. if it is for internal use only, move to S3AInternals? There's also no corresponding method for it RequestFactory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cut it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aah, that's why the imports are still obsolete...will cut
Move to the new auth flow based signers for aws. * Implement a new Signer Initialization Chain * Add a new instantiation method * Add a new test * Fix Reflection Code for SignerInitialization (+steve changes) * move instantiation code into SignerFactory * CustomHttpSigner goes into production code for broader testing * some tuning of property values and names of constants/methods. Change-Id: I8f34af4bd958d631bcb03d7c073ed1da01cb8205
Change-Id: Ibd1e708e5ff6eb3f7e055153e4d199c945650d2c
* Remove unused method in s3afs * put static imports in DefaultS3ClientFactory in right order Change-Id: Ib5125d5e1a373835bac5f90efed42d0947cd1ba5
ab04508    to
    c6542d8      
    Compare
  
    | 
 | 
| 
  | 
| 🎊 +1 overall 
 
 This message was automatically generated. | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my review (remember, this is not my PR)
| import software.amazon.awssdk.services.s3.S3Client; | ||
| import software.amazon.awssdk.services.s3.model.CompleteMultipartUploadRequest; | ||
| import software.amazon.awssdk.services.s3.model.CompleteMultipartUploadResponse; | ||
| import software.amazon.awssdk.services.s3.model.CreateSessionRequest; | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why these imports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, left in when I cut its use; will fix and retest
Change-Id: I5d590b110d8667371eff449154c602e6fd420728
| 🎊 +1 overall 
 
 This message was automatically generated. | 
Change-Id: Ifcb9274dcb0124f5dc2f9a5acf6cb0c7b5280bfe
| 🎊 +1 overall 
 
 This message was automatically generated. | 
| OK, checkstyle fixed, +1, merging (remember, this is Harshit's patch, I've just been doing the wrap-up) | 
Move to the new auth flow based signers for aws. * Implement a new Signer Initialization Chain * Add a new instantiation method * Add a new test * Fix Reflection Code for SignerInitialization Contributed by Harshit Gupta
Move to the new auth flow based signers for aws. * Implement a new Signer Initialization Chain * Add a new instantiation method * Add a new test * Fix Reflection Code for SignerInitialization Contributed by Harshit Gupta
…che#6324) Move to the new auth flow based signers for aws. * Implement a new Signer Initialization Chain * Add a new instantiation method * Add a new test * Fix Reflection Code for SignerInitialization Contributed by Harshit Gupta
HADOOP-19004. S3A: Support Authentication through HttpSigner API
Move to the new auth flow based signers for aws. * Implement a new Signer Initialization Chain
(+steve changes)
How was this patch tested?
new test
For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles?