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.
| 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. |
| 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. |
checkGuard, getName, toString
public ServicePermission(String servicePrincipal, String action)
ServicePermission with the specified servicePrincipal and action.servicePrincipal - the name of the service principal. An asterisk may appear by itself, to signify any service principal.action - the action stringpublic 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):
ServicePermission, ServicePermission's actions, ServicePermission's name or this ServicePermission's name is "*". implies in class Permission
p - the permission to check against.public boolean equals(Object obj)
equals in class Permission
obj - the object to test for equality with this object.obj is a ServicePermission, and has the same service principal, and actions as this ServicePermission object.public int hashCode()
hashCode in class Permission
public String getActions()
getActions in class Permission
Permission.public PermissionCollection newPermissionCollection()
newPermissionCollection in class Permission
© 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.
https://docs.oracle.com/en/java/javase/25/docs/api/java.security.jgss/javax/security/auth/kerberos/ServicePermission.html