Class DelegationPermission
- All Implemented Interfaces:
-
Serializable
,Guard
public final class DelegationPermission extends BasicPermission implements Serializable
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]\"");
- Since:
- 1.4
- See Also:
Constructor Summary
Constructor | Description |
---|---|
DelegationPermission |
Create a new DelegationPermission with the specified subordinate and target principals. |
DelegationPermission |
Create a new DelegationPermission with the specified subordinate and target principals. |
Method Summary
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals |
Checks two DelegationPermission objects for equality. |
int |
hashCode() |
Returns the hash code value for this object. |
boolean |
implies |
Checks if this Kerberos delegation permission object "implies" the specified permission. |
PermissionCollection |
newPermissionCollection() |
Returns a PermissionCollection object for storing DelegationPermission objects. |
Methods declared in class java.security.BasicPermission
getActions
Methods declared in class java.security.Permission
checkGuard, getName, toString
Constructor Details
DelegationPermission
public DelegationPermission(String principals)
DelegationPermission
with the specified subordinate and target principals.- Parameters:
-
principals
- the name of the subordinate and target principals - Throws:
-
NullPointerException
- ifprincipals
isnull
. -
IllegalArgumentException
- ifprincipals
is empty, or does not contain a pair of principals, or is improperly quoted
DelegationPermission
public DelegationPermission(String principals, String actions)
DelegationPermission
with the specified subordinate and target principals.- Parameters:
-
principals
- the name of the subordinate and target principals -
actions
- should be null. - Throws:
-
NullPointerException
- ifprincipals
isnull
. -
IllegalArgumentException
- ifprincipals
is empty, or does not contain a pair of principals, or is improperly quoted
Method Details
implies
public boolean implies(Permission p)
This method returns true if this DelegationPermission
is equal to p
, and returns false otherwise.
- Overrides:
-
implies
in classBasicPermission
- Parameters:
-
p
- the permission to check against. - Returns:
- true if the specified permission is implied by this object, false if not.
equals
public boolean equals(Object obj)
- Overrides:
-
equals
in classBasicPermission
- Parameters:
-
obj
- the object to test for equality with this object. - Returns:
- true if
obj
is a DelegationPermission, and has the same subordinate and service principal as this DelegationPermission object. - See Also:
hashCode
public int hashCode()
- Overrides:
-
hashCode
in classBasicPermission
- Returns:
- a hash code value for this object.
- See Also:
newPermissionCollection
public PermissionCollection newPermissionCollection()
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.
- Overrides:
-
newPermissionCollection
in classBasicPermission
- Returns:
- a new PermissionCollection object suitable for storing DelegationPermissions.
© 1993, 2021, 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.
https://docs.oracle.com/en/java/javase/17/docs/api/java.security.jgss/javax/security/auth/kerberos/DelegationPermission.html