|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface represents service which is able to manage UpdatablePolicy (security policy)
Modification to the policy are made permanent after the call finishes.
Note that if the WSO2 SOA Enablement Server for Java is running in secure mode, then Policy Management web service is protected by both authorization and authentication.
In general, to access the Policy the caller must have
ACLPermission.
To get informations about permissions the caller must have
ACLPermission
with name perm and actions get.
To modify permissions you need
ACLPermission
with name perm and actions modify.
Similar rules applies to the management of roles.
To get informations about roles the caller must have
ACLPermission
with name role and actions get.
To modify roles you need
ACLPermission
with name role and actions modify.
If you are not granted with the permissions mentioned above you can still
grant or revoke permissions for "your own objects". You own an object
if you have DelegatePermission for it.
| Method Summary | |
boolean |
addPermission(java.security.CodeSource cs,
java.security.Principal principal,
java.security.Permission permission)
Adds a single permission to specified principal. |
void |
addPermissions(java.security.CodeSource cs,
java.security.Principal principal,
java.security.PermissionCollection collection)
Adds collection of permissions to specified principal. |
boolean |
addPermissionToRole(java.lang.String roleName,
java.security.Permission permission)
Adds permission to role. |
PrincipalEntries |
getPrincipalEntries()
Returns enumeration of principal entries. |
PrincipalEntries |
getPrincipalEntries(java.security.Permission perm)
Returns iterator of principals that are granted with specified atomic permission. |
java.security.PermissionCollection |
getPrincipalPermissions(java.security.CodeSource cs,
java.security.Principal principal)
Returns permissions associated with the principal only (typically supplied by a grant entry for this principal). |
java.security.PermissionCollection |
getPrincipalPermissions(java.security.CodeSource cs,
java.security.Principal principal,
boolean roleInheritted)
Returns permissions associated with the principal only (typically supplied by a grant entry for this principal). |
PrincipalEntries[] |
getPrincipalsEntries(java.security.Permission[] perms)
This method is similar to getPrincipalEntries(Permission),
but allows to process more request in one batch. |
PrincipalEntries |
getPrincipalsOwningPermission(java.security.Permission perm)
Returns iterator of principals, which own specified atomic permission. |
java.util.Iterator |
getRoleNames()
Returns iterator of role names. |
java.security.PermissionCollection |
getRolePermissions(java.lang.String roleName)
Get permissions of the role. |
boolean |
isRoleManager()
Test whether this policy can manage roles. |
boolean |
isUpdatable()
Test whether this policy is really updatable or read-only. |
boolean |
removePermission(java.security.CodeSource cs,
java.security.Principal principal,
java.security.Permission permission)
Removes permission from specified user. |
boolean |
removePermissionFromRole(java.lang.String roleName,
java.security.Permission permission)
Removes permission from role. |
| Method Detail |
public boolean isUpdatable()
false if it is read-only, true if it
is updatable
public void addPermissions(java.security.CodeSource cs,
java.security.Principal principal,
java.security.PermissionCollection collection)
throws java.security.AccessControlException
ACLPermission)
or you must have delegate permission for each permission which you are trying to add
- name of the deletage permissions must match name of the permission which you are trying to add).
principal - principalcs - codesource for this
permission (can be null)collection - collection of permission
to be added to a principal
java.security.AccessControlException - Description of the
Exception
public boolean addPermission(java.security.CodeSource cs,
java.security.Principal principal,
java.security.Permission permission)
throws java.security.AccessControlException
ACLPermission) or
you must have delegate permission for the permission which you are trying to add
- name of the deletage permissions must match name of the permission which you are trying to add)
cs - codesource for this
permission (can be null)principal - principalpermission - permission to add
true if the
permission was added, false if it cannot be added,
because the principal already owns the permission.
java.security.AccessControlException - Description of the
Exception
public boolean removePermission(java.security.CodeSource cs,
java.security.Principal principal,
java.security.Permission permission)
throws java.security.AccessControlException
ACLPermission) or
you must have delegate permission for the permission which you are trying to remove
- name of the deletage permissions must match name of the permission which you are trying to remove)
cs - codesource for this
permission (can be null)principal - principalpermission - the permission has to
match exactly (tested through equals method) to one of the
permissions already assigned to the principal.
true if the
permission was removed, false if it cannot be remove,
because the principal does not own the permission.
java.security.AccessControlException - Description of the
Exception
public java.security.PermissionCollection getPrincipalPermissions(java.security.CodeSource cs,
java.security.Principal principal)
throws java.security.AccessControlException
ACLPermission)).
cs - codesource for this
permission (can be null)principal - principal (can be null
)
java.security.AccessControlException - Description of the
Exception
public java.security.PermissionCollection getPrincipalPermissions(java.security.CodeSource cs,
java.security.Principal principal,
boolean roleInheritted)
throws java.security.AccessControlException
ACLPermission)).
cs - codesource for this permission (can be null)principal - principal (can be null)roleInheritted - true means that the returned permissions also contains this inheritted from contained roles
java.security.AccessControlException - the caller is not authorized to invoke this method
public PrincipalEntries getPrincipalEntries(java.security.Permission perm)
throws java.security.AccessControlException
ACLPermission) or
you must own some object (e.g. deployed package)
or you must have permission to deploy packages).
perm - permission acts as filter for the constructed result
java.security.AccessControlException - Description of the
Exception
public PrincipalEntries getPrincipalsOwningPermission(java.security.Permission perm)
throws java.security.AccessControlException
ACLPermission) or
you must own some object (e.g. deployed package)
or you must have permission to deploy packages).
perm - permission act as filter for the constructed result
java.security.AccessControlException - Description of the
Exceptionpublic PrincipalEntries[] getPrincipalsEntries(java.security.Permission[] perms)
getPrincipalEntries(Permission),
but allows to process more request in one batch.
perms - permissions act as filter for the constructed result
java.security.AccessControlException - Description of the
Exception
public PrincipalEntries getPrincipalEntries()
throws java.security.AccessControlException
ACLPermission) or
you must own some object (e.g. deployed package)
or you must have permission to deploy packages).
java.security.AccessControlException - Description of the
Exceptionpublic boolean isRoleManager()
falsepublic java.util.Iterator getRoleNames()
ACLPermission).
public boolean addPermissionToRole(java.lang.String roleName,
java.security.Permission permission)
ACLPermission).
roleName - name of the rolepermission - permission to add,
can be null ro cteate empty role entry
true
if the permission was added, false if it cannot be
added
public boolean removePermissionFromRole(java.lang.String roleName,
java.security.Permission permission)
ACLPermission).
roleName - name of the rolepermission - permission to add
true
if the permission was removed, false if it cannot be
addedpublic java.security.PermissionCollection getRolePermissions(java.lang.String roleName)
ACLPermission).
roleName - name of the role
java.security.AccessControlException - the caller is not authorized to invoke this method
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||