public final class ServicePermission extends Permission implements Serializable
A ServicePermission contains a service principal name and a list of actions which specify the context the credential can be used within.
The service principal name is the canonical name of the
KereberosPrincipal 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.
Granting this permission implies that the caller can use a cached credential (TGT, service ticket or secret key) within the context designated by the action. In the case of the TGT, granting this permission also implies that the TGT can be obtained by an Authentication Service exchange.
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.For example, to specify the permission to access to the TGT to initiate a security context the permission is constructed as follows:
To obtain a service ticket to initiate a context with the "host" service the permission is constructed as follows:
For a Kerberized server the action is "accept". For example, the permission necessary to access and use the secret key of the Kerberized "host" service (telnet and the likes) would be constructed as follows:
|Constructor and Description|
Create a new
|Modifier and Type||Method and Description|
Checks two ServicePermission objects for equality.
Returns the canonical string representation of the actions.
Returns the hash code value for this object.
Checks if this Kerberos service permission object "implies" the specified permission.
Returns a PermissionCollection object for storing ServicePermission objects.
ServicePermissionwith the specified
servicePrincipal- the name of the service principal. An asterisk may appear by itself, to signify any service principal.
action- the action string
public boolean implies(Permission p)
If none of the above are true,
implies returns false.
public boolean equals(Object obj)
public int hashCode()
public String getActions()
public PermissionCollection newPermissionCollection()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2013, Oracle and/or its affiliates. All rights reserved.