Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> JAZN, programmatic permission checks without SecurityManager

JAZN, programmatic permission checks without SecurityManager

From: AndyMalakov <andy.malakov_at_gmail.com>
Date: 30 Aug 2006 21:49:33 -0700
Message-ID: <1156999773.322808.64220@p79g2000cwp.googlegroups.com>


Hello All,

Questions to people who are familiar with OC4J security configuration
(specifically XML-based JAZN Security Provider).

I want to use java.security.AccessController.checkPermission() without SecurityManager in OC4J.

Imagine we have a method Library.deleteUserAccount() that requires any caller to have LibraryAdministratorRole. So we put simple check inside this method:

void deleteUserAccount() {

   AccessController.checkPermission (new LibraryAdminPermission());    .. code to delete account ...
}

and use OC4J's admintool define a policy that grants LibraryAdminPermission to LibraryAdministratorRole
(system-jazn-data.xml).

Here is the problem: At runtime I know that caller's context has LibraryAdministratorRole principal (oracle.security logger), yet LibraryAdminPermission is denied.

I can see that Policy.getPolicy() in the same context returns Java's default policy provider, even if I specify oracle.security.jazn.spi.PolicyProvider in JRE/lib/security/java.security file.

For certain reasons, I can't use declarative security provided by EJB descriptors or run server with security manager installed. This scenario works under Orion and Tomcat.

Any ideas, please?

Best Regards,
Andy Received on Wed Aug 30 2006 - 23:49:33 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US