Additional top-level class in compilation unit: KrbServicePermissionCollection.
Deprecated
for removal since 25.
This permission cannot be used for controlling access to resources as the Security Manager is no longer supported.
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.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | ACCEPT
Accept a security context |
| private String | actions
the actions string. |
| private static final int | ALL
All actions |
| private static final int | INITIATE
Initiate a security context to the specified service |
| private transient int | |
| private static final int | NONE
No actions. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | ServicePermission(String
the name of the service principal.
An asterisk may appear by itself, to signify any service principal. servicePrincipal, String the action string action)Create a new |
| pack-priv | ServicePermission(String servicePrincipal, int mask)
Creates a ServicePermission object with the specified servicePrincipal and a pre-calculated mask. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true ifobj is a ServicePermission, and has the
same service principal, and actions as this
ServicePermission object.the object to test for equality with this object. obj)Implements abstract java. Checks two ServicePermission objects for equality. |
| pack-priv static String | Returns: the canonical string representation of the actionsa specific integer action mask to translate into a string mask)Returns the "canonical string representation" of the actions in the specified mask. |
| public String | getActions()
Implements abstract java. Returns the canonical string representation of the actions. |
| pack-priv int | |
| private static int | |
| public int | Returns: the hash code value for this objectImplements abstract java. Returns the hash code value for this object. |
| public boolean | Returns: true if the specified permission is implied by this object, false if not.the permission to check against. p)Implements abstract java. Checks if this Kerberos service permission object "implies" the specified permission. |
| pack-priv boolean | impliesIgnoreMask(ServicePermission p)
References Deprecated
ServicePermission is deprecated or references (maybe indirectly) at least one deprecated element.
|
| private void | |
| public PermissionCollection | Returns: a new PermissionCollection object suitable for storing ServicePermissions.Overrides java. Returns a PermissionCollection object for storing ServicePermission objects. |
| private void | readObject(ObjectInputStream
the s)ObjectInputStream from which data is readreadObject is called to restore the state of the ServicePermission from a stream. |
| private void | writeObject(ObjectOutputStream
the s)ObjectOutputStream to which data is writtenWriteObject is called to save the state of the ServicePermission to a stream. |
| ACCEPT | back to summary |
|---|---|
| private static final int ACCEPT Accept a security context | |
| actions | back to summary |
|---|---|
| private String actions the actions string. | |
| ALL | back to summary |
|---|---|
| private static final int ALL All actions | |
| INITIATE | back to summary |
|---|---|
| private static final int INITIATE Initiate a security context to the specified service | |
| mask | back to summary |
|---|---|
| private transient int mask | |
| NONE | back to summary |
|---|---|
| private static final int NONE No actions. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. | |
| ServicePermission | back to summary |
|---|---|
| public ServicePermission(String servicePrincipal, String action) Create a new | |
| ServicePermission | back to summary |
|---|---|
| pack-priv ServicePermission(String servicePrincipal, int mask) Creates a ServicePermission object with the specified servicePrincipal and a pre-calculated mask. Avoids the overhead of re-computing the mask. Called by ServicePermissionCollection. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Implements abstract java. Checks two ServicePermission objects for equality. | |
| getActions | back to summary |
|---|---|
| pack-priv static String getActions(int mask) Returns the "canonical string representation" of the actions in the specified mask. Always returns present actions in the following order: initiate, accept.
| |
| getActions | back to summary |
|---|---|
| public String getActions() Implements abstract java. Returns the canonical string representation of the actions. Always returns present actions in the following order: initiate, accept.
| |
| getMask | back to summary |
|---|---|
| pack-priv int getMask() Return the current action mask.
| |
| getMask | back to summary |
|---|---|
| private static int getMask(String action) Convert an action string to an integer actions mask. Note if action is "-", action will be NONE, which means any action implies it.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Implements abstract java. Returns the hash code value for this object.
| |
| implies | back to summary |
|---|---|
| public boolean implies(Permission p) Implements abstract java. Checks if this Kerberos service permission object "implies" the specified permission. More specifically, this method returns true if all the following are true (and returns false if any of them are not):
| |
| impliesIgnoreMask | back to summary |
|---|---|
| pack-priv boolean impliesIgnoreMask(ServicePermission p)
References Deprecated
See corresponding docs for further information. | |
| init | back to summary |
|---|---|
| private void init(String servicePrincipal, int mask) Initialize the ServicePermission object. | |
| newPermissionCollection | back to summary |
|---|---|
| public PermissionCollection newPermissionCollection() Overrides java. Returns a PermissionCollection object for storing
ServicePermission objects.
| |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException readObject is called to restore the state of the ServicePermission from a stream.
| |
| writeObject | back to summary |
|---|---|
| private void writeObject(ObjectOutputStream s) throws IOException WriteObject is called to save the state of the ServicePermission to a stream. The actions are serialized, and the superclass takes care of the name.
| |