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

HADOOP-19352. Hadoop OSS Connector adds support for V4 signatures. #7205

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

zhouaoe
Copy link

@zhouaoe zhouaoe commented Dec 4, 2024

Description of PR

AliyunOSS is about to adjust its security policy: only V4 signature requests will be supported in the public cloud. Therefore, support for V4 signatures is also required in Hadoop, and V4 signatures will be the default.

Change 1: Upgraded the OSS SDK version to 3.18.1 to support V4 authentication, while also fixing some bugs inherent in the SDK.
Change 2: Added configuration options to enable V4 authentication support in the hadoop-oss-connector.

How was this patch tested?

Integrated testing was conducted to test V4 authentication. A new test, ITAliyunOSSSignatureV4, is added, which verifies the authentication method using V4. Additionally, it confirms that V1 authentication is still used by default.

mvn test  -Dtest=org.apache.hadoop.fs.aliyun.oss.ITAliyunOSSSignatureV4  -pl hadoop-tools/hadoop-aliyun

[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.hadoop.fs.aliyun.oss.ITAliyunOSSSignatureV4
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.934 s - in org.apache.hadoop.fs.aliyun.oss.ITAliyunOSSSignatureV4
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.655 s
[INFO] Finished at: 2024-12-03T09:01:00Z
[INFO] ------------------------------------------------------------------------

Other Aliyun oss integration tests are also executed.

mvn test  -pl hadoop-tools/hadoop-aliyun

[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.hadoop.fs.aliyun.oss.TestAliyunOSSBlockOutputStream
[INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 37.258 s - in org.apache.hadoop.fs.aliyun.oss.TestAliyunOSSBlockOutputStream
[INFO] Running org.apache.hadoop.fs.aliyun.oss.yarn.TestOSS
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.808 s - in org.apache.hadoop.fs.aliyun.oss.yarn.TestOSS
[INFO] Running org.apache.hadoop.fs.aliyun.oss.yarn.TestOSSMiniYarnCluster
[WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.128 s - in org.apache.hadoop.fs.aliyun.oss.yarn.TestOSSMiniYarnCluster
[INFO] Running org.apache.hadoop.fs.aliyun.oss.TestAliyunOSSFileSystemContract
[INFO] Tests run: 53, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 22.578 s - in org.apache.hadoop.fs.aliyun.oss.TestAliyunOSSFileSystemContract
[INFO] Running org.apache.hadoop.fs.aliyun.oss.TestAliyunOSSFileSystemStore
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 23.816 s - in org.apache.hadoop.fs.aliyun.oss.TestAliyunOSSFileSystemStore
[INFO] Running org.apache.hadoop.fs.aliyun.oss.fileContext.TestOSSFileContext
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.262 s - in org.apache.hadoop.fs.aliyun.oss.fileContext.TestOSSFileContext
[INFO] Running org.apache.hadoop.fs.aliyun.oss.fileContext.TestOSSFileContextCreateMkdir
[INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.784 s - in org.apache.hadoop.fs.aliyun.oss.fileContext.TestOSSFileContextCreateMkdir
[INFO] Running org.apache.hadoop.fs.aliyun.oss.fileContext.TestOSSFileContextMainOperations
[WARNING] Tests run: 73, Failures: 0, Errors: 0, Skipped: 4, Time elapsed: 16.198 s - in org.apache.hadoop.fs.aliyun.oss.fileContext.TestOSSFileContextMainOperations
[INFO] Running org.apache.hadoop.fs.aliyun.oss.fileContext.TestOSSFileContextStatistics
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.682 s - in org.apache.hadoop.fs.aliyun.oss.fileContext.TestOSSFileContextStatistics
[INFO] Running org.apache.hadoop.fs.aliyun.oss.fileContext.TestOSSFileContextUtil
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.23 s - in org.apache.hadoop.fs.aliyun.oss.fileContext.TestOSSFileContextUtil
[INFO] Running org.apache.hadoop.fs.aliyun.oss.fileContext.TestOSSFileContextURI
[WARNING] Tests run: 17, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 6.146 s - in org.apache.hadoop.fs.aliyun.oss.fileContext.TestOSSFileContextURI
[INFO] Running org.apache.hadoop.fs.aliyun.oss.contract.TestAliyunOSSContractDelete
[WARNING] Tests run: 8, Failures: 0, Errors: 0, Skipped: 8, Time elapsed: 0.158 s - in org.apache.hadoop.fs.aliyun.oss.contract.TestAliyunOSSContractDelete
[INFO] Running org.apache.hadoop.fs.aliyun.oss.contract.TestAliyunOSSContractOpen
[WARNING] Tests run: 19, Failures: 0, Errors: 0, Skipped: 19, Time elapsed: 0.201 s - in org.apache.hadoop.fs.aliyun.oss.contract.TestAliyunOSSContractOpen
[INFO] Running org.apache.hadoop.fs.aliyun.oss.contract.TestAliyunOSSContractSeek
[WARNING] Tests run: 19, Failures: 0, Errors: 0, Skipped: 19, Time elapsed: 0.204 s - in org.apache.hadoop.fs.aliyun.oss.contract.TestAliyunOSSContractSeek
[INFO] Running org.apache.hadoop.fs.aliyun.oss.contract.TestAliyunOSSContractGetFileStatus
[WARNING] Tests run: 20, Failures: 0, Errors: 0, Skipped: 20, Time elapsed: 0.197 s - in org.apache.hadoop.fs.aliyun.oss.contract.TestAliyunOSSContractGetFileStatus
[INFO] Running org.apache.hadoop.fs.aliyun.oss.contract.TestAliyunOSSContractDistCp
[WARNING] Tests run: 13, Failures: 0, Errors: 0, Skipped: 13, Time elapsed: 0.179 s - in org.apache.hadoop.fs.aliyun.oss.contract.TestAliyunOSSContractDistCp
[INFO] Running org.apache.hadoop.fs.aliyun.oss.contract.TestAliyunOSSContractMkdir
[WARNING] Tests run: 8, Failures: 0, Errors: 0, Skipped: 8, Time elapsed: 0.164 s - in org.apache.hadoop.fs.aliyun.oss.contract.TestAliyunOSSContractMkdir
[INFO] Running org.apache.hadoop.fs.aliyun.oss.contract.TestAliyunOSSContractRootDir
[WARNING] Tests run: 9, Failures: 0, Errors: 0, Skipped: 9, Time elapsed: 0.164 s - in org.apache.hadoop.fs.aliyun.oss.contract.TestAliyunOSSContractRootDir
[INFO] Running org.apache.hadoop.fs.aliyun.oss.contract.TestAliyunOSSContractRename
[WARNING] Tests run: 10, Failures: 0, Errors: 0, Skipped: 10, Time elapsed: 0.167 s - in org.apache.hadoop.fs.aliyun.oss.contract.TestAliyunOSSContractRename
[INFO] Running org.apache.hadoop.fs.aliyun.oss.contract.TestAliyunOSSContractCreate
[WARNING] Tests run: 16, Failures: 0, Errors: 0, Skipped: 16, Time elapsed: 0.182 s - in org.apache.hadoop.fs.aliyun.oss.contract.TestAliyunOSSContractCreate
[INFO] Running org.apache.hadoop.fs.aliyun.oss.contract.TestAliyunOSSContractGetFileStatusV1List
[WARNING] Tests run: 20, Failures: 0, Errors: 0, Skipped: 20, Time elapsed: 0.199 s - in org.apache.hadoop.fs.aliyun.oss.contract.TestAliyunOSSContractGetFileStatusV1List
[INFO] Running org.apache.hadoop.fs.aliyun.oss.TestAliyunOSSInputStream
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.352 s - in org.apache.hadoop.fs.aliyun.oss.TestAliyunOSSInputStream
[INFO] Running org.apache.hadoop.fs.aliyun.oss.TestAliyunCredentials
[WARNING] Tests run: 2, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 0.131 s - in org.apache.hadoop.fs.aliyun.oss.TestAliyunCredentials

[INFO]
[INFO] Results:
[INFO]
[WARNING] Tests run: 328, Failures: 0, Errors: 0, Skipped: 150
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  02:12 min
[INFO] Finished at: 2024-12-03T08:15:52Z
[INFO] ------------------------------------------------------------------------

For code changes:

  • Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 6m 38s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+0 🆗 detsecrets 0m 1s detect-secrets was not available.
+0 🆗 xmllint 0m 1s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 2 new or modified test files.
_ trunk Compile Tests _
+0 🆗 mvndep 15m 14s Maven dependency ordering for branch
+1 💚 mvninstall 17m 46s trunk passed
+1 💚 compile 8m 30s trunk passed with JDK Ubuntu-11.0.25+9-post-Ubuntu-1ubuntu120.04
+1 💚 compile 7m 34s trunk passed with JDK Private Build-1.8.0_432-8u432-gaus1-0ubuntu220.04-ga
+1 💚 checkstyle 2m 1s trunk passed
+1 💚 mvnsite 0m 58s trunk passed
+1 💚 javadoc 0m 56s trunk passed with JDK Ubuntu-11.0.25+9-post-Ubuntu-1ubuntu120.04
+1 💚 javadoc 0m 52s trunk passed with JDK Private Build-1.8.0_432-8u432-gaus1-0ubuntu220.04-ga
+0 🆗 spotbugs 0m 31s branch/hadoop-project no spotbugs output file (spotbugsXml.xml)
+1 💚 shadedclient 19m 22s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 28s Maven dependency ordering for patch
+1 💚 mvninstall 0m 25s the patch passed
+1 💚 compile 8m 13s the patch passed with JDK Ubuntu-11.0.25+9-post-Ubuntu-1ubuntu120.04
+1 💚 javac 8m 13s the patch passed
+1 💚 compile 7m 38s the patch passed with JDK Private Build-1.8.0_432-8u432-gaus1-0ubuntu220.04-ga
+1 💚 javac 7m 38s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
-0 ⚠️ checkstyle 1m 55s /results-checkstyle-root.txt root: The patch generated 16 new + 0 unchanged - 0 fixed = 16 total (was 0)
+1 💚 mvnsite 0m 54s the patch passed
+1 💚 javadoc 0m 42s the patch passed with JDK Ubuntu-11.0.25+9-post-Ubuntu-1ubuntu120.04
+1 💚 javadoc 0m 54s the patch passed with JDK Private Build-1.8.0_432-8u432-gaus1-0ubuntu220.04-ga
+0 🆗 spotbugs 0m 26s hadoop-project has no data from spotbugs
+1 💚 shadedclient 19m 45s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 19s hadoop-project in the patch passed.
+1 💚 unit 0m 26s hadoop-aliyun in the patch passed.
+1 💚 asflicense 0m 40s The patch does not generate ASF License warnings.
127m 26s
Subsystem Report/Notes
Docker ClientAPI=1.47 ServerAPI=1.47 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7205/1/artifact/out/Dockerfile
GITHUB PR #7205
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint spotbugs checkstyle
uname Linux 20cbabffc8c9 5.15.0-124-generic #134-Ubuntu SMP Fri Sep 27 20:20:17 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 99f63ea
Default Java Private Build-1.8.0_432-8u432-gaus1-0ubuntu220.04-ga
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.25+9-post-Ubuntu-1ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_432-8u432-gaus1-0ubuntu220.04-ga
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7205/1/testReport/
Max. process+thread count 551 (vs. ulimit of 5500)
modules C: hadoop-project hadoop-tools/hadoop-aliyun U: .
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7205/1/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@zhouaoe
Copy link
Author

zhouaoe commented Dec 18, 2024

@steveloughran Please kindly review this pull request (PR) at your convenience.
I believe this pull request (PR) is relatively important. Since Aliyun Object Storage Service (OSS) will no longer support V1 authentication and will only support V4 authentication going forward, without this PR, customers using Hadoop will no longer be able to connect to Aliyun OSS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants