public KeeperException.Code handleAuthentication(ServerCnxn cnxn, byte[] authData) { String id = cnxn.getRemoteSocketAddress().getAddress().getHostAddress(); cnxn.addAuthInfo(new Id(getScheme(), id)); return KeeperException.Code.OK; }
public KeeperException.Code handleAuthentication(ServerCnxn cnxn, byte[] authData) { String id = new String(authData); try { String digest = generateDigest(id); if (digest.equals(superDigest)) { cnxn.addAuthInfo(new Id("super", "")); } cnxn.addAuthInfo(new Id(getScheme(), digest)); return KeeperException.Code.OK; } catch (NoSuchAlgorithmException e) { LOG.error("Missing algorithm",e); } return KeeperException.Code.AUTHFAILED; }
public KeeperException.Code handleAuthentication(ServerCnxn cnxn, byte[] authData) { String id = new String(authData); try { String digest = generateDigest(id); if (digest.equals(superDigest)) { cnxn.addAuthInfo(new Id("super", "")); } cnxn.addAuthInfo(new Id(getScheme(), digest)); return KeeperException.Code.OK; } catch (NoSuchAlgorithmException e) { LOG.error("Missing algorithm",e); } return KeeperException.Code.AUTHFAILED; }
public KeeperException.Code handleAuthentication(ServerCnxn cnxn, byte[] authData) { String id = cnxn.getRemoteSocketAddress().getAddress().getHostAddress(); cnxn.addAuthInfo(new Id(getScheme(), id)); return KeeperException.Code.OK; }
cnxn.addAuthInfo(new Id("super", clientId)); LOG.info("Authenticated Id '{}' as super user", clientId); cnxn.addAuthInfo(authInfo);
String authorizationID = saslServer.getAuthorizationID(); LOG.info("adding SASL authorization for authorizationID: " + authorizationID); cnxn.addAuthInfo(new Id("sasl",authorizationID)); if (System.getProperty("zookeeper.superUser") != null && authorizationID.equals(System.getProperty("zookeeper.superUser"))) { cnxn.addAuthInfo(new Id("super", ""));
serverObjs.getCnxn().addAuthInfo(new Id(getScheme(), keyStr)); return KeeperException.Code.OK;
String authorizationID = saslServer.getAuthorizationID(); LOG.info("adding SASL authorization for authorizationID: " + authorizationID); cnxn.addAuthInfo(new Id("sasl",authorizationID));
cnxn.addAuthInfo( new Id(getScheme(), roles.toString())); return KeeperException.Code.OK;