public class KdcConnection
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private KerberosChannel |
channel
underlying network channel handler
|
private CipherTextHandler |
cipherTextHandler
the cipher text handler
|
private KdcConfig |
config |
private static org.slf4j.Logger |
LOG |
private java.security.SecureRandom |
nonceGenerator
a secure random number generator used for creating nonces
|
(package private) static java.lang.String |
TIME_OUT_ERROR |
| Constructor and Description |
|---|
KdcConnection(KdcConfig config)
Creates a new instance of KdcConnection.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) TgTicket |
_getTgt(TgtRequest clientTgtReq) |
ChangePasswordResult |
changePassword(java.lang.String clientPrincipal,
java.lang.String oldPassword,
java.lang.String newPassword) |
private void |
connect() |
private KerberosTime |
getDefaultTill() |
private byte[] |
getEncoded(org.apache.directory.api.asn1.Asn1Object obj) |
private ServiceTicket |
getServiceTicket(ServiceTicketRequest srvTktReq) |
ServiceTicket |
getServiceTicket(java.lang.String clientPrincipal,
java.lang.String password,
java.lang.String serverPrincipal)
Authenticates to the Kerberos server and gets a service ticket for the given server principal
|
TgTicket |
getTgt(java.lang.String principal,
java.lang.String password)
Authenticates to the Kerberos server and gets the initial Ticket Granting Ticket
|
TgTicket |
getTgt(TgtRequest clientTgtReq) |
private AbstractPasswordMessage |
sendAndReceiveChngPwdMsg(AbstractPasswordMessage req,
KerberosChannel chngPwdChannel) |
private KerberosMessage |
sendAndReceiveKrbMsg(KerberosMessage req) |
private static final org.slf4j.Logger LOG
private java.security.SecureRandom nonceGenerator
static final java.lang.String TIME_OUT_ERROR
private CipherTextHandler cipherTextHandler
private KerberosChannel channel
private KdcConfig config
public KdcConnection(KdcConfig config)
config - the configuration of KDCprivate void connect()
throws java.io.IOException
java.io.IOExceptionpublic TgTicket getTgt(java.lang.String principal, java.lang.String password) throws java.lang.Exception
principal - the client's principalpassword - password of the clientjava.lang.Exceptionpublic ServiceTicket getServiceTicket(java.lang.String clientPrincipal, java.lang.String password, java.lang.String serverPrincipal) throws KerberosException
principal - the client's principalpassword - password of the clientserverPrincipal - the application server's principaljava.lang.ExceptionKerberosExceptionpublic TgTicket getTgt(TgtRequest clientTgtReq) throws KerberosException
KerberosExceptionTgTicket _getTgt(TgtRequest clientTgtReq) throws KerberosException
KerberosExceptionprivate ServiceTicket getServiceTicket(ServiceTicketRequest srvTktReq) throws KerberosException
KerberosExceptionpublic ChangePasswordResult changePassword(java.lang.String clientPrincipal, java.lang.String oldPassword, java.lang.String newPassword) throws ChangePasswordException
ChangePasswordExceptionprivate byte[] getEncoded(org.apache.directory.api.asn1.Asn1Object obj)
private KerberosTime getDefaultTill()
private KerberosMessage sendAndReceiveKrbMsg(KerberosMessage req) throws java.lang.Exception
java.lang.Exceptionprivate AbstractPasswordMessage sendAndReceiveChngPwdMsg(AbstractPasswordMessage req, KerberosChannel chngPwdChannel) throws java.lang.Exception
java.lang.Exception