Class SaslAuthenticationContext
- java.lang.Object
-
- org.apache.kafka.common.security.auth.SaslAuthenticationContext
-
- All Implemented Interfaces:
AuthenticationContext
public class SaslAuthenticationContext extends Object implements AuthenticationContext
-
-
Constructor Summary
Constructors Constructor Description SaslAuthenticationContext(SaslServer server, SecurityProtocol securityProtocol, InetAddress clientAddress, String listenerName)
SaslAuthenticationContext(SaslServer server, SecurityProtocol securityProtocol, InetAddress clientAddress, String listenerName, Optional<SSLSession> sslSession)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InetAddress
clientAddress()
Address of the authenticated clientString
listenerName()
Name of the listener used for the connectionSecurityProtocol
securityProtocol()
Underlying security protocol of the authentication session.SaslServer
server()
Optional<SSLSession>
sslSession()
Returns SSL session for the connection if security protocol is SASL_SSL.
-
-
-
Constructor Detail
-
SaslAuthenticationContext
public SaslAuthenticationContext(SaslServer server, SecurityProtocol securityProtocol, InetAddress clientAddress, String listenerName)
-
SaslAuthenticationContext
public SaslAuthenticationContext(SaslServer server, SecurityProtocol securityProtocol, InetAddress clientAddress, String listenerName, Optional<SSLSession> sslSession)
-
-
Method Detail
-
server
public SaslServer server()
-
sslSession
public Optional<SSLSession> sslSession()
Returns SSL session for the connection if security protocol is SASL_SSL. If SSL mutual client authentication is enabled for the listener, peer principal can be determined usingSSLSession.getPeerPrincipal()
.
-
securityProtocol
public SecurityProtocol securityProtocol()
Description copied from interface:AuthenticationContext
Underlying security protocol of the authentication session.- Specified by:
securityProtocol
in interfaceAuthenticationContext
-
clientAddress
public InetAddress clientAddress()
Description copied from interface:AuthenticationContext
Address of the authenticated client- Specified by:
clientAddress
in interfaceAuthenticationContext
-
listenerName
public String listenerName()
Description copied from interface:AuthenticationContext
Name of the listener used for the connection- Specified by:
listenerName
in interfaceAuthenticationContext
-
-