Negative Permissions
positive permissions mechanism
by default, jGuard use positive permissions . When a user or a library tries to access to a resource, java enforces __ a check against a permission specified by the resource__ : the resource calls the checkPermission method of the AccessController class with the chosen permission.Permission myPermission = new MyPermission(permissionName,permissionActions);
AccessController.checkPermission(myPermission);Permission myPermission = new MyPermission(permissionName,permissionActions); SecurityManager securityManager = System.getSecurityManager(); if (securityManager != null) { securityManager.checkPermission(myPermission); }
negative permissions mechanism
negative permissions is set in the webapp, by including in you web.xml file this parameter:<context-param>
<param-name>negativePermissions</param-name>
<param-value>true</param-value>
</context-param>mixing positive and negative permissions
this mechanism is not yet available. this mechanism can be useful in some cases, but maybe implies a bigger complexity in managing your application. this mechanism will be added if some users ask it.
Version 1.2 last modified by Charles Gay on 16/12/2006 at 01:40
Document data
Attachments:
No attachments for this document
Comments: 0