public class KerberosHelper extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
KerberosHelper.KerberosCallbackHandler |
static class |
KerberosHelper.SecurityContext
Contains server Kerberos context information in server mode.
|
| Modifier and Type | Field and Description |
|---|---|
protected static KerberosHelper.KerberosCallbackHandler |
KERBEROS_CALLBACK_HANDLER |
protected static Object |
LOCK |
protected static org.apache.log4j.Logger |
LOGGER |
| Modifier and Type | Method and Description |
|---|---|
static KerberosHelper.SecurityContext |
acceptSecurityContext(LoginContext serverLoginContext,
byte[] token)
Check client provided Kerberos token in server login context
|
static byte[] |
initSecurityContext(String protocol,
String host,
byte[] token)
Get response Kerberos token for host with provided token.
|
static byte[] |
initSecurityContext(String protocol,
String host,
GSSCredential delegatedCredentials,
byte[] token)
Get response Kerberos token for host with provided token, use client provided delegation credentials.
|
protected static Object |
internalInitSecContext(String protocol,
String host,
GSSCredential delegatedCredentials,
byte[] token) |
static LoginContext |
serverLogin(String serverPrincipal,
String serverPassword)
Create server side Kerberos login context for provided credentials.
|
static void |
setClientPassword(String password)
Force client password in callback handler
|
static void |
setClientPrincipal(String principal)
Force client principal in callback handler
|
protected static final org.apache.log4j.Logger LOGGER
protected static final Object LOCK
protected static final KerberosHelper.KerberosCallbackHandler KERBEROS_CALLBACK_HANDLER
public static void setClientPrincipal(String principal)
principal - client principalpublic static void setClientPassword(String password)
password - client passwordpublic static byte[] initSecurityContext(String protocol, String host, byte[] token) throws GSSException, LoginException
protocol - target protocolhost - target hosttoken - input tokenGSSException - on errorLoginException - on errorpublic static byte[] initSecurityContext(String protocol, String host, GSSCredential delegatedCredentials, byte[] token) throws GSSException, LoginException
protocol - target protocolhost - target hostdelegatedCredentials - client delegated credentialstoken - input tokenGSSException - on errorLoginException - on errorprotected static Object internalInitSecContext(String protocol, String host, GSSCredential delegatedCredentials, byte[] token)
public static LoginContext serverLogin(String serverPrincipal, String serverPassword) throws LoginException
serverPrincipal - server principalserverPassword - server passswordLoginException - on errorpublic static KerberosHelper.SecurityContext acceptSecurityContext(LoginContext serverLoginContext, byte[] token) throws GSSException
serverLoginContext - server login contexttoken - Kerberos client tokenGSSException - on errorCopyright © 2001–2025 MickaĆ«l Guessant. All rights reserved.