From: mholzner <do-...@jb...> - 2005-10-17 00:57:34
|
I'm using this technique in the portal, and everything works as expected. Everything but one thing: the configured permission class is not added to the external permission types. So when I place the following mbean into the jboss-service.xml : | <mbean | code="org.jboss.security.jacc.DelegatingPolicy" | name="jboss.security:service=JaccPolicyProvider" | xmbean-dd=""> | <xmbean> | <attribute access="read?only" getMethod="getPolicyProxy"> | <description>The java.security.Policy implementation</description> | <name>PolicyProxy</name> | <type>java.security.Policy</type> | </attribute> | <attribute access="read?write" getMethod="getExternalPermissionTypes" setMethod="setExternalPermissionTypes"> | <description>The types of non?javax.security.jacc permissions to validate against this policy</description> | <name>ExternalPermissionTypes</name> | <type>[Ljava.lang.Class;</type> | </attribute> | <operation> | <name>listContextPolicies</name> | <return-type>java.lang.String</return-type> | </operation> | </xmbean> | <attribute name="ExternalPermissionTypes">org.jboss.portal.core.security.jacc.PortalObjectPermission</attribute> | </mbean> | and in code I do : | Policy policy = Policy.getPolicy(); | if (policy instanceof DelegatingPolicy){ | | DelegatingPolicy delegatingPolicy = (DelegatingPolicy)policy; | Class[] types = delegatingPolicy.getExternalPermissionTypes(); | then types.length is always 0 I can work around it by testing for this condition and setting the permission class 'by hand', but that introduces code dependency to 4.0.3 My question is: is there something I'm doing wrong, or is the external permission types injection not working here? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3901426#3901426 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3901426 |