Package org.apache.hadoop.fs.s3a.auth
Class CredentialProviderListFactory
java.lang.Object
org.apache.hadoop.fs.s3a.auth.CredentialProviderListFactory
This class provides methods to create a
AWSCredentialProviderList
list of AWS credential providers.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringV1 credential provider: "com.amazonaws.auth.AnonymousAWSCredentials".static final StringError message when the AWS provider list built up contains a forbidden entry.static final StringV1 credential provider: "com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper".static final StringV1 credential provider: "com.amazonaws.auth.InstanceProfileCredentialsProvider".static final StringV2 EC2 instance/container credential provider.static final StringV1 env var credential provider: "com.amazonaws.auth.EnvironmentVariableCredentialsProvider".static final StringV2 environment variables credential provider.static final StringV1 profile credential provider: "com.amazonaws.auth.profile.ProfileCredentialsProvider".static final StringV2 environment variables credential provider.The standard AWS provider list for AWS connections. -
Method Summary
Modifier and TypeMethodDescriptionstatic AWSCredentialProviderListbuildAWSProviderList(URI binding, org.apache.hadoop.conf.Configuration conf, String key, List<Class<?>> defaultValues, Set<Class<?>> forbidden) Load list of AWS credential provider/credential provider factory classes; support a forbidden list to prevent loops, mandate full secrets, etc.static AWSCredentialProviderListcreateAWSCredentialProviderList(URI binding, org.apache.hadoop.conf.Configuration conf) Create the AWS credentials from the providers, the URI and the keyConstants.AWS_CREDENTIALS_PROVIDERin the configuration.
-
Field Details
-
E_FORBIDDEN_AWS_PROVIDER
Error message when the AWS provider list built up contains a forbidden entry.- See Also:
-
STANDARD_AWS_PROVIDERS
The standard AWS provider list for AWS connections. -
ANONYMOUS_CREDENTIALS_V1
V1 credential provider: "com.amazonaws.auth.AnonymousAWSCredentials".- See Also:
-
EC2_CONTAINER_CREDENTIALS_V1
V1 credential provider: "com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper".- See Also:
-
EC2_IAM_CREDENTIALS_V1
V1 credential provider: "com.amazonaws.auth.InstanceProfileCredentialsProvider".- See Also:
-
EC2_IAM_CREDENTIALS_V2
V2 EC2 instance/container credential provider. -
ENVIRONMENT_CREDENTIALS_V1
V1 env var credential provider: "com.amazonaws.auth.EnvironmentVariableCredentialsProvider".- See Also:
-
ENVIRONMENT_CREDENTIALS_V2
V2 environment variables credential provider. -
PROFILE_CREDENTIALS_V1
V1 profile credential provider: "com.amazonaws.auth.profile.ProfileCredentialsProvider".- See Also:
-
PROFILE_CREDENTIALS_V2
V2 environment variables credential provider.
-
-
Method Details
-
createAWSCredentialProviderList
public static AWSCredentialProviderList createAWSCredentialProviderList(@Nullable URI binding, org.apache.hadoop.conf.Configuration conf) throws IOException Create the AWS credentials from the providers, the URI and the keyConstants.AWS_CREDENTIALS_PROVIDERin the configuration.- Parameters:
binding- Binding URI -may be nullconf- filesystem configuration- Returns:
- a credentials provider list
- Throws:
IOException- Problems loading the providers (including reading secrets from credential files).
-
buildAWSProviderList
public static AWSCredentialProviderList buildAWSProviderList(@Nullable URI binding, org.apache.hadoop.conf.Configuration conf, String key, List<Class<?>> defaultValues, Set<Class<?>> forbidden) throws IOException Load list of AWS credential provider/credential provider factory classes; support a forbidden list to prevent loops, mandate full secrets, etc.- Parameters:
binding- Binding URI -may be nullconf- configurationkey- configuration key to useforbidden- a possibly empty set of forbidden classes.defaultValues- list of default providers.- Returns:
- the list of classes, possibly empty
- Throws:
IOException- on a failure to load the list.
-