-
Bug
-
Resolution: Done
-
Major
-
JBossAS-4.0.1 SP1
-
None
Jacc: Request for the DelegatingPolicy.getPermissions to also return the permissions of the replaced delegate
According to the JACC specification all Permissions of a CodeSource or ProtectionDomain should be returned. Currently these methods return only the JACC Permissions, without the Permissions of the delegate class.
The JACC Specification states (http://java.sun.com/j2ee/javaacc/):
2.5 What a Provider Must Do
<paragraph 3>
A replacement Policy object must assume responsibility for performing all policy decisions within the JRE in which it is installed that are requested by way of the Policy interface that it implements.
Example Implementation of DelegatingPolicy.getPermissions:
public PermissionCollection getPermissions(ProtectionDomain domain) {
PermissionCollection pc = super.getPermissions(domain);
PermissionCollection delegated = delegate.getPermissions(domain);
for (Enumeration e = delegated.elements(); e.hasMoreElements()
return pc;
}
Regards,
Andrea