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 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
AbstractSessionCredentialsProvider.NoCredentials -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTemporaryAWSCredentialsProvider(URI uri, org.apache.hadoop.conf.Configuration conf) Constructor: the URI will be null if the provider is inited unbonded to a filesystem.TemporaryAWSCredentialsProvider(org.apache.hadoop.conf.Configuration conf) Construct from just a configuration. -
Method Summary
Modifier and TypeMethodDescriptionprotected software.amazon.awssdk.auth.credentials.AwsCredentialscreateCredentials(org.apache.hadoop.conf.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
public TemporaryAWSCredentialsProvider(org.apache.hadoop.conf.Configuration conf) throws IOException Construct from just a configuration.- Parameters:
conf- configuration.- Throws:
IOException- on any failure to load the credentials.
-
TemporaryAWSCredentialsProvider
public TemporaryAWSCredentialsProvider(@Nullable URI uri, org.apache.hadoop.conf.Configuration conf) throws IOException 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(org.apache.hadoop.conf.Configuration config) throws IOException The credentials here must include a session token, else this operation will raise an exception.- Specified by:
createCredentialsin classAbstractSessionCredentialsProvider- Parameters:
config- the configuration- Returns:
- temporary credentials.
- Throws:
IOException- on any failure to load the credentials.NoAuthWithAWSException- validation failureNoAwsCredentialsException- the credentials are actually empty.
-