Package org.apache.zookeeper.client
Class ZooKeeperSaslClient
- java.lang.Object
- 
- org.apache.zookeeper.client.ZooKeeperSaslClient
 
- 
 public class ZooKeeperSaslClient extends Object This class manages SASL authentication for the client. It allows ClientCnxn to authenticate using SASL with a ZooKeeper server.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classZooKeeperSaslClient.SaslStatestatic classZooKeeperSaslClient.ServerSaslResponseCallback
 - 
Field SummaryFields Modifier and Type Field Description static StringENABLE_CLIENT_SASL_DEFAULTDeprecated.UseZKClientConfig.ENABLE_CLIENT_SASL_DEFAULTinstead.static StringENABLE_CLIENT_SASL_KEYDeprecated.UseZKClientConfig.ENABLE_CLIENT_SASL_KEYinstead.static StringLOGIN_CONTEXT_NAME_KEYDeprecated.UseZKClientConfig.LOGIN_CONTEXT_NAME_KEYinstead.
 - 
Constructor SummaryConstructors Constructor Description ZooKeeperSaslClient(String serverPrincipal, ZKClientConfig clientConfig, AtomicReference<Login> loginRef)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanclientTunneledAuthenticationInProgress()StringgetConfigStatus()Watcher.Event.KeeperStategetKeeperState()StringgetLoginContext()ZooKeeperSaslClient.SaslStategetSaslState()voidinitialize(ClientCnxn cnxn)booleanisComplete()static booleanisEnabled()Deprecated.UseZKClientConfig.isSaslClientEnabled()insteadbooleanisFailed()voidrespondToServer(byte[] serverToken, ClientCnxn cnxn)
 
- 
- 
- 
Field Detail- 
LOGIN_CONTEXT_NAME_KEY@Deprecated public static final String LOGIN_CONTEXT_NAME_KEY Deprecated.UseZKClientConfig.LOGIN_CONTEXT_NAME_KEYinstead.- See Also:
- Constant Field Values
 
 - 
ENABLE_CLIENT_SASL_KEY@Deprecated public static final String ENABLE_CLIENT_SASL_KEY Deprecated.UseZKClientConfig.ENABLE_CLIENT_SASL_KEYinstead.- See Also:
- Constant Field Values
 
 - 
ENABLE_CLIENT_SASL_DEFAULT@Deprecated public static final String ENABLE_CLIENT_SASL_DEFAULT Deprecated.UseZKClientConfig.ENABLE_CLIENT_SASL_DEFAULTinstead.- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
ZooKeeperSaslClientpublic ZooKeeperSaslClient(String serverPrincipal, ZKClientConfig clientConfig, AtomicReference<Login> loginRef) throws LoginException - Throws:
- LoginException
 
 
- 
 - 
Method Detail- 
isEnabled@Deprecated public static boolean isEnabled() Deprecated.UseZKClientConfig.isSaslClientEnabled()insteadReturns true if the SASL client is enabled. By default, the client is enabled but can be disabled by setting the system propertyzookeeper.sasl.clienttofalse. See ZOOKEEPER-1657 for more information.- Returns:
- true if the SASL client is enabled.
 
 - 
getSaslStatepublic ZooKeeperSaslClient.SaslState getSaslState() 
 - 
getLoginContextpublic String getLoginContext() 
 - 
getConfigStatuspublic String getConfigStatus() - Returns:
- informational message indicating the current configuration status.
 
 - 
isCompletepublic boolean isComplete() 
 - 
isFailedpublic boolean isFailed() 
 - 
respondToServerpublic void respondToServer(byte[] serverToken, ClientCnxn cnxn)
 - 
getKeeperStatepublic Watcher.Event.KeeperState getKeeperState() 
 - 
initializepublic void initialize(ClientCnxn cnxn) throws SaslException - Throws:
- SaslException
 
 - 
clientTunneledAuthenticationInProgresspublic boolean clientTunneledAuthenticationInProgress() 
 
- 
 
-