public abstract class KdcRequest extends Object
| Constructor and Description |
|---|
KdcRequest(KdcReq kdcReq,
KdcContext kdcContext)
kdc request constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
authenticate()
Do some authenticate.
|
protected abstract void |
checkClient()
Check client.
|
protected void |
checkEncryptionType()
Check encryption type.
|
protected void |
checkPolicy()
Check policy.
|
protected void |
checkVersion()
Check Version.
|
EncryptionKey |
getArmorKey()
Get armor key.
|
InetAddress |
getClientAddress()
Get client address.
|
KrbIdentity |
getClientEntry()
Get client entry.
|
EncryptionKey |
getClientKey()
Get client key.
|
EncryptionKey |
getClientKey(EncryptionType encType)
Get client key with entryption type.
|
EncryptionType |
getEncryptionType()
Get encryption type.
|
protected KrbIdentity |
getEntry(String principal)
Get identity entry with principal name.
|
protected byte[] |
getInnerBodyout()
Get innerbodyout.
|
KdcContext |
getKdcContext()
Get kdc context.
|
KdcOptions |
getKdcOptions() |
KdcReq |
getKdcReq()
Get KdcReq.
|
PreauthContext |
getPreauthContext()
Get preauth context.
|
protected PreauthHandler |
getPreauthHandler()
Get preauth handler.
|
KrbMessage |
getReply()
Get the reply message.
|
ByteBuffer |
getReqPackage() |
protected ByteBuffer |
getRequestBody()
Get request body.
|
KrbIdentity |
getServerEntry()
Get server entry.
|
EncryptionKey |
getServerKey()
Get server key.
|
PrincipalName |
getServerPrincipal()
Get server principal.
|
EncryptionKey |
getSessionKey()
Get session key.
|
KrbIdentity |
getTgsEntry()
Get tgs entry.
|
PrincipalName |
getTgsPrincipal()
Get tgs principal name.
|
Ticket |
getTicket()
Get ticket.
|
protected AuthToken |
getToken()
Get auth token.
|
boolean |
isAnonymous() |
protected boolean |
isPkinit() |
boolean |
isPreAuthenticated()
Get whether pre-authenticated.
|
protected boolean |
isPreauthRequired()
Get whether preauth required.
|
protected abstract void |
issueTicket()
Issue ticket.
|
boolean |
isTcp()
Get whether is tcp.
|
void |
isTcp(boolean isTcp)
Set use tcp.
|
protected boolean |
isToken()
Get whether kdc request with token.
|
protected KrbError |
makePreAuthenticationError(KdcContext kdcContext,
KdcReq request,
KrbErrorCode errorCode,
boolean pkinit)
Make preauthentication error.
|
protected abstract void |
makeReply()
Make reply.
|
protected void |
preauth()
Do the preatuh.
|
void |
process()
Process the kdcrequest from client and issue the ticket.
|
protected void |
setArmorKey(EncryptionKey armorKey)
Set armor key.
|
void |
setClientAddress(InetAddress clientAddress)
Set client address.
|
void |
setClientEntry(KrbIdentity clientEntry)
Set client entry.
|
void |
setClientKey(EncryptionKey clientKey)
Set client key.
|
void |
setEncryptionType(EncryptionType encryptionType)
Set encryption type.
|
void |
setPreAuthenticated(boolean isPreAuthenticated)
Set whether pre-authenticated.
|
protected void |
setPreauthRequired(boolean preauthRequired)
Set whether preauth required.
|
void |
setReply(KdcRep reply)
Set kdc reply.
|
void |
setReqPackage(ByteBuffer reqPackage) |
void |
setServerEntry(KrbIdentity serverEntry)
Set server entry.
|
void |
setServerKey(EncryptionKey serverKey)
Set server key.
|
void |
setServerPrincipal(PrincipalName serverPrincipal)
Set server principal.
|
void |
setSessionKey(EncryptionKey sessionKey)
Set session key.
|
void |
setTgsEntry(KrbIdentity tgsEntry)
Set tgs entry .
|
void |
setTicket(Ticket ticket)
Set ticket.
|
void |
setToken(AuthToken authToken)
Set auth token.
|
public KdcRequest(KdcReq kdcReq, KdcContext kdcContext)
kdcReq - kdc requestkdcContext - kdc contextpublic EncryptionKey getSessionKey()
public void setSessionKey(EncryptionKey sessionKey)
sessionKey - The session keypublic KdcContext getKdcContext()
public KdcReq getKdcReq()
public PreauthContext getPreauthContext()
public void process()
throws KrbException
KrbException - e.public KrbIdentity getTgsEntry()
public void setTgsEntry(KrbIdentity tgsEntry)
tgsEntry - TGS entrypublic boolean isTcp()
public void isTcp(boolean isTcp)
isTcp - set kdc request though TCP protocol or notpublic KrbMessage getReply()
public void setReply(KdcRep reply)
reply - replypublic InetAddress getClientAddress()
public void setClientAddress(InetAddress clientAddress)
clientAddress - client addresspublic EncryptionType getEncryptionType()
public void setEncryptionType(EncryptionType encryptionType)
encryptionType - encryption typepublic Ticket getTicket()
public void setTicket(Ticket ticket)
ticket - ticketpublic boolean isPreAuthenticated()
public void setPreAuthenticated(boolean isPreAuthenticated)
isPreAuthenticated - whether is preauthenticatedpublic KrbIdentity getServerEntry()
public void setServerEntry(KrbIdentity serverEntry)
serverEntry - server entrypublic KrbIdentity getClientEntry()
public void setClientEntry(KrbIdentity clientEntry)
clientEntry - client entrypublic EncryptionKey getClientKey(EncryptionType encType) throws KrbException
encType - encryption typeKrbException - epublic EncryptionKey getClientKey()
public void setClientKey(EncryptionKey clientKey)
clientKey - client keypublic EncryptionKey getServerKey()
public void setServerKey(EncryptionKey serverKey)
serverKey - server keypublic PrincipalName getTgsPrincipal()
protected abstract void makeReply()
throws KrbException
KrbException - eprotected void checkVersion()
throws KrbException
KrbException - eprotected void checkPolicy()
throws KrbException
KrbException - eprotected abstract void checkClient()
throws KrbException
KrbException - eprotected void preauth()
throws KrbException
KrbException - eprotected void setPreauthRequired(boolean preauthRequired)
preauthRequired - whether preauthentication requiredprotected boolean isPreauthRequired()
protected PreauthHandler getPreauthHandler()
protected void checkEncryptionType()
throws KrbException
KrbException - eprotected void authenticate()
throws KrbException
KrbException - eprotected abstract void issueTicket()
throws KrbException
KrbException - eprotected KrbError makePreAuthenticationError(KdcContext kdcContext, KdcReq request, KrbErrorCode errorCode, boolean pkinit) throws KrbException
kdcContext - kdc contextrequest - kdc requesterrorCode - krb error codeKrbException - eprotected KrbIdentity getEntry(String principal) throws KrbException
principal - PrincipalKrbException - eprotected ByteBuffer getRequestBody() throws KrbException
KrbException - epublic EncryptionKey getArmorKey() throws KrbException
KrbException - eprotected void setArmorKey(EncryptionKey armorKey)
armorKey - armor keypublic PrincipalName getServerPrincipal()
public void setServerPrincipal(PrincipalName serverPrincipal)
serverPrincipal - server principalprotected byte[] getInnerBodyout()
protected boolean isToken()
public void setToken(AuthToken authToken)
authToken - The auth tokenprotected AuthToken getToken()
protected boolean isPkinit()
public boolean isAnonymous()
public KdcOptions getKdcOptions()
public void setReqPackage(ByteBuffer reqPackage)
public ByteBuffer getReqPackage()
Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.