/*
* Don't use the auth system during recovery. Not safe to use
* the node to initiate multi-partition txns during recovery
*/
if (!VoltDB.instance().rejoining()) {
AuthenticationRequest arq;
if (ap == AuthProvider.KERBEROS) {
arq = context.authSystem.new KerberosAuthenticationRequest(socket);
} else {
arq = context.authSystem.new HashAuthenticationRequest(username, password);
}
/*
* Authenticate the user.
*/
boolean authenticated = arq.authenticate();
if (!authenticated) {
Exception faex = arq.getAuthenticationFailureException();
boolean isItIo = false;
for (Throwable cause = faex; faex != null && !isItIo; cause = cause.getCause()) {
isItIo = cause instanceof IOException;
}