Class HadoopDynamicTemporaryAWSCredentialsProvider

  • All Implemented Interfaces:
    software.amazon.awssdk.auth.credentials.AwsCredentialsProvider, software.amazon.awssdk.identity.spi.IdentityProvider<software.amazon.awssdk.identity.spi.AwsCredentialsIdentity>

    @Internal
    public class HadoopDynamicTemporaryAWSCredentialsProvider
    extends Object
    implements software.amazon.awssdk.auth.credentials.AwsCredentialsProvider
    Support dynamic session credentials for authenticating with AWS using SDK v2. 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 during construction, because that would break the chain of credential providers it is registered in. It is, however, expected to fail fast from resolveCredentials() by throwing NoAwsCredentialsException when no delegation token credentials are available yet; the surrounding AwsCredentialsProviderChain treats that as a signal to move on to the next provider in the chain.

    • Field Detail

      • NAME

        public static final String NAME
        Spelled out as a string literal (a compile-time constant) so that referencing NAME never triggers loading this class outside the flink-s3-fs-hadoop plugin. Pinned to the actual class name by a test.
        See Also:
        Constant Field Values
    • Constructor Detail

      • HadoopDynamicTemporaryAWSCredentialsProvider

        public HadoopDynamicTemporaryAWSCredentialsProvider()
      • HadoopDynamicTemporaryAWSCredentialsProvider

        public HadoopDynamicTemporaryAWSCredentialsProvider​(URI uri,
                                                            org.apache.hadoop.conf.Configuration conf)
    • Method Detail

      • resolveCredentials

        public software.amazon.awssdk.auth.credentials.AwsCredentials resolveCredentials()
                                                                                  throws software.amazon.awssdk.core.exception.SdkException
        Specified by:
        resolveCredentials in interface software.amazon.awssdk.auth.credentials.AwsCredentialsProvider
        Throws:
        software.amazon.awssdk.core.exception.SdkException