Class CdpCredentialsProviderChain
java.lang.Object
com.cloudera.cdp.authentication.credentials.CdpCredentialsProviderChain
- All Implemented Interfaces:
CdpCredentialsProvider
- Direct Known Subclasses:
DefaultCdpCredentialProviderChain
CdpCredentialsProvider that chains together multiple credentials
providers. When a caller first requests credentials from this provider,
it calls all the providers in the chain, in the original order specified,
until one can provide credentials, and then returns those credentials. If all
of the credential providers in the chain have been called, and none of them
can provide credentials, then this class will throw an exception indicated
that no credentials are available.
-
Constructor Summary
ConstructorDescriptionCdpCredentialsProviderChain
(CdpCredentialsProvider... credentialProviders) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns CdpCredentials which the caller can use to authenticate a CDP request.
-
Constructor Details
-
CdpCredentialsProviderChain
Constructor.- Parameters:
credentialProviders
- the credential providers
-
-
Method Details
-
getCredentials
Description copied from interface:CdpCredentialsProvider
Returns CdpCredentials which the caller can use to authenticate a CDP request. Each implementation of CdpCredentialsProvider can chose 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.- Specified by:
getCredentials
in interfaceCdpCredentialsProvider
- Returns:
- CdpCredentials which the caller can use to authenticate an CDP request.
-