public class VaultUserAuthenticator extends Object implements UserAuthenticator
UserAuthenticator
based on HashiCorp Vault. Configure the Vault client using the Drill BOOT
options that appear below.Modifier and Type | Class and Description |
---|---|
static class |
VaultUserAuthenticator.VaultAuthMethod |
Modifier and Type | Field and Description |
---|---|
static String |
VAULT_ADDRESS |
static String |
VAULT_AUTH_METHOD |
Constructor and Description |
---|
VaultUserAuthenticator() |
Modifier and Type | Method and Description |
---|---|
void |
authenticate(String user,
String password)
Attempts to authenticate a Drill user with the provided password and the
configured Vault auth method.
|
void |
close()
Close the authenticator.
|
boolean |
equals(Object o) |
int |
hashCode() |
void |
setup(DrillConfig config)
Reads Drill BOOT options and uses them to set up a Vault client.
|
public static final String VAULT_ADDRESS
public static final String VAULT_AUTH_METHOD
public void setup(DrillConfig config) throws DrillbitStartupException
setup
in interface UserAuthenticator
config
- object providing Drill config settings for VaultDrillbitStartupException
- if the provided Vault configuration is invalidpublic void authenticate(String user, String password) throws UserAuthenticationException
authenticate
in interface UserAuthenticator
user
- usernamepassword
- passwordUserAuthenticationException
- if the authentication attempt failspublic void close() throws IOException
UserAuthenticator
close
in interface Closeable
close
in interface AutoCloseable
close
in interface UserAuthenticator
IOException
Copyright © 1970 The Apache Software Foundation. All rights reserved.