public final class DelegationPermission extends BasicPermission implements Serializable
This class is used to restrict the usage of the Kerberos delegation model, ie: forwardable and proxiable tickets.
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.
For example, to specify the "host" service use of a forwardable TGT the target permission is specified as follows:
DelegationPermission("\"host/[email protected]\" \"krbtgt/[email protected]\"");
To give the "backup" service a proxiable nfs service ticket the target permission might be specified:
DelegationPermission("\"backup/[email protected]\" \"nfs/[email protected]\"");
public DelegationPermission(String principals)
Create a new DelegationPermission
with the specified subordinate and target principals.
principals
- the name of the subordinate and target principalsNullPointerException
- if principals
is null
.IllegalArgumentException
- if principals
is empty.public DelegationPermission(String principals, String actions)
Create a new DelegationPermission
with the specified subordinate and target principals.
principals
- the name of the subordinate and target principals
actions
- should be null.NullPointerException
- if principals
is null
.IllegalArgumentException
- if principals
is empty.public boolean implies(Permission p)
Checks if this Kerberos delegation permission object "implies" the specified permission.
If none of the above are true, implies
returns false.
implies
in class BasicPermission
p
- the permission to check against.public boolean equals(Object obj)
Checks two DelegationPermission objects for equality.
equals
in class BasicPermission
obj
- the object to test for equality with this object.Object.hashCode()
, HashMap
public int hashCode()
Returns the hash code value for this object.
hashCode
in class BasicPermission
Object.equals(java.lang.Object)
, System.identityHashCode(java.lang.Object)
public PermissionCollection 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.
newPermissionCollection
in class BasicPermission
© 1993–2017, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.