CallbackHandler saslCallback = null; final AuthMethod method = AuthMethod.valueOf(authType.getMethod()); switch (method) { case TOKEN: { String mechanism = method.getMechanismName(); if (LOG.isDebugEnabled()) { LOG.debug("Creating SASL " + mechanism + "(" + method + ") "
private RpcSaslProto buildNegotiateResponse(List<AuthMethod> authMethods) throws IOException { RpcSaslProto.Builder negotiateBuilder = RpcSaslProto.newBuilder(); if (authMethods.contains(AuthMethod.SIMPLE) && authMethods.size() == 1) { // SIMPLE-only servers return success in response to negotiate negotiateBuilder.setState(SaslState.SUCCESS); } else { negotiateBuilder.setState(SaslState.NEGOTIATE); for (AuthMethod authMethod : authMethods) { SaslRpcServer saslRpcServer = new SaslRpcServer(authMethod); SaslAuth.Builder builder = negotiateBuilder.addAuthsBuilder() .setMethod(authMethod.toString()) .setMechanism(saslRpcServer.mechanism); if (saslRpcServer.protocol != null) { builder.setProtocol(saslRpcServer.protocol); } if (saslRpcServer.serverId != null) { builder.setServerId(saslRpcServer.serverId); } } } return negotiateBuilder.build(); }
authMethod = AuthMethod.valueOf(saslAuthType.getMethod());
authMethod = AuthMethod.valueOf(saslAuthType.getMethod());
authMethod = AuthMethod.valueOf(saslAuthType.getMethod());
authMethod = AuthMethod.valueOf(saslAuthType.getMethod());
SaslRpcServer.AuthMethod.TOKEN.toString());
SaslRpcServer.AuthMethod.TOKEN.toString());
SaslRpcServer.AuthMethod.TOKEN.toString());
if (AuthMethod.PLAIN.getMechanismName().equalsIgnoreCase(mechanismName)) { remoteUser.set(endUser); return wrapped.process(inProt, outProt); if(AuthMethod.TOKEN.getMechanismName().equalsIgnoreCase(mechanismName)) { try { TokenIdentifier tokenId = SaslRpcServer.getIdentifier(authId,
SaslRpcServer.AuthMethod.TOKEN.toString());
TSaslServerTransport.Factory saslTransportFactory = new TSaslServerTransport.Factory(); saslTransportFactory.addServerDefinition(AuthMethod.KERBEROS .getMechanismName(), principalParts[0], principalParts[1], ServerConfig.SASL_PROPERTIES, new GSSCallback(conf)); transportFactory = saslTransportFactory;
TSaslServerTransport.Factory saslTransportFactory = new TSaslServerTransport.Factory(); saslTransportFactory.addServerDefinition(AuthMethod.KERBEROS .getMechanismName(), principalParts[0], principalParts[1], ServerConfig.SASL_PROPERTIES, new GSSCallback(conf)); transportFactory = saslTransportFactory;
break; authMethod = AuthMethod.valueOf(clientSaslAuth.getMethod());
break; authMethod = AuthMethod.valueOf(clientSaslAuth.getMethod());
CallbackHandler saslCallback = null; final AuthMethod method = AuthMethod.valueOf(authType.getMethod()); switch (method) { case TOKEN: { String mechanism = method.getMechanismName(); if (LOG.isDebugEnabled()) { LOG.debug("Creating SASL " + mechanism + "(" + method + ") "
break; authMethod = AuthMethod.valueOf(clientSaslAuth.getMethod());
break; authMethod = AuthMethod.valueOf(clientSaslAuth.getMethod());