public RpcHandler doBootstrap(Channel channel, RpcHandler rpcHandler) { if (!conf.encryptionEnabled()) { TransportServerBootstrap sasl = new SaslServerBootstrap(conf, secretKeyHolder); return sasl.doBootstrap(channel, rpcHandler); } return new AuthRpcHandler(conf, channel, rpcHandler, secretKeyHolder); }
public RpcHandler doBootstrap(Channel channel, RpcHandler rpcHandler) { if (!conf.encryptionEnabled()) { TransportServerBootstrap sasl = new SaslServerBootstrap(conf, secretKeyHolder); return sasl.doBootstrap(channel, rpcHandler); } return new AuthRpcHandler(conf, channel, rpcHandler, secretKeyHolder); }
public RpcHandler doBootstrap(Channel channel, RpcHandler rpcHandler) { if (!conf.encryptionEnabled()) { TransportServerBootstrap sasl = new SaslServerBootstrap(conf, secretKeyHolder); return sasl.doBootstrap(channel, rpcHandler); } return new AuthRpcHandler(conf, channel, rpcHandler, secretKeyHolder); }
@Override public void doBootstrap(TransportClient client, Channel channel) { if (!conf.encryptionEnabled()) { LOG.debug("AES encryption disabled, using old auth protocol."); doSaslAuth(client, channel); return; } try { doSparkAuth(client, channel); } catch (GeneralSecurityException | IOException e) { throw Throwables.propagate(e); } catch (RuntimeException e) { // There isn't a good exception that can be caught here to know whether it's really // OK to switch back to SASL (because the server doesn't speak the new protocol). So // try it anyway, and in the worst case things will fail again. if (conf.saslFallback()) { LOG.warn("New auth protocol failed, trying SASL.", e); doSaslAuth(client, channel); } else { throw e; } } }
@Override public void doBootstrap(TransportClient client, Channel channel) { if (!conf.encryptionEnabled()) { LOG.debug("AES encryption disabled, using old auth protocol."); doSaslAuth(client, channel); return; } try { doSparkAuth(client, channel); } catch (GeneralSecurityException | IOException e) { throw Throwables.propagate(e); } catch (RuntimeException e) { // There isn't a good exception that can be caught here to know whether it's really // OK to switch back to SASL (because the server doesn't speak the new protocol). So // try it anyway, and in the worst case things will fail again. if (conf.saslFallback()) { LOG.warn("New auth protocol failed, trying SASL.", e); doSaslAuth(client, channel); } else { throw e; } } }
@Override public void doBootstrap(TransportClient client, Channel channel) { if (!conf.encryptionEnabled()) { LOG.debug("AES encryption disabled, using old auth protocol."); doSaslAuth(client, channel); return; } try { doSparkAuth(client, channel); } catch (GeneralSecurityException | IOException e) { throw Throwables.propagate(e); } catch (RuntimeException e) { // There isn't a good exception that can be caught here to know whether it's really // OK to switch back to SASL (because the server doesn't speak the new protocol). So // try it anyway, and in the worst case things will fail again. if (conf.saslFallback()) { LOG.warn("New auth protocol failed, trying SASL.", e); doSaslAuth(client, channel); } else { throw e; } } }