-
Notifications
You must be signed in to change notification settings - Fork 9k
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-19103 : Add logic for verifying that the STS URL is in the correct format #6615
base: trunk
Are you sure you want to change the base?
Conversation
…rect format At present an invalid URL supplied as an STS endpoint results in failing late with a unclear error message. Here we add support for failing fast with a clearer error message.
🎊 +1 overall
This message was automatically generated. |
...s/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/auth/delegation/DelegationConstants.java
Outdated
Show resolved
Hide resolved
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/auth/STSClientFactory.java
Outdated
Show resolved
Hide resolved
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/auth/STSClientFactory.java
Outdated
Show resolved
Hide resolved
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.
Looks fine mostly, agree @shameersss1 comments, and also left a few more.
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/auth/STSClientFactory.java
Outdated
Show resolved
Hide resolved
...s/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/auth/delegation/DelegationConstants.java
Outdated
Show resolved
Hide resolved
...op-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3ATemporaryCredentials.java
Outdated
Show resolved
Hide resolved
...op-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3ATemporaryCredentials.java
Outdated
Show resolved
Hide resolved
...s/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/auth/delegation/DelegationConstants.java
Outdated
Show resolved
Hide resolved
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
…rect format Address the review comments on the 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.
- Thank you very much for the review comments.
- I really appreciate the attention to detail in the review.
- I have addressed all the comments and raised a new PR.
- Please do check and revert back for any changes you want.
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/auth/STSClientFactory.java
Outdated
Show resolved
Hide resolved
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/auth/STSClientFactory.java
Outdated
Show resolved
Hide resolved
...s/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/auth/delegation/DelegationConstants.java
Outdated
Show resolved
Hide resolved
...s/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/auth/delegation/DelegationConstants.java
Outdated
Show resolved
Hide resolved
...op-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3ATemporaryCredentials.java
Outdated
Show resolved
Hide resolved
...s/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/auth/delegation/DelegationConstants.java
Outdated
Show resolved
Hide resolved
...op-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3ATemporaryCredentials.java
Outdated
Show resolved
Hide resolved
Please note the following test output
|
🎊 +1 overall
This message was automatically generated. |
Really appreciate the detailed comments and reviews. Please do check the PR with the comments addressed. |
@@ -327,14 +440,11 @@ public void testSessionCredentialsRegionBadEndpoint() throws Throwable { | |||
describe("Create a session with a bad region and expect fast failure"); | |||
IllegalArgumentException ex | |||
= expectedSessionRequestFailure( | |||
IllegalArgumentException.class, |
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.
nit: can we avoid non intentional changes?
" ", | ||
EU_IRELAND, | ||
""); | ||
LOG.info("Outcome: ", ex); | ||
if (!(ex.getCause() instanceof URISyntaxException)) { |
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 are we removing this ?
At present an invalid URL can be supplied as an STS endpoint. It will attempt to create an STSClient with it and then fail with,
Testing
Added a new integration test in ITestS3ATemporaryCredentials and verified that the existing tests ran fine.