Package org.apache.hadoop.fs.s3a
Class TemporaryAWSCredentialsProvider
java.lang.Object
org.apache.hadoop.fs.s3a.auth.AbstractAWSCredentialProvider
org.apache.hadoop.fs.s3a.auth.AbstractSessionCredentialsProvider
org.apache.hadoop.fs.s3a.TemporaryAWSCredentialsProvider
- All Implemented Interfaces:
software.amazon.awssdk.auth.credentials.AwsCredentialsProvider,software.amazon.awssdk.identity.spi.IdentityProvider<software.amazon.awssdk.identity.spi.AwsCredentialsIdentity>
@Public
@Stable
public class TemporaryAWSCredentialsProvider
extends org.apache.hadoop.fs.s3a.auth.AbstractSessionCredentialsProvider
Support session credentials for authenticating with AWS.
Please note that users may reference this class name from configuration
property fs.s3a.aws.credentials.provider. Therefore, changing the class name
would be a backward-incompatible change.
This credential provider must not fail in creation because that will
break a chain of credential providers.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.fs.s3a.auth.AbstractSessionCredentialsProvider
org.apache.hadoop.fs.s3a.auth.AbstractSessionCredentialsProvider.NoCredentials -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTemporaryAWSCredentialsProvider(URI uri, Configuration conf) Constructor: the URI will be null if the provider is inited unbonded to a filesystem.Construct from just a configuration. -
Method Summary
Modifier and TypeMethodDescriptionprotected software.amazon.awssdk.auth.credentials.AwsCredentialscreateCredentials(Configuration config) The credentials here must include a session token, else this operation will raise an exception.Methods inherited from class org.apache.hadoop.fs.s3a.auth.AbstractSessionCredentialsProvider
getInitializationException, hasCredentials, init, isInitialized, resolveCredentials, toStringMethods inherited from class org.apache.hadoop.fs.s3a.auth.AbstractAWSCredentialProvider
getConf, getUriMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awssdk.auth.credentials.AwsCredentialsProvider
identityType, resolveIdentityMethods inherited from interface software.amazon.awssdk.identity.spi.IdentityProvider
resolveIdentity, resolveIdentity
-
Field Details
-
NAME
- See Also:
-
COMPONENT
- See Also:
-
-
Constructor Details
-
TemporaryAWSCredentialsProvider
Construct from just a configuration.- Parameters:
conf- configuration.- Throws:
IOException- on any failure to load the credentials.
-
TemporaryAWSCredentialsProvider
Constructor: the URI will be null if the provider is inited unbonded to a filesystem.- Parameters:
uri- binding to a filesystem URI.conf- configuration.- Throws:
IOException- on any failure to load the credentials.
-
-
Method Details
-
createCredentials
protected software.amazon.awssdk.auth.credentials.AwsCredentials createCredentials(Configuration config) throws IOException The credentials here must include a session token, else this operation will raise an exception.- Specified by:
createCredentialsin classorg.apache.hadoop.fs.s3a.auth.AbstractSessionCredentialsProvider- Parameters:
config- the configuration- Returns:
- temporary credentials.
- Throws:
IOException- on any failure to load the credentials.org.apache.hadoop.fs.s3a.auth.NoAuthWithAWSException- validation failureorg.apache.hadoop.fs.s3a.auth.NoAwsCredentialsException- the credentials are actually empty.
-