users@glassfish.java.net

Re: JACC Provider can't check security for itself

From: <glassfish_at_javadesktop.org>
Date: Thu, 15 May 2008 10:06:48 PDT

thanks for the good news.

since you are trying to write a portable policy provider, you might want to take a look at the quidelines in the jacc spec for developing a "delegating policy provider". such a provider will be able to call Policy.getPolicy() the first time it is instantiated, and in so doing obtain access to the default PolicyProvider provided by the system. In that way you can remove your reliance on PolicyFile; which is a sun specific impl of the "default" policy file syntax.

your provider should delegate calls to the underlying provider for queries that it does not handle itself. For calls like getPermissions it would merge the permissions it handles into the collection returned by the underlying provider.

Ron

ps; the policy file syntax is not a standard. I think it is supported by all vm's, but I think they all do so using their own policy impl. In the sun vm we use PolicyFile as our default provider

http://java.sun.com/j2se/1.4.2/docs/guide/security/PolicyFiles.html
[Message sent by forum member 'monzillo' (monzillo)]

http://forums.java.net/jive/thread.jspa?messageID=274625