|
Oracle Containers for J2EE Security Java API Reference 10g Release 3 (10.1.3.1.0) B32115-01 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
An Policy object represents the repository of authorization policies. <p/> To be more precise, the policy deals with the assignment of permissions or privileges to grantees (which can be users or roles or any valid Grantee). <p/> Granting/Revoking Policies <p/> In order for a grant/revocation to succeed, the grantor/revoker (represented by the current Subject) must have the relevant permissions granted to him/her. <p/> Policy Snapshot <p/> In general the methods that return a list or set represents a snapshot of the policy store at the time of query. If the policy store is further modified, the returned set of permissions/roles may no longer be valid. <p/> Policy Cache <p/> In general the Policy implementation should cache the policy information, so that repeated calls using the same parameters do not result in repeated network roundtrips to the backing store. <p/> This interface also defines methods that change the persistent state of the policy store (e.g. grant/revokeXXX methods). The implementation should take care to ensure that whenever a grant/revoke is effected the relevant cache entries are invalidated. <p/>
| Method Summary | |
java.security.PermissionCollection |
getPermissions(java.security.CodeSource codesource)Evaluates the global policy and returns a PermissionCollection object specifying the set of permissions allowed for code from the specified code source. |
java.security.PermissionCollection |
getPermissions(Grantee grantee, java.lang.Class perm_cls)Lists all permissions of the specified Class granted to this grantee. |
java.security.PermissionCollection |
getPermissions(java.security.ProtectionDomain domain)Evaluates the global policy and returns a PermissionCollection object specifying the set of permissions allowed given the characteristics of the protection domain. |
java.security.PermissionCollection |
getPermissions(javax.security.auth.Subject subject, java.security.CodeSource cs)Retrieve the Permissions granted to the Principals associated with the specified CodeSource. |
void |
grant(Grantee grantee, java.security.Permission perm)Grants a permission to the specified grantee, optionally with admin option. |
boolean |
hasPermission(Grantee grantee, java.security.Permission perm)Returns true if the grantee in question can assume the specified permission. |
void |
refresh()Refresh and reload the Policy |
void |
revoke(Grantee grantee, java.security.Permission perm)Revokes the permission from the specified grantee |
| Method Detail |
public void grant(Grantee grantee,
java.security.Permission perm)
throws JAZNException
grantee - the grantee to be granted the specified permissionperm - the permission to be grantedJAZNException - if a JAZN exception is encountered.java.lang.SecurityException - if the caller does not have the permission to invoke this method
public void revoke(Grantee grantee,
java.security.Permission perm)
throws JAZNException
grantee - the specified granteeperm - the specified permission to be revokedJAZNException - if a JAZN exception is encountered.java.lang.SecurityException - if the caller does not have the permission to invoke this method
public java.security.PermissionCollection getPermissions(Grantee grantee,
java.lang.Class perm_cls)
throws JAZNException
grantee - the grantee in questionperm_cls - the permission Class of which the returning permissions will be instances ofjava.lang.SecurityException - if the caller does not have the permission required to invoke this method.JAZNException
public boolean hasPermission(Grantee grantee,
java.security.Permission perm)
throws JAZNException
grantee - the grantee in questionperm - the specified permissionjava.lang.SecurityException - if the caller does not have the permission required to invoke this method.JAZNException
public java.security.PermissionCollection getPermissions(javax.security.auth.Subject subject,
java.security.CodeSource cs)
subject - the Subject whose associated Principals, in conjunction with the provided CodeSource, determines the Permissions returned by this method. This parameter may be null.cs - the code specified by its CodeSource that determines, in conjunction with the provided Subject, the Permissions returned by this method. This parameter may be null.Policypublic java.security.PermissionCollection getPermissions(java.security.CodeSource codesource)
codesource - the CodeSource associated with the caller. This encapsulates the original location of the code (where the code came from) and the public key(s) of its signer.java.lang.SecurityException - if the current thread does not have permission to call getPermissions on the policy object.Policypublic java.security.PermissionCollection getPermissions(java.security.ProtectionDomain domain)
domain - the ProtectionDomain associated with the caller.ProtectionDomain, SecureClassLoaderpublic void refresh()
java.lang.SecurityException - if the caller does not have permission to refresh the Policy.Policy
|
Oracle Containers for J2EE Security Java API Reference 10g Release 3 (10.1.3.1.0) B32115-01 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||