public class SPNEGOServerSocket extends ServerSocket
ServerSocket that tries to establish a GSSContext
when a Socket connects to it.| Constructor and Description |
|---|
SPNEGOServerSocket() |
SPNEGOServerSocket(int port) |
SPNEGOServerSocket(int port,
int backlog) |
SPNEGOServerSocket(int port,
int backlog,
InetAddress bindAddr) |
| Modifier and Type | Method and Description |
|---|---|
Socket |
accept()
Tries to establish a
GSSContext with the client using the tokens
provided. |
protected void |
acceptSocket(Socket socket,
NegotiationContext negotiationContext)
Accepts a
Socket connection by trying to do a JAAS Kerberos login using the tokens exchanged
with the client. |
void |
close() |
protected void |
flushPrincipalFromCache(Principal principal,
String securityDomain)
Removes the user entry from the authentication cache.
|
protected Principal |
getClientPrincipal(byte[] ticket,
Subject subject)
Decodes and parses the ticket to retrieve the client
Principal. |
String |
getHostSecurityDomain()
Returns the Kerberos security domain.
|
String |
getSecurityDomain()
Returns the security domain securing the EJBs.
|
protected boolean |
isValid(Principal principal,
Object credential,
String securityDomain)
Performs a JAAS login.
|
protected Subject |
login()
Performs a JAAS login on the client side.
|
protected void |
logout()
Performs a JAAS logout on the client side.
|
void |
setHostSecurityDomain(String hostSecurityDomain)
Sets the Kerberos security domain.
|
void |
setSecurityDomain(String securityDomain)
Sets the security domain securing the EJBs.
|
bind, bind, getChannel, getInetAddress, getLocalPort, getLocalSocketAddress, getReceiveBufferSize, getReuseAddress, getSoTimeout, implAccept, isBound, isClosed, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSocketFactory, setSoTimeout, toStringpublic SPNEGOServerSocket()
throws IOException
IOExceptionServerSocket.ServerSocket()public SPNEGOServerSocket(int port)
throws IOException
IOExceptionServerSocket.ServerSocket(int)public SPNEGOServerSocket(int port,
int backlog)
throws IOException
IOExceptionServerSocket.ServerSocket(int, int)public SPNEGOServerSocket(int port,
int backlog,
InetAddress bindAddr)
throws IOException
IOExceptionServerSocket.ServerSocket(int, int, InetAddress)public Socket accept() throws IOException
GSSContext with the client using the tokens
provided.accept in class ServerSocketIOExceptionServerSocket.accept()public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class ServerSocketIOExceptionServerSocket.close()protected void acceptSocket(Socket socket, NegotiationContext negotiationContext) throws Exception
Socket connection by trying to do a JAAS Kerberos login using the tokens exchanged
with the client.socket - Client SocketnegotiationContext - NegotiationContext to be used for the JAAS loginIOExceptionNegotiationExceptionNamingExceptionExceptionprotected boolean isValid(Principal principal, Object credential, String securityDomain) throws Exception
protected void flushPrincipalFromCache(Principal principal, String securityDomain) throws Exception
public String getSecurityDomain()
public void setSecurityDomain(String securityDomain)
securityDomain - name of the security domainpublic String getHostSecurityDomain()
public void setHostSecurityDomain(String hostSecurityDomain)
hostSecurityDomain - name of the security domainprotected Subject login() throws LoginException
SubjectLoginException - if the login failsprotected void logout()
throws LoginException
LoginException - if the logout failsCopyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.