com.ibm.security.krb5

Class KrbAsReq

  1. java.lang.Object
  2. extended bycom.ibm.security.krb5.KrbAsReq

  1. public class KrbAsReq
  2. extends java.lang.Object
This class encapsulates the KRB-AS-REQ message that the client sends to the KDC.

Field Summary

Modifier and Type Field and Description
  1. static
  2. int
DEFAULT_KDC_TIMEOUT
Default timeout period when requesting a ticket from a KDC.
  1. protected
  2. byte[]
ibuf
DOCUMENT ME!
  1. protected
  2. byte[]
obuf
DOCUMENT ME!

Constructor Summary

Constructor and Description
KrbAsReq(EncryptionKey[] keys,boolean pa_exists,int etype,byte[] salt,byte[] s2kparams,KDCOptions options,PrincipalName cname,PrincipalName sname,KerberosTime from,KerberosTime till,KerberosTime rtime,int[] eTypes,HostAddresses addresses,Ticket[] additionalTickets)
KrbAsReq(EncryptionKey key,KDCOptions options,PrincipalName cname,PrincipalName sname,KerberosTime from,KerberosTime till,KerberosTime rtime,int[] eTypes,HostAddresses addresses,Ticket[] additionalTickets,boolean usePreauth,PAData[] paData)
KrbAsReq(PrincipalName principal)
Creates a KRB-AS-REQ to send to the default KDC
KrbAsReq(PrincipalName principal,EncryptionKey Key,boolean usePreauth,PAData[] paData)
Creates a KRB-AS-REQ to send to the default KDC
KrbAsReq(PrincipalName principal,java.lang.StringBuffer password,boolean usePreauth,PAData[] paData)
Creates a KRB-AS-REQ to send to the default KDC
KrbAsReq(java.lang.String password,boolean pa_exists,int etype,byte[] salt,byte[] s2kparams,KDCOptions options,PrincipalName cname,PrincipalName sname,KerberosTime from,KerberosTime till,KerberosTime rtime,int[] eTypes,HostAddresses addresses,Ticket[] additionalTickets)
KrbAsReq(java.lang.StringBuffer password,KDCOptions options,PrincipalName cname,PrincipalName sname,KerberosTime from,KerberosTime till,KerberosTime rtime,int[] eTypes,HostAddresses addresses,Ticket[] additionalTickets,boolean usePreauth,PAData[] paData)

Method Summary

Modifier and Type Method and Description
  1. KrbAsRep
getReply(EncryptionKey key,java.lang.String password)
Returns an AS-REP message corresponding to the AS-REQ that was sent.
  1. KrbAsRep
getReply(java.lang.StringBuffer password)
Returns an AS-REP message corresponding to the AS-REQ that was sent.
  1. java.lang.String
send()
Sends an AS request to the realm of the client.
  1. java.lang.String
send(java.lang.String realm)
Sends the provided data to the KDC of the specified realm.
  1. java.lang.String
send(java.lang.String realm,boolean useTCP)
DOCUMENT ME!
  1. void
send(java.lang.String realm,java.lang.String tempKdc,boolean useTCP)
  1. void
updatePA(int etype,byte[] salt,byte[] params,PrincipalName name)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

DEFAULT_KDC_TIMEOUT

  1. public static final int DEFAULT_KDC_TIMEOUT
Default timeout period when requesting a ticket from a KDC. If not specified in the configuration file, a value of 30 seconds is used.

obuf

  1. protected byte[] obuf
DOCUMENT ME!

ibuf

  1. protected byte[] ibuf
DOCUMENT ME!

Constructor Detail

KrbAsReq

  1. public KrbAsReq(PrincipalName principal)
  2. throws KrbException
  3. java.io.IOException
Creates a KRB-AS-REQ to send to the default KDC
Throws:
//TBD
java.io.IOException

KrbAsReq

  1. public KrbAsReq(PrincipalName principal,
  2. EncryptionKey Key,
  3. boolean usePreauth,
  4. PAData[] paData)
  5. throws KrbException
  6. java.io.IOException
Creates a KRB-AS-REQ to send to the default KDC
Throws:
//TBD
java.io.IOException

KrbAsReq

  1. public KrbAsReq(PrincipalName principal,
  2. java.lang.StringBuffer password,
  3. boolean usePreauth,
  4. PAData[] paData)
  5. throws KrbException
  6. java.io.IOException
Creates a KRB-AS-REQ to send to the default KDC
Throws:
//TBD
java.io.IOException

KrbAsReq

  1. public KrbAsReq(EncryptionKey[] keys,
  2. boolean pa_exists,
  3. int etype,
  4. byte[] salt,
  5. byte[] s2kparams,
  6. KDCOptions options,
  7. PrincipalName cname,
  8. PrincipalName sname,
  9. KerberosTime from,
  10. KerberosTime till,
  11. KerberosTime rtime,
  12. int[] eTypes,
  13. HostAddresses addresses,
  14. Ticket[] additionalTickets)
  15. throws KrbException
  16. java.io.IOException
Throws:
java.io.IOException

KrbAsReq

  1. public KrbAsReq(java.lang.String password,
  2. boolean pa_exists,
  3. int etype,
  4. byte[] salt,
  5. byte[] s2kparams,
  6. KDCOptions options,
  7. PrincipalName cname,
  8. PrincipalName sname,
  9. KerberosTime from,
  10. KerberosTime till,
  11. KerberosTime rtime,
  12. int[] eTypes,
  13. HostAddresses addresses,
  14. Ticket[] additionalTickets)
  15. throws KrbException
  16. java.io.IOException
Throws:
java.io.IOException

KrbAsReq

  1. public KrbAsReq(java.lang.StringBuffer password,
  2. KDCOptions options,
  3. PrincipalName cname,
  4. PrincipalName sname,
  5. KerberosTime from,
  6. KerberosTime till,
  7. KerberosTime rtime,
  8. int[] eTypes,
  9. HostAddresses addresses,
  10. Ticket[] additionalTickets,
  11. boolean usePreauth,
  12. PAData[] paData)
  13. throws KrbException
  14. java.io.IOException
Throws:
java.io.IOException

KrbAsReq

  1. public KrbAsReq(EncryptionKey key,
  2. KDCOptions options,
  3. PrincipalName cname,
  4. PrincipalName sname,
  5. KerberosTime from,
  6. KerberosTime till,
  7. KerberosTime rtime,
  8. int[] eTypes,
  9. HostAddresses addresses,
  10. Ticket[] additionalTickets,
  11. boolean usePreauth,
  12. PAData[] paData)
  13. throws KrbException
  14. java.io.IOException
Throws:
java.io.IOException

Method Detail

updatePA

  1. public void updatePA(int etype,
  2. byte[] salt,
  3. byte[] params,
  4. PrincipalName name)

getReply

  1. public KrbAsRep getReply(java.lang.StringBuffer password)
  2. throws KrbException
  3. java.io.IOException
Returns an AS-REP message corresponding to the AS-REQ that was sent.
Parameters:
password - The password that will be used to derive the secret key that will decrypt the AS-REP from the KDC.
Throws:
KrbException - if an error occurs while reading the data.
java.io.IOException - if an I/O error occurs while reading encoded data.

send

  1. public java.lang.String send()
  2. throws java.io.IOException
  3. KrbException
Sends an AS request to the realm of the client.
Throws:
java.io.IOException

getReply

  1. public KrbAsRep getReply(EncryptionKey key,
  2. java.lang.String password)
  3. throws KrbException
  4. java.io.IOException
Returns an AS-REP message corresponding to the AS-REQ that was sent.
Parameters:
key - The secret key that will decrypt the AS-REP from the KDC.
Throws:
KrbException - if an error occurs while reading the data.
java.io.IOException - if an I/O error occurs while reading encoded data.

send

  1. public java.lang.String send(java.lang.String realm)
  2. throws java.io.IOException
  3. KrbException
Sends the provided data to the KDC of the specified realm. Returns the response from the KDC. Default realm/KDC is used if realm is null.
Parameters:
realm - the realm of the KDC where data is to be sent.
Returns:
the kdc to which the AS request was sent to
Throws:
java.io.InterruptedIOException - if timeout expires
java.io.IOException

send

  1. public java.lang.String send(java.lang.String realm,
  2. boolean useTCP)
  3. throws java.io.IOException
  4. KrbException
DOCUMENT ME!
Parameters:
realm - DOCUMENT ME!
useTCP - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.io.IOException - DOCUMENT ME!
KrbException - DOCUMENT ME!

send

  1. public void send(java.lang.String realm,
  2. java.lang.String tempKdc,
  3. boolean useTCP)
  4. throws java.io.IOException
  5. KrbException
Throws:
java.io.IOException