public class

KDCOptions

extends KerberosFlags
java.lang.Object
   ↳ sun.security.mule.krb5.internal.util.KerberosFlags
     ↳ sun.security.mule.krb5.internal.KDCOptions
Known Direct Subclasses

Class Overview

Implements the ASN.1 KDCOptions type.

KDCOptions ::= KerberosFlags -- reserved(0), -- forwardable(1), -- forwarded(2), -- proxiable(3), -- proxy(4), -- allow-postdate(5), -- postdated(6), -- unused7(7), -- renewable(8), -- unused9(9), -- unused10(10), -- opt-hardware-auth(11), -- unused12(12), -- unused13(13), -- 15 is reserved for canonicalize -- unused15(15), -- 26 was unused in 1510 -- disable-transited-check(26), -- renewable-ok(27), -- enc-tkt-in-skey(28), -- renew(30), -- validate(31) KerberosFlags ::= BIT STRING (SIZE (32..MAX)) -- minimum number of bits shall be sent, -- but no fewer than 32

This definition reflects the Network Working Group RFC 4120 specification available at http://www.ietf.org/rfc/rfc4120.txt.

This class appears as data field in the initial request(KRB_AS_REQ) or subsequent request(KRB_TGS_REQ) to the KDC and indicates the flags that the client wants to set on the tickets. The optional bits are:

  • KDCOptions.RESERVED
  • KDCOptions.FORWARDABLE
  • KDCOptions.FORWARDED
  • KDCOptions.PROXIABLE
  • KDCOptions.PROXY
  • KDCOptions.ALLOW_POSTDATE
  • KDCOptions.POSTDATED
  • KDCOptions.RENEWABLE
  • KDCOptions.RENEWABLE_OK
  • KDCOptions.ENC_TKT_IN_SKEY
  • KDCOptions.RENEW
  • KDCOptions.VALIDATE

Various checks must be made before honoring an option. The restrictions on the use of some options are as follows:

  1. FORWARDABLE, FORWARDED, PROXIABLE, RENEWABLE options may be set in subsequent request only if the ticket_granting ticket on which it is based has the same options (FORWARDABLE, FORWARDED, PROXIABLE, RENEWABLE) set.
  2. ALLOW_POSTDATE may be set in subsequent request only if the ticket-granting ticket on which it is based also has its MAY_POSTDATE flag set.
  3. POSTDATED may be set in subsequent request only if the ticket-granting ticket on which it is based also has its MAY_POSTDATE flag set.
  4. RENEWABLE or RENEW may be set in subsequent request only if the ticket-granting ticket on which it is based also has its RENEWABLE flag set.
  5. POXY may be set in subsequent request only if the ticket-granting ticket on which it is based also has its PROXIABLE flag set, and the address(es) of the host from which the resulting ticket is to be valid should be included in the addresses field of the request.
  6. FORWARDED, PROXY, ENC_TKT_IN_SKEY, RENEW, VALIDATE are used only in subsequent requests.

Summary

Constants
int ALLOW_POSTDATE
int ENC_TKT_IN_SKEY
int FORWARDABLE
int FORWARDED
int POSTDATED
int PROXIABLE
int PROXY
int RENEW
int RENEWABLE
int RENEWABLE_OK
int RESERVED
int UNUSED10
int UNUSED11
int UNUSED7
int UNUSED9
int VALIDATE
[Expand]
Inherited Constants
From class sun.security.mule.krb5.internal.util.KerberosFlags
Fields
private boolean DEBUG
public final int KDC_OPT_FORWARDABLE
public final int KDC_OPT_PROXIABLE
public final int KDC_OPT_RENEWABLE_OK
[Expand]
Inherited Fields
From class sun.security.mule.krb5.internal.util.KerberosFlags
Public Constructors
KDCOptions(Config kerberosConfig)
KDCOptions(int size, byte[] data)
KDCOptions(boolean[] data)
Constructs a KDCOptions from the specified bit settings.
KDCOptions(DerValue encoding)
KDCOptions(byte[] options)
Constructs a KDCOptions from the passed bit settings.
Public Methods
boolean get(int option)
Gets the value(true/false) for one of the KDCOptions.
static KDCOptions parse(DerInputStream data, byte explicitTag, boolean optional)
Parse (unmarshal) a KDCOptions from a DER input stream.
void set(int option, boolean value)
Sets the value(true/false) for one of the KDCOptions.
[Expand]
Inherited Methods
From class sun.security.mule.krb5.internal.util.KerberosFlags
From class java.lang.Object

Constants

public static final int ALLOW_POSTDATE

Constant Value: 5 (0x00000005)

public static final int ENC_TKT_IN_SKEY

Constant Value: 28 (0x0000001c)

public static final int FORWARDABLE

Constant Value: 1 (0x00000001)

public static final int FORWARDED

Constant Value: 2 (0x00000002)

public static final int POSTDATED

Constant Value: 6 (0x00000006)

public static final int PROXIABLE

Constant Value: 3 (0x00000003)

public static final int PROXY

Constant Value: 4 (0x00000004)

public static final int RENEW

Constant Value: 30 (0x0000001e)

public static final int RENEWABLE

Constant Value: 8 (0x00000008)

public static final int RENEWABLE_OK

Constant Value: 27 (0x0000001b)

public static final int RESERVED

Constant Value: 0 (0x00000000)

public static final int UNUSED10

Constant Value: 10 (0x0000000a)

public static final int UNUSED11

Constant Value: 11 (0x0000000b)

public static final int UNUSED7

Constant Value: 7 (0x00000007)

public static final int UNUSED9

Constant Value: 9 (0x00000009)

public static final int VALIDATE

Constant Value: 31 (0x0000001f)

Fields

private boolean DEBUG

public final int KDC_OPT_FORWARDABLE

Constant Value: 1073741824 (0x40000000)

public final int KDC_OPT_PROXIABLE

Constant Value: 268435456 (0x10000000)

public final int KDC_OPT_RENEWABLE_OK

Constant Value: 16 (0x00000010)

Public Constructors

public KDCOptions (Config kerberosConfig)

Parameters
kerberosConfig

public KDCOptions (int size, byte[] data)

Parameters
size
data
Throws
Asn1Exception

public KDCOptions (boolean[] data)

Constructs a KDCOptions from the specified bit settings.

Parameters
data The bits to be set for the KDCOptions.
Throws
Asn1Exception if an error occurs while decoding an ASN1 encoded data.

public KDCOptions (DerValue encoding)

Parameters
encoding
Throws
Asn1Exception
IOException

public KDCOptions (byte[] options)

Constructs a KDCOptions from the passed bit settings.

Parameters
options The bits to be set for the KDCOptions.

Public Methods

public boolean get (int option)

Gets the value(true/false) for one of the KDCOptions.

Parameters
option An option bit.
Returns
  • value true if the option is selected, false if the option is not selected.
Throws
ArrayIndexOutOfBoundsException if array index out of bound occurs.
See Also

public static KDCOptions parse (DerInputStream data, byte explicitTag, boolean optional)

Parse (unmarshal) a KDCOptions from a DER input stream. This form parsing might be used when expanding a value which is part of a constructed sequence and uses explicitly tagged type.

Parameters
data The Der input stream value, which contains one or more marshaled value.
explicitTag Tag number.
optional Indicate if this data field is optional
Returns
  • an instance of KDCOptions.
Throws
Asn1Exception if an error occurs while decoding an ASN1 encoded data.
IOException if an I/O error occurs while reading encoded data.

public void set (int option, boolean value)

Sets the value(true/false) for one of the KDCOptions.

Parameters
option An option bit.
value True if the option is selected, false if the option is not selected.
Throws
ArrayIndexOutOfBoundsException if array index out of bound occurs.
See Also