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-19201 S3A. Support external-id in assume role #6876

Merged
merged 5 commits into from
Sep 10, 2024

Conversation

Smith-Cruise
Copy link
Contributor

Description of PR

Support external id in AssumedRoleCredentialProvider.java

https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html

How was this patch tested?

tested in my env

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 0m 20s 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.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 💚 mvninstall 31m 55s trunk passed
+1 💚 compile 0m 23s trunk passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2
+1 💚 compile 0m 23s trunk passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
+1 💚 checkstyle 0m 21s trunk passed
+1 💚 mvnsite 0m 24s trunk passed
+1 💚 javadoc 0m 21s trunk passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2
+1 💚 javadoc 0m 24s trunk passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
+1 💚 spotbugs 0m 48s trunk passed
+1 💚 shadedclient 20m 22s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 18s the patch passed
+1 💚 compile 0m 21s the patch passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2
+1 💚 javac 0m 21s the patch passed
+1 💚 compile 0m 19s the patch passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
+1 💚 javac 0m 19s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 12s the patch passed
+1 💚 mvnsite 0m 21s the patch passed
+1 💚 javadoc 0m 10s the patch passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2
+1 💚 javadoc 0m 17s the patch passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
+1 💚 spotbugs 0m 41s the patch passed
+1 💚 shadedclient 19m 49s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 2m 25s hadoop-aws in the patch passed.
+1 💚 asflicense 0m 24s The patch does not generate ASF License warnings.
81m 51s
Subsystem Report/Notes
Docker ClientAPI=1.45 ServerAPI=1.45 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6876/1/artifact/out/Dockerfile
GITHUB PR #6876
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux d89ad20b4705 5.15.0-106-generic #116-Ubuntu SMP Wed Apr 17 09:17:56 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / e17cdab
Default Java Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6876/1/testReport/
Max. process+thread count 551 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-aws U: hadoop-tools/hadoop-aws
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6876/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.

@steveloughran
Copy link
Contributor

I didn't know about this -yes, it could be potentially useful

  • the docs need updating too
  • our delegation token support, where credentials get passed with a job, will also need this: org.apache.hadoop.fs.s3a.auth.delegation.RoleTokenBinding
  • And ideally, a way of explicitly adding a test in our assumed role tests -even if it is something we need to manually set up (e.g. we set the constraint in the role we assume for those tests and verify things work if set, fail if a wrong one is set.

Now, first step to testing: look at the test policy. You have to run all the s3 tests against a S3 store of your choice, and as you are doing things with roles, that must include the assumed role suites. Once you've done that, tell us where and then it's time to work on the test design -which we can help with.

https://hadoop.apache.org/docs/stable/hadoop-aws/tools/hadoop-aws/testing.html

@steveloughran steveloughran changed the title HADOOP-19201 Support external-id in assume role HADOOP-19201 S3A. Support external-id in assume role Jun 10, 2024
@Smith-Cruise
Copy link
Contributor Author

I didn't know about this -yes, it could be potentially useful

  • the docs need updating too
  • our delegation token support, where credentials get passed with a job, will also need this: org.apache.hadoop.fs.s3a.auth.delegation.RoleTokenBinding
  • And ideally, a way of explicitly adding a test in our assumed role tests -even if it is something we need to manually set up (e.g. we set the constraint in the role we assume for those tests and verify things work if set, fail if a wrong one is set.

Now, first step to testing: look at the test policy. You have to run all the s3 tests against a S3 store of your choice, and as you are doing things with roles, that must include the assumed role suites. Once you've done that, tell us where and then it's time to work on the test design -which we can help with.

https://hadoop.apache.org/docs/stable/hadoop-aws/tools/hadoop-aws/testing.html

Got it. I will do it when i am free.

@steveloughran
Copy link
Contributor

@Smith-Cruise this isn't going to get into 3.4.1 but if you can pick this up again we can target 3.4.2

@steveloughran
Copy link
Contributor

tested this. it works

If you can add a mention of this option in hadoop-tools/hadoop-aws/src/site/markdown/tools/hadoop-aws/assumed_roles.md

then this is ready to merge. We don't want to add features which are only visible to people who looked at the source code...

@Smith-Cruise
Copy link
Contributor Author

tested this. it works

If you can add a mention of this option in hadoop-tools/hadoop-aws/src/site/markdown/tools/hadoop-aws/assumed_roles.md

then this is ready to merge. We don't want to add features which are only visible to people who looked at the source code...

OK, I will add it to doc

Signed-off-by: Smith Cruise <[email protected]>
@Smith-Cruise
Copy link
Contributor Author

tested this. it works

If you can add a mention of this option in hadoop-tools/hadoop-aws/src/site/markdown/tools/hadoop-aws/assumed_roles.md

then this is ready to merge. We don't want to add features which are only visible to people who looked at the source code...

I've updated the doc, PTAL

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 19s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 xmllint 0m 0s xmllint was not available.
+0 🆗 markdownlint 0m 0s markdownlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+0 🆗 mvndep 15m 2s Maven dependency ordering for branch
+1 💚 mvninstall 20m 17s trunk passed
+1 💚 compile 9m 5s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 compile 8m 12s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 checkstyle 2m 5s trunk passed
+1 💚 mvnsite 1m 40s trunk passed
+1 💚 javadoc 1m 15s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 1m 11s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 spotbugs 2m 20s trunk passed
+1 💚 shadedclient 20m 49s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 22s Maven dependency ordering for patch
+1 💚 mvninstall 0m 50s the patch passed
+1 💚 compile 8m 35s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javac 8m 35s the patch passed
+1 💚 compile 8m 12s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 javac 8m 12s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 2m 5s the patch passed
+1 💚 mvnsite 1m 40s the patch passed
+1 💚 javadoc 1m 11s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 1m 5s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 spotbugs 2m 36s the patch passed
+1 💚 shadedclient 21m 11s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 16m 35s hadoop-common in the patch passed.
+1 💚 unit 2m 8s hadoop-aws in the patch passed.
+1 💚 asflicense 0m 43s The patch does not generate ASF License warnings.
152m 8s
Subsystem Report/Notes
Docker ClientAPI=1.47 ServerAPI=1.47 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6876/2/artifact/out/Dockerfile
GITHUB PR #6876
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint spotbugs checkstyle markdownlint
uname Linux b01ec6b04c99 5.15.0-117-generic #127-Ubuntu SMP Fri Jul 5 20:13:28 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / d443ac7
Default Java Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6876/2/testReport/
Max. process+thread count 3109 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common hadoop-tools/hadoop-aws U: .
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6876/2/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.

Copy link
Contributor

@steveloughran steveloughran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the docs -some minor turning.

+1 pending those changes

@@ -153,6 +153,14 @@ Here are the full set of configuration options.
</description>
</property>

<property>
<name>fs.s3a.assumed.role.external.id</name>
<value />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you an a valid example

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean? Put an example value here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think putting an example here is meaningless, because external id is just a string set by the user, it can by any value. No unified format.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so make that clear, e.g

<value>arbitrary value</value

@@ -1457,6 +1457,14 @@
</description>
</property>

<property>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets actually cut this. Adding default values here increases the size of the configuration when marshalling, which happens a lot these days.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Signed-off-by: Smith Cruise <[email protected]>
@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 20s 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.
+0 🆗 markdownlint 0m 1s markdownlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+0 🆗 mvndep 14m 23s Maven dependency ordering for branch
+1 💚 mvninstall 19m 54s trunk passed
+1 💚 compile 9m 7s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 compile 8m 16s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 checkstyle 2m 6s trunk passed
+1 💚 mvnsite 1m 37s trunk passed
+1 💚 javadoc 1m 18s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 1m 8s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 spotbugs 2m 16s trunk passed
+1 💚 shadedclient 20m 47s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 22s Maven dependency ordering for patch
+1 💚 mvninstall 0m 54s the patch passed
+1 💚 compile 8m 43s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javac 8m 43s the patch passed
+1 💚 compile 8m 9s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 javac 8m 9s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 2m 2s the patch passed
+1 💚 mvnsite 1m 32s the patch passed
+1 💚 javadoc 1m 10s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 1m 9s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 spotbugs 2m 31s the patch passed
+1 💚 shadedclient 21m 25s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 16m 43s hadoop-common in the patch passed.
+1 💚 unit 2m 9s hadoop-aws in the patch passed.
+1 💚 asflicense 0m 42s The patch does not generate ASF License warnings.
151m 22s
Subsystem Report/Notes
Docker ClientAPI=1.47 ServerAPI=1.47 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6876/3/artifact/out/Dockerfile
GITHUB PR #6876
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint spotbugs checkstyle markdownlint
uname Linux 18c3a5aaec05 5.15.0-117-generic #127-Ubuntu SMP Fri Jul 5 20:13:28 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / b4a6ba5
Default Java Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6876/3/testReport/
Max. process+thread count 1281 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common hadoop-tools/hadoop-aws U: .
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6876/3/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.

Signed-off-by: Smith Cruise <[email protected]>
@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 19s 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.
+0 🆗 markdownlint 0m 1s markdownlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+0 🆗 mvndep 14m 30s Maven dependency ordering for branch
+1 💚 mvninstall 20m 2s trunk passed
+1 💚 compile 9m 3s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 compile 8m 14s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 checkstyle 2m 7s trunk passed
+1 💚 mvnsite 1m 40s trunk passed
+1 💚 javadoc 1m 19s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 1m 11s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 spotbugs 2m 21s trunk passed
+1 💚 shadedclient 21m 24s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 20s Maven dependency ordering for patch
+1 💚 mvninstall 0m 53s the patch passed
+1 💚 compile 8m 45s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javac 8m 45s the patch passed
+1 💚 compile 8m 8s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 javac 8m 8s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 2m 2s the patch passed
+1 💚 mvnsite 1m 31s the patch passed
+1 💚 javadoc 1m 6s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 1m 6s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 spotbugs 2m 30s the patch passed
+1 💚 shadedclient 21m 30s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 16m 38s hadoop-common in the patch passed.
+1 💚 unit 2m 10s hadoop-aws in the patch passed.
+1 💚 asflicense 0m 43s The patch does not generate ASF License warnings.
152m 7s
Subsystem Report/Notes
Docker ClientAPI=1.47 ServerAPI=1.47 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6876/4/artifact/out/Dockerfile
GITHUB PR #6876
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint spotbugs checkstyle markdownlint
uname Linux 1bb6d7542e49 5.15.0-117-generic #127-Ubuntu SMP Fri Jul 5 20:13:28 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / d68a856
Default Java Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6876/4/testReport/
Max. process+thread count 3109 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common hadoop-tools/hadoop-aws U: .
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6876/4/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.

@Smith-Cruise
Copy link
Contributor Author

@steveloughran Can call anyone help to have a review? Thks!

Copy link
Contributor

@steveloughran steveloughran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commented. code is all good.

However, we need test code -that is the only way we can verify that setting it doesn't break things. And for you to be sure nobody breaks it in future, inour code or the AWS SDK.

I'm going to propose you extend ITestAssumeRole slightly by

  1. In RoleTestUtils.newAssumedRoleConfig() add ASSUMED_ROLE_EXTERNAL_ID to the list of options to remove in removeBaseAndBucketOverrides
  2. In ITestAssumeRole.testAssumeRoleCreateFS(), after the call to newAssumedRoleConfig(), set ASSUMED_ROLE_EXTERNAL_ID to some value, such as ITestAssumeRole.testAssumeRoleCreateFS() itself.

Set up your hadoop-aws test configuration to include the role settings (see testing.md) and run that test. I'm running the tests to again, #7021 shows I'd accidentally stopped doing that. Once you have it working, tell us which s3 endpoint you ran against and I will retest the PR myself.

@@ -153,6 +153,14 @@ Here are the full set of configuration options.
</description>
</property>

<property>
<name>fs.s3a.assumed.role.external.id</name>
<value />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so make that clear, e.g

<value>arbitrary value</value

Signed-off-by: Smith Cruise <[email protected]>
@Smith-Cruise
Copy link
Contributor Author

Smith-Cruise commented Sep 10, 2024

#7021

I'm curious about one thing, If I only tell you which endpoint I tested, how can you verify it? Do I need to provide ak/sk for you?

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 6m 45s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 xmllint 0m 0s xmllint was not available.
+0 🆗 markdownlint 0m 0s markdownlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+0 🆗 mvndep 14m 4s Maven dependency ordering for branch
+1 💚 mvninstall 19m 59s trunk passed
+1 💚 compile 9m 2s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 compile 8m 12s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 checkstyle 2m 6s trunk passed
+1 💚 mvnsite 1m 35s trunk passed
+1 💚 javadoc 1m 27s trunk passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 1m 9s trunk passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 spotbugs 2m 20s trunk passed
+1 💚 shadedclient 20m 51s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 21s Maven dependency ordering for patch
+1 💚 mvninstall 0m 53s the patch passed
+1 💚 compile 8m 35s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javac 8m 35s the patch passed
+1 💚 compile 8m 16s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 javac 8m 16s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 2m 6s the patch passed
+1 💚 mvnsite 1m 38s the patch passed
+1 💚 javadoc 1m 17s the patch passed with JDK Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04
+1 💚 javadoc 1m 9s the patch passed with JDK Private Build-1.8.0_422-8u422-b05-1~20.04-b05
+1 💚 spotbugs 2m 33s the patch passed
+1 💚 shadedclient 20m 48s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 16m 33s hadoop-common in the patch passed.
+1 💚 unit 2m 15s hadoop-aws in the patch passed.
+1 💚 asflicense 0m 42s The patch does not generate ASF License warnings.
157m 15s
Subsystem Report/Notes
Docker ClientAPI=1.47 ServerAPI=1.47 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6876/5/artifact/out/Dockerfile
GITHUB PR #6876
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint spotbugs checkstyle markdownlint
uname Linux 5fedc6b5aa18 5.15.0-117-generic #127-Ubuntu SMP Fri Jul 5 20:13:28 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / d75fb47
Default Java Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.24+8-post-Ubuntu-1ubuntu320.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_422-8u422-b05-1~20.04-b05
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6876/5/testReport/
Max. process+thread count 1273 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common hadoop-tools/hadoop-aws U: .
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6876/5/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.

Copy link
Contributor

@steveloughran steveloughran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
+1

will merge then cherrypick and test on branch-3.4

@steveloughran steveloughran merged commit c835adb into apache:trunk Sep 10, 2024
1 of 3 checks passed
steveloughran pushed a commit that referenced this pull request Sep 10, 2024
The option fs.s3a.assumed.role.external.id sets the external id for calls of AssumeRole to the STS service

Contributed by Smith Cruise
@steveloughran
Copy link
Contributor

merged to trunk and 3.4 branches; added the option to my account. lets see if any surprises show up. Though I know that not enough people are running the hadoop-aws test with the assume role options correctly set.

@Smith-Cruise Smith-Cruise deleted the support-external-id branch September 11, 2024 02:24
@Smith-Cruise
Copy link
Contributor Author

merged to trunk and 3.4 branches; added the option to my account. lets see if any surprises show up. Though I know that not enough people are running the hadoop-aws test with the assume role options correctly set.

Actually, we've already run it in StarRocks project, everything looks OK
https://github.com/StarRocks/starrocks/blob/main/fe/fe-core/src/main/java/com/starrocks/credential/provider/AssumedRoleCredentialProvider.java

Hexiaoqiao pushed a commit to Hexiaoqiao/hadoop that referenced this pull request Sep 12, 2024
The option fs.s3a.assumed.role.external.id sets the external id for calls of AssumeRole to the STS service

Contributed by Smith Cruise
asfgit pushed a commit that referenced this pull request Sep 13, 2024
The option fs.s3a.assumed.role.external.id sets the
external id for calls of AssumeRole to the STS service

Contributed by Smith Cruise
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.

3 participants