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
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor: the URI will be null if the provider is inited unbonded to a filesystem.
    Construct from just a configuration.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected software.amazon.awssdk.auth.credentials.AwsCredentials
    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, toString

    Methods inherited from class org.apache.hadoop.fs.s3a.auth.AbstractAWSCredentialProvider

    getConf, getUri

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface software.amazon.awssdk.auth.credentials.AwsCredentialsProvider

    identityType, resolveIdentity

    Methods inherited from interface software.amazon.awssdk.identity.spi.IdentityProvider

    resolveIdentity, resolveIdentity
  • Field Details

  • Constructor Details

    • TemporaryAWSCredentialsProvider

      public TemporaryAWSCredentialsProvider(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, 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(Configuration config) throws IOException
      The credentials here must include a session token, else this operation will raise an exception.
      Specified by:
      createCredentials in class org.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 failure
      org.apache.hadoop.fs.s3a.auth.NoAwsCredentialsException - the credentials are actually empty.