Class VaultCredentialsProvider
java.lang.Object
org.apache.drill.exec.store.security.vault.VaultCredentialsProvider
- All Implemented Interfaces:
CredentialsProvider
Implementation of
CredentialsProvider
that obtains credential values from
Vault
.-
Field Summary
-
Constructor Summary
ConstructorDescriptionVaultCredentialsProvider
(String secretPath, Map<String, String> propertyNames, DrillConfig config) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns map with authentication credentials.getUserCredentials
(String queryUser) This method returns the credentials associated with a specific user.int
hashCode()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.drill.common.logical.security.CredentialsProvider
setUserCredentials
-
Field Details
-
VAULT_ADDRESS
- See Also:
-
VAULT_APP_ROLE_ID
- See Also:
-
VAULT_SECRET_ID
- See Also:
-
QUERY_USER_VAR
- See Also:
-
-
Constructor Details
-
VaultCredentialsProvider
public VaultCredentialsProvider(String secretPath, Map<String, String> propertyNames, DrillConfig config) throws com.bettercloud.vault.VaultException- Parameters:
secretPath
- The Vault key value from which to readpropertyNames
- map with credential names as keys and vault keys as values.config
- drill config- Throws:
com.bettercloud.vault.VaultException
- if exception happens when connecting to Vault.
-
-
Method Details
-
getCredentials
Description copied from interface:CredentialsProvider
Returns map with authentication credentials. Key is the credential name, for example"username"
and map value is corresponding credential value.- Specified by:
getCredentials
in interfaceCredentialsProvider
-
getUserCredentials
Description copied from interface:CredentialsProvider
This method returns the credentials associated with a specific user.- Specified by:
getUserCredentials
in interfaceCredentialsProvider
- Parameters:
queryUser
- The logged in username- Returns:
- A Map of the logged in user's credentials.
-
getSecretPath
-
getPropertyNames
-
equals
-
hashCode
public int hashCode()
-