public class KdcReqBody
extends java.lang.Object
implements org.apache.directory.api.asn1.Asn1Object
KDC-REQ-BODY ::= SEQUENCE {
kdc-options [0] KDCOptions,
cname [1] PrincipalName OPTIONAL
-- Used only in AS-REQ --,
realm [2] Realm
-- Server's realm
-- Also client's in AS-REQ --,
sname [3] PrincipalName OPTIONAL,
from [4] KerberosTime OPTIONAL,
till [5] KerberosTime,
rtime [6] KerberosTime OPTIONAL,
nonce [7] UInt32,
etype [8] SEQUENCE OF Int32 -- EncryptionType
-- in preference order --,
addresses [9] HostAddresses OPTIONAL,
enc-authorization-data [10] EncryptedData OPTIONAL
-- AuthorizationData --,
additional-tickets [11] SEQUENCE OF Ticket OPTIONAL
-- NOTE: not empty
}
| Modifier and Type | Field and Description |
|---|---|
private int |
additionalTicketLength |
private java.util.List<Ticket> |
additionalTickets
Additional tickets
|
private int |
additionalTicketSeqLength |
private int[] |
additionalTicketsLengths |
private HostAddresses |
addresses
Addresses valid for the requested ticket
|
private int |
addressesLength |
private PrincipalName |
cName
The Client Principal, if the request is an AS-REQ
|
private int |
cNameLength |
private EncryptedData |
encAuthorizationData
Encoded authorizationData, used by the TGS-REQ only
|
private int |
encAuthzDataLength |
private java.util.Set<EncryptionType> |
eType
Set of desired encryption types
|
private int |
eTypeLength |
private int[] |
eTypeLengths |
private int |
eTypeSeqLength |
private KerberosTime |
from
The start time for the requested ticket
|
private int |
fromLength |
private KdcOptions |
kdcOptions
The KDC options
|
private int |
kdcOptionsLength |
private int |
kdcReqBodyLength |
private int |
kdcReqBodySeqLength |
private int |
nonce
Random number to avoid MiM attacks
|
private int |
nonceLength |
private java.lang.String |
realm
The realm
|
private byte[] |
realmBytes |
private int |
realmLength |
private KerberosTime |
rtime
The renew-till date for the requested ticket
|
private int |
rtimeLength |
private PrincipalName |
sName
The Server Principal
|
private int |
sNameLength |
private KerberosTime |
till
The expiration date for the requested ticket
|
private int |
tillLength |
| Constructor and Description |
|---|
KdcReqBody()
Creates a new instance of RequestBody.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAdditionalTicket(Ticket additionalTicket)
Add a new Ticket to the list of additional tickets
|
void |
addEType(EncryptionType eType) |
int |
computeLength()
Compute the KdcReqBody length
|
java.nio.ByteBuffer |
encode(java.nio.ByteBuffer buffer)
Encode the KDC-REQ-BODY component
|
Ticket[] |
getAdditionalTickets()
Returns the additional
Tickets. |
HostAddresses |
getAddresses()
Returns the
HostAddresses. |
PrincipalName |
getCName() |
EncryptedData |
getEncAuthorizationData()
Returns the encrypted
AuthorizationData as EncryptedData. |
java.util.Set<EncryptionType> |
getEType()
Returns the requested
EncryptionTypes. |
KerberosTime |
getFrom()
Returns the from
KerberosTime. |
KdcOptions |
getKdcOptions()
Returns the
KdcOptions. |
int |
getNonce()
Returns the nonce.
|
java.lang.String |
getRealm() |
KerberosTime |
getRTime()
Returns the RenewTime
KerberosTime. |
PrincipalName |
getSName()
Returns the server
PrincipalName. |
KerberosTime |
getTill()
Returns the till
KerberosTime. |
private void |
reset()
reset the fields used while computing length
|
void |
setAdditionalTickets(java.util.List<Ticket> additionalTickets)
Set the list of additional Ticket
|
void |
setAddresses(HostAddresses addresses) |
void |
setCName(PrincipalName cName) |
void |
setEncAuthorizationData(EncryptedData encAuthorizationData) |
void |
setEType(java.util.Set<EncryptionType> eType) |
void |
setFrom(KerberosTime from) |
void |
setKdcOptions(KdcOptions kdcOptions) |
void |
setNonce(int nonce) |
void |
setRealm(java.lang.String realm) |
void |
setRtime(KerberosTime rtime) |
void |
setSName(PrincipalName sName) |
void |
setTill(KerberosTime till) |
java.lang.String |
toString() |
java.lang.String |
toString(java.lang.String tabs)
Pretty print the instance
|
private KdcOptions kdcOptions
private PrincipalName cName
private java.lang.String realm
private PrincipalName sName
private KerberosTime from
private KerberosTime till
private KerberosTime rtime
private int nonce
private java.util.Set<EncryptionType> eType
private HostAddresses addresses
private EncryptedData encAuthorizationData
private java.util.List<Ticket> additionalTickets
private int kdcOptionsLength
private int cNameLength
private int realmLength
private byte[] realmBytes
private int sNameLength
private int fromLength
private int tillLength
private int rtimeLength
private int nonceLength
private int eTypeLength
private int eTypeSeqLength
private int[] eTypeLengths
private int addressesLength
private int encAuthzDataLength
private int additionalTicketLength
private int additionalTicketSeqLength
private int[] additionalTicketsLengths
private int kdcReqBodySeqLength
private int kdcReqBodyLength
public Ticket[] getAdditionalTickets()
Tickets.Tickets.public void setAdditionalTickets(java.util.List<Ticket> additionalTickets)
additionalTickets - the additionalTickets to setpublic void addAdditionalTicket(Ticket additionalTicket)
additionalTickets - the additionalTickets to setpublic HostAddresses getAddresses()
HostAddresses.HostAddresses.public void setAddresses(HostAddresses addresses)
addresses - the addresses to setpublic PrincipalName getCName()
public void setCName(PrincipalName cName)
cName - the cName to setpublic EncryptedData getEncAuthorizationData()
AuthorizationData as EncryptedData.AuthorizationData as EncryptedData.public void setEncAuthorizationData(EncryptedData encAuthorizationData)
encAuthorizationData - the encAuthorizationData to setpublic java.util.Set<EncryptionType> getEType()
EncryptionTypes.EncryptionTypes.public void setEType(java.util.Set<EncryptionType> eType)
eType - the eType to setpublic void addEType(EncryptionType eType)
eType - the eType to addpublic KerberosTime getFrom()
KerberosTime.KerberosTime.public void setFrom(KerberosTime from)
from - the from to setpublic KdcOptions getKdcOptions()
KdcOptions.KdcOptions.public void setKdcOptions(KdcOptions kdcOptions)
kdcOptions - the kdcOptions to setpublic int getNonce()
public void setNonce(int nonce)
nonce - the nonce to setpublic java.lang.String getRealm()
public void setRealm(java.lang.String realm)
realm - the realm to setpublic KerberosTime getRTime()
KerberosTime.KerberosTime.public void setRtime(KerberosTime rtime)
rtime - the renewTime to setpublic PrincipalName getSName()
PrincipalName.PrincipalName.public void setSName(PrincipalName sName)
sName - the sName to setpublic KerberosTime getTill()
KerberosTime.KerberosTime.public void setTill(KerberosTime till)
till - the till to setpublic int computeLength()
KdcReqBody :
0x30 L1 KdcReqBody sequence
|
+--> 0xA0 L2 kdc-options tag
| |
| +--> 0x03 L2-1 kdc-options (BitString)
|
+--> 0xA1 L3 cname tag
| |
| +--> 0x30 L3-1 cname (PrincipalName)
|
+--> 0xA2 L4 realm tag
| |
| +--> 0x1B L4-1 realm (Realm, KerberosString)
|
+--> 0xA3 L5 sname tag
| |
| +--> 0x30 L5-1 sname (PrincipalName)
|
+--> 0xA4 L6 from tag
| |
| +--> 0x18 L6-1 from (KerberosTime)
|
+--> 0xA5 L7 till tag
| |
| +--> 0x18 L7-1 till (KerberosTime)
|
+--> 0xA6 L8 rtime tag
| |
| +--> 0x18 L8-1 rtime (KerberosTime)
|
+--> 0xA7 L9 nonce tag
| |
| +--> 0x02 L9-1 nonce (Int)
|
+--> 0xA8 L10 etype tag
| |
| +--> 0x30 L10-1 SEQ
| |
| +--> 0x02 L10-1-1 etype
| |
| +--> 0x02 L10-1-2 etype
| |
| :
|
+--> 0xA9 L11 addresses tag
| |
| +--> 0x30 L11-1 addresses (HostAddresses)
|
+--> 0xAA L12 enc-authorization-data tag
| |
| +--> 0x30 L12-1 enc-authorization-data
|
+--> 0xAB L13 additional-tickets tag
|
+--> 0x30 L13-1 additional-tickets
|
+--> 0x61 L13-1-1 Ticket
|
+--> 0x61 L13-1-2 Ticket
|
:
computeLength in interface org.apache.directory.api.asn1.Asn1Objectpublic java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
throws org.apache.directory.api.asn1.EncoderException
encode in interface org.apache.directory.api.asn1.Asn1Objectbuffer - The buffer containing the encoded resultorg.apache.directory.api.asn1.EncoderException - If the encoding failedprivate void reset()
public java.lang.String toString(java.lang.String tabs)
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()