-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HADOOP-19648. Cos use token credential will lose token field #7911
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
Conversation
🎊 +1 overall
This message was automatically generated. |
@cnauroth hi, bro, I send a new pr to merge targeting brach-3.4. Previous conflicts are test dependencies. ITest's results are here. Could you help me to review this pr? |
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.
+1. I'll commit this shortly.
Closes #7911 Signed-off-by: Chris Nauroth <[email protected]>
Thank you again @leosanqing . I committed this to branch-3.4. |
I'm not sure if branch-3.3 is still being maintained, but I have tested this PR against branch-3.3 in my local environment, and it passed. If you are still releasing new versions for 3.3, this could be merged into branch-3.3 as well, since it was the original branch where this COS feature was first introduced. |
Description of PR
In the org.apache.hadoop.fs.cosn.CosNativeFileSystemStore#initCOSClient method, when the client is initialized, it only passes the access key and secret key, completely ignoring the session token. This causes all subsequent operations that rely on these temporary credentials to fail.
Furthermore, this re-initialization step seems unnecessary. Instead of creating a new client with incomplete credentials, the existing credential provider (which already contains the AK, SK, and token) should be passed down directly.
This is same as #7867 there were some conflicts. so I send up a separate pull request targeting branch-3.4.
How was this patch tested?
ITests are passed on my local env.
For code changes: