Class CdpEnvironmentVariableCredentialsProvider
- java.lang.Object
-
- com.cloudera.cdp.authentication.credentials.CdpEnvironmentVariableCredentialsProvider
-
- All Implemented Interfaces:
CdpCredentialsProvider
public class CdpEnvironmentVariableCredentialsProvider extends Object implements CdpCredentialsProvider
CdpCredentialsProvider implementation that provides credentials by looking at the CDP_ACCESS_KEY_ID, CDP_PRIVATE_KEY and CDP_ACCESS_TOKEN environment variables.
-
-
Field Summary
Fields Modifier and Type Field Description static String
CDP_ACCESS_KEY_ID
Name of environment variable holding the users CDP access key ID.static String
CDP_ACCESS_TOKEN
Name of environment variable holding the users CDP access token.static String
CDP_PRIVATE_KEY
Name of environment variable holding the users CDP private key.
-
Constructor Summary
Constructors Constructor Description CdpEnvironmentVariableCredentialsProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CdpCredentials
getCredentials()
Returns CdpCredentials which the caller can use to authenticate a CDP request.String
toString()
-
-
-
Field Detail
-
CDP_ACCESS_KEY_ID
public static final String CDP_ACCESS_KEY_ID
Name of environment variable holding the users CDP access key ID.- See Also:
- Constant Field Values
-
CDP_PRIVATE_KEY
public static final String CDP_PRIVATE_KEY
Name of environment variable holding the users CDP private key.- See Also:
- Constant Field Values
-
CDP_ACCESS_TOKEN
public static final String CDP_ACCESS_TOKEN
Name of environment variable holding the users CDP access token.- See Also:
- Constant Field Values
-
-
Method Detail
-
getCredentials
public CdpCredentials 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.
-
-