APIdia Launch Partner
Top Description Fields Constructors Methods
sun.security.krb5.internal

public Class KDCOptions

extends KerberosFlags
Class Inheritance
Known Direct Subclasses
sun.security.krb5.internal.LoginOptions
Imports
sun.security.krb5.Config, .KrbException, .Asn1Exception, sun.security.krb5.internal.util.KerberosFlags, sun.security.util.*, java.io.IOException

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:

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.

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
private static final int
private static final int
private static final int
private static final String[]
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
Inherited from sun.security.krb5.internal.util.KerberosFlags:
BITS_PER_UNIT

Constructor Summary

AccessConstructor and Description
public
public
KDCOptions(int size, byte[] data)

public
KDCOptions(boolean[]
the bits to be set for the KDCOptions.
data
)

Constructs a KDCOptions from the specified bit settings.

public
KDCOptions(DerValue encoding)

public
KDCOptions(byte[]
the bits to be set for the KDCOptions.
options
)

Constructs a KDCOptions from the passed bit settings.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

value true if the option is selected, false if the option is not selected.
get
(int
an option bit.
option
)

Overrides sun.security.krb5.internal.util.KerberosFlags.get.

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

public static KDCOptions

Returns:

an instance of KDCOptions.
parse
(DerInputStream
the Der input stream value, which contains one or more marshaled value.
data
,
byte
tag number.
explicitTag
,
boolean
indicate if this data field is optional
optional
)

Parse (unmarshal) a KDCOptions from a DER input stream.

public void
set(int
an option bit.
option
,
boolean
true if the option is selected, false if the option is not selected.
value
)

Overrides sun.security.krb5.internal.util.KerberosFlags.set.

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

private void
public String
toString()

Overrides sun.security.krb5.internal.util.KerberosFlags.toString.

Returns a string representation of the object.

public static KDCOptions
with(int... flags)

Inherited from sun.security.krb5.internal.util.KerberosFlags:
asn1EncodetoBooleanArray

Field Detail

ALLOW_POSTDATEback to summary
public static final int ALLOW_POSTDATE
CANONICALIZEback to summary
public static final int CANONICALIZE
CNAME_IN_ADDL_TKTback to summary
public static final int CNAME_IN_ADDL_TKT
ENC_TKT_IN_SKEYback to summary
public static final int ENC_TKT_IN_SKEY
FORWARDABLEback to summary
public static final int FORWARDABLE
FORWARDEDback to summary
public static final int FORWARDED
KDC_OPT_FORWARDABLEback to summary
private static final int KDC_OPT_FORWARDABLE
KDC_OPT_PROXIABLEback to summary
private static final int KDC_OPT_PROXIABLE
KDC_OPT_RENEWABLE_OKback to summary
private static final int KDC_OPT_RENEWABLE_OK
namesback to summary
private static final String[] names
POSTDATEDback to summary
public static final int POSTDATED
PROXIABLEback to summary
public static final int PROXIABLE
PROXYback to summary
public static final int PROXY
RENEWback to summary
public static final int RENEW
RENEWABLEback to summary
public static final int RENEWABLE
RENEWABLE_OKback to summary
public static final int RENEWABLE_OK
RESERVEDback to summary
public static final int RESERVED
UNUSED10back to summary
public static final int UNUSED10
UNUSED11back to summary
public static final int UNUSED11
UNUSED7back to summary
public static final int UNUSED7
UNUSED9back to summary
public static final int UNUSED9
VALIDATEback to summary
public static final int VALIDATE

Constructor Detail

KDCOptionsback to summary
public KDCOptions()
KDCOptionsback to summary
public KDCOptions(int size, byte[] data) throws Asn1Exception
KDCOptionsback to summary
public KDCOptions(boolean[] data) throws Asn1Exception

Constructs a KDCOptions from the specified bit settings.

Parameters
data:boolean[]

the bits to be set for the KDCOptions.

Exceptions
Asn1Exception:
if an error occurs while decoding an ASN1 encoded data.
KDCOptionsback to summary
public KDCOptions(DerValue encoding) throws Asn1Exception, IOException
KDCOptionsback to summary
public KDCOptions(byte[] options)

Constructs a KDCOptions from the passed bit settings.

Parameters
options:byte[]

the bits to be set for the KDCOptions.

Method Detail

getback to summary
public boolean get(int option) throws ArrayIndexOutOfBoundsException

Overrides sun.security.krb5.internal.util.KerberosFlags.get.

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

Parameters
option:int

an option bit.

Returns:boolean

value true if the option is selected, false if the option is not selected.

Exceptions
ArrayIndexOutOfBoundsException:
if array index out of bound occurs.
See Also
sun.security.krb5.internal.Krb5
parseback to summary
public static KDCOptions parse(DerInputStream data, byte explicitTag, boolean optional) throws Asn1Exception, IOException

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:DerInputStream

the Der input stream value, which contains one or more marshaled value.

explicitTag:byte

tag number.

optional:boolean

indicate if this data field is optional

Returns:KDCOptions

an instance of KDCOptions.

Exceptions
Asn1Exception:
if an error occurs while decoding an ASN1 encoded data.
IOException:
if an I/O error occurs while reading encoded data.
setback to summary
public void set(int option, boolean value) throws ArrayIndexOutOfBoundsException

Overrides sun.security.krb5.internal.util.KerberosFlags.set.

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

Parameters
option:int

an option bit.

value:boolean

true if the option is selected, false if the option is not selected.

Exceptions
ArrayIndexOutOfBoundsException:
if array index out of bound occurs.
See Also
sun.security.krb5.internal.Krb5
setDefaultback to summary
private void setDefault()
toStringback to summary
public String toString()

Overrides sun.security.krb5.internal.util.KerberosFlags.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
withback to summary
public static KDCOptions with(int... flags)