APIdia Launch Partner
Top Description Fields Constructors Methods
javax.security.auth.kerberos

public final Class DelegationPermission

Additional top-level class in compilation unit: KrbDelegationPermissionCollection.

extends BasicPermission
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Annotations
@Deprecated
since:25
forRemoval:true
Imports
java.io.*, java.security.BasicPermission, .Permission, .PermissionCollection, java.util.*, java.util.concurrent.ConcurrentHashMap

Deprecated

for removal since 25.

This permission cannot be used for controlling access to resources as the Security Manager is no longer supported.

This class is for Kerberos delegation permissions.

The target name of this Permission specifies a pair of kerberos service principals. The first is the subordinate service principal being entrusted to use the TGT. The second service principal designates the target service the subordinate service principal is to interact with on behalf of the initiating KerberosPrincipal. This latter service principal is specified to restrict the use of a proxiable ticket.

Since
1.4

Field Summary

Modifier and TypeField and Description
private static final long
private transient String
private transient String

Constructor Summary

AccessConstructor and Description
public
DelegationPermission(String
the name of the subordinate and target principals
principals
)

Create a new DelegationPermission with the specified subordinate and target principals.

public
DelegationPermission(String
the name of the subordinate and target principals
principals
,
String
should be null.
actions
)

Create a new DelegationPermission with the specified subordinate and target principals.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if obj is a DelegationPermission, and has the same subordinate and service principal as this DelegationPermission object.
equals
(Object
the object to test for equality with this object.
obj
)

Overrides java.security.BasicPermission.equals.

Checks two DelegationPermission objects for equality.

public int

Returns:

the hash code value for this object
hashCode
()

Overrides java.security.BasicPermission.hashCode.

Returns the hash code value for this object.

public boolean

Returns:

true if the specified permission is implied by this object, false if not.
implies
(Permission
the permission to check against.
p
)

Overrides java.security.BasicPermission.implies.

Checks if this Kerberos delegation permission object "implies" the specified permission.

private void
init(String target)

Hides java.security.BasicPermission.init.

Initialize the DelegationPermission object.

public PermissionCollection

Returns:

a new PermissionCollection object suitable for storing DelegationPermissions.
newPermissionCollection
()

Overrides java.security.BasicPermission.newPermissionCollection.

Returns a PermissionCollection object for storing DelegationPermission objects.

private synchronized void
readObject(ObjectInputStream
the ObjectInputStream from which data is read
s
)

Hides java.security.BasicPermission.readObject.

readObject is called to restore the state of the DelegationPermission from a stream.

private synchronized void
writeObject(ObjectOutputStream
the ObjectOutputStream to which data is written
s
)

WriteObject is called to save the state of the DelegationPermission to a stream.

Inherited from java.security.BasicPermission:
getActions

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.security.BasicPermission.serialVersionUID.

Annotations
@Serial
serviceback to summary
private transient String service
subordinateback to summary
private transient String subordinate

Constructor Detail

DelegationPermissionback to summary
public DelegationPermission(String principals)

Create a new DelegationPermission with the specified subordinate and target principals.

Parameters
principals:String

the name of the subordinate and target principals

Exceptions
NullPointerException:
if principals is null.
IllegalArgumentException:
if principals is empty, or does not contain a pair of principals, or is improperly quoted
DelegationPermissionback to summary
public DelegationPermission(String principals, String actions)

Create a new DelegationPermission with the specified subordinate and target principals.

Parameters
principals:String

the name of the subordinate and target principals

actions:String

should be null.

Exceptions
NullPointerException:
if principals is null.
IllegalArgumentException:
if principals is empty, or does not contain a pair of principals, or is improperly quoted

Method Detail

equalsback to summary
public boolean equals(Object obj)

Overrides java.security.BasicPermission.equals.

Checks two DelegationPermission objects for equality.

Parameters
obj:Object

the object to test for equality with this object.

Returns:boolean

true if obj is a DelegationPermission, and has the same subordinate and service principal as this DelegationPermission object.

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.security.BasicPermission.hashCode.

Returns the hash code value for this object.

Returns:int

the hash code value for this object

Annotations
@Override
impliesback to summary
public boolean implies(Permission p)

Overrides java.security.BasicPermission.implies.

Checks if this Kerberos delegation permission object "implies" the specified permission.

This method returns true if this DelegationPermission is equal to p, and returns false otherwise.

Parameters
p:Permission

the permission to check against.

Returns:boolean

true if the specified permission is implied by this object, false if not.

Annotations
@Override
initback to summary
private void init(String target)

Hides java.security.BasicPermission.init.

Initialize the DelegationPermission object.

newPermissionCollectionback to summary
public PermissionCollection newPermissionCollection()

Overrides java.security.BasicPermission.newPermissionCollection.

Returns a PermissionCollection object for storing DelegationPermission objects.
DelegationPermission objects must be stored in a manner that allows them to be inserted into the collection in any order, but that also enables the PermissionCollection implies method to be implemented in an efficient (and consistent) manner.

Returns:PermissionCollection

a new PermissionCollection object suitable for storing DelegationPermissions.

Annotations
@Override
readObjectback to summary
private synchronized void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException

Hides java.security.BasicPermission.readObject.

readObject is called to restore the state of the DelegationPermission from a stream.

Parameters
s:ObjectInputStream

the ObjectInputStream from which data is read

Annotations
@Serial
Exceptions
IOException:
if an I/O error occurs
ClassNotFoundException:
if a serialized class cannot be loaded
writeObjectback to summary
private synchronized void writeObject(ObjectOutputStream s) throws IOException

WriteObject is called to save the state of the DelegationPermission to a stream. The actions are serialized, and the superclass takes care of the name.

Parameters
s:ObjectOutputStream

the ObjectOutputStream to which data is written

Annotations
@Serial
Exceptions
IOException:
if an I/O error occurs