Class ServicePermission
- All Implemented Interfaces:
Serializable, Guard
@Deprecated(since="25", forRemoval=true) public final class ServicePermission extends Permission implements Serializable
The service principal name is the canonical name of the KerberosPrincipal supplying the service, that is the KerberosPrincipal represents a Kerberos service principal. This name is treated in a case sensitive manner. An asterisk may appear by itself, to signify any service principal.
The possible actions are:
initiate - allow the caller to use the credential to
initiate a security context with a service
principal.
accept - allow the caller to use the credential to
accept security context as a particular
principal.
- Since:
- 1.4
- See Also:
Constructor Summary
| Constructor | Description |
|---|---|
ServicePermission |
Deprecated, for removal: This API element is subject to removal in a future version. Create a new ServicePermission with the specified servicePrincipal and action. |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals |
Deprecated, for removal: This API element is subject to removal in a future version. Checks two ServicePermission objects for equality. |
String |
getActions() |
Deprecated, for removal: This API element is subject to removal in a future version. Returns the canonical string representation of the actions. |
int |
hashCode() |
Deprecated, for removal: This API element is subject to removal in a future version. Returns the hash code value for this object. |
boolean |
implies |
Deprecated, for removal: This API element is subject to removal in a future version. Checks if this Kerberos service permission object "implies" the specified permission. |
PermissionCollection |
newPermissionCollection() |
Deprecated, for removal: This API element is subject to removal in a future version. Returns a PermissionCollection object for storing ServicePermission objects. |
Methods declared in class Permission
checkGuard, getName, toString | Modifier and Type | Method | Description |
|---|---|---|
void |
checkGuard |
Implements the guard interface for a permission. |
final String |
getName() |
Returns the name of this Permission. |
String |
toString() |
Returns a string describing this Permission. |
Methods declared in class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait | Modifier and Type | Method | Description |
|---|---|---|
protected Object |
clone() |
Creates and returns a copy of this object. |
protected void |
finalize() |
Deprecated, for removal: This API element is subject to removal in a future version. Finalization is deprecated and subject to removal in a future release. |
final Class |
getClass() |
Returns the runtime class of this Object. |
final void |
notify() |
Wakes up a single thread that is waiting on this object's monitor. |
final void |
notifyAll() |
Wakes up all threads that are waiting on this object's monitor. |
final void |
wait() |
Causes the current thread to wait until it is awakened, typically by being notified or interrupted. |
final void |
wait |
Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed. |
final void |
wait |
Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed. |
Constructor Details
ServicePermission
public ServicePermission(String servicePrincipal, String action)
ServicePermission with the specified servicePrincipal and action.- Parameters:
-
servicePrincipal- the name of the service principal. An asterisk may appear by itself, to signify any service principal. -
action- the action string
Method Details
implies
public boolean implies(Permission p)
More specifically, this method returns true if all the following are true (and returns false if any of them are not):
- p is an instanceof
ServicePermission, - p's actions are a proper subset of this
ServicePermission's actions, - p's name is equal to this
ServicePermission's name or thisServicePermission's name is "*".
- Specified by:
-
impliesin classPermission - 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)
- Specified by:
-
equalsin classPermission - Parameters:
-
obj- the object to test for equality with this object. - Returns:
- true if
objis a ServicePermission, and has the same service principal, and actions as this ServicePermission object. - See Also:
hashCode
public int hashCode()
- Specified by:
-
hashCodein classPermission - Returns:
- the hash code value for this object
- See Also:
getActions
public String getActions()
- Specified by:
-
getActionsin classPermission - Returns:
- the actions of this
Permission.
newPermissionCollection
public PermissionCollection newPermissionCollection()
ServicePermission 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:
-
newPermissionCollectionin classPermission - Returns:
- a new PermissionCollection object suitable for storing ServicePermissions.
© 1993, 2025, 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.