Class SystemSettingsCredentialsProvider
java.lang.Object
software.amazon.awssdk.auth.credentials.internal.SystemSettingsCredentialsProvider
- All Implemented Interfaces:
AwsCredentialsProvider
,IdentityProvider<AwsCredentialsIdentity>
- Direct Known Subclasses:
EnvironmentVariableCredentialsProvider
,SystemPropertyCredentialsProvider
public abstract class SystemSettingsCredentialsProvider
extends Object
implements AwsCredentialsProvider
Loads credentials providers from the
SdkSystemSetting.AWS_ACCESS_KEY_ID
,
SdkSystemSetting.AWS_SECRET_ACCESS_KEY
, and SdkSystemSetting.AWS_SESSION_TOKEN
system settings.
This does not load the credentials directly. Instead, the actual mapping of setting to credentials is done by child classes.
This allows us to separately load the credentials from system properties and environment variables so that customers can
remove one or the other from their credential chain, or build a different chain with these pieces of functionality separated.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturnsAwsCredentials
that can be used to authorize an AWS request.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, 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
-
Constructor Details
-
SystemSettingsCredentialsProvider
public SystemSettingsCredentialsProvider()
-
-
Method Details
-
resolveCredentials
Description copied from interface:AwsCredentialsProvider
ReturnsAwsCredentials
that can be used to authorize an AWS request. Each implementation of AWSCredentialsProvider can choose its own strategy for loading credentials. For example, an implementation might load credentials from an existing key management system, or load new credentials when credentials are rotated.If an error occurs during the loading of credentials or credentials could not be found, a runtime exception will be raised.
- Specified by:
resolveCredentials
in interfaceAwsCredentialsProvider
- Returns:
- AwsCredentials which the caller can use to authorize an AWS request.
-