-
Notifications
You must be signed in to change notification settings - Fork 8.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-18980. S3A credential provider remapping: make extensible #6406
Merged
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4964b5a
HADOOP-18980. S3A credential provider remapping: make extensible
virajjasani 5e2fcb5
addendum - checkstyle
virajjasani 576e80b
addendum - addressing comments
virajjasani c261fcd
addendum - checkstyle
virajjasani cff702f
move utility usage from config class to s3a util class
virajjasani f918d23
test + doc changes
virajjasani 7428c13
minor doc changes
virajjasani File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,6 +66,25 @@ The change in interface will mean that custom credential providers will need to | |
implement `software.amazon.awssdk.auth.credentials.AwsCredentialsProvider` instead of | ||
`com.amazonaws.auth.AWSCredentialsProvider`. | ||
|
||
[HADOOP-18980](https://issues.apache.org/jira/browse/HADOOP-18980) introduces extended version of | ||
the credential provider remapping. `fs.s3a.aws.credentials.provider.mapping` can be used to | ||
list comma-separated key-value pairs of mapped credential providers that are separated by | ||
equal operator (=). The key can be used by `fs.s3a.aws.credentials.provider` config, and it | ||
will be translated into the specified value of credential provider class based on the key-value | ||
pair provided by this config. | ||
|
||
For example, if `fs.s3a.aws.credentials.provider.mapping` is set with value: | ||
|
||
com.amazonaws.auth.AnonymousAWSCredentials=org.apache.hadoop.fs.s3a.AnonymousAWSCredentialsProvider, | ||
com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper=org.apache.hadoop.fs.s3a.auth.IAMInstanceCredentialsProvider, | ||
com.amazonaws.auth.InstanceProfileCredentialsProvider=org.apache.hadoop.fs.s3a.auth.IAMInstanceCredentialsProvider | ||
|
||
With the above key-value pairs, if `fs.s3a.aws.credentials.provider` specifies | ||
`com.amazonaws.auth.AnonymousAWSCredentials`, it will be remapped to | ||
`org.apache.hadoop.fs.s3a.AnonymousAWSCredentialsProvider` by S3A while preparing | ||
AWS credential provider list. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: "the AWS credential provider list" |
||
|
||
|
||
### Original V1 `AWSCredentialsProvider` interface | ||
|
||
Note how the interface begins with the capitalized "AWS" acronym. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: prefer triple backslash over indentation as it allows for us to specify the format.
now: should we actually include this as an XML snippet or not? I'm of mixed feelings here.
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.
Just tried xml snippet to see how it looks and actually it looks better because now the example is much clear. Please let me know what you think of the latest revision.