[jboss-user] [JBoss AOP] - Re: Problem with prepackaged security aspect on a POJO using

kabir.khan@jboss.com do-not-reply at jboss.com
Wed Jan 17 06:26:23 EST 2007


I don't know if you need to include the metadate-loader again since that is already defined in base-aop.xml.

Here's a jboss-aop.xml snippet from our testsuite

  |    <!-- Security testing -->
  | 
  |    <prepare expr="all(org.jboss.test.aop.bean.SecurityTester)"/>
  | 
  |    <prepare expr="all(org.jboss.test.aop.bean.SecuredPOJO)"/>
  | 
  |    <metadata tag="security" class="org.jboss.test.aop.bean.SecuredPOJO">
  |       <security-domain>other</security-domain>
  |       <method-permission>
  |          <role-name>allowed</role-name>
  |          <method>
  |             <method-name>someMethod</method-name>
  |          </method>
  |       </method-permission>
  |       <method-permission>
  |          <unchecked/>
  |          <method>
  |             <method-name>unchecked</method-name>
  |          </method>
  |       </method-permission>
  |       <field-permission>
  |          <role-name>allowed</role-name>
  |          <field>
  |             <field-name>someField</field-name>
  |          </field>
  |       </field-permission>
  |       <field-permission>
  |          <unchecked/>
  |          <field>
  |             <field-name>uncheckedField</field-name>
  |          </field>
  |       </field-permission>
  |       <constructor-permission>
  |          <unchecked/>
  |          <constructor>
  |             <constructor-params/>
  |          </constructor>
  |       </constructor-permission>
  |       <constructor-permission>
  |          <role-name>allowed</role-name>
  |          <constructor>
  |             <constructor-params>
  |                <constructor-param>int</constructor-param>
  |             </constructor-params>
  |          </constructor>
  |       </constructor-permission>
  | 
  |       <exclude-list>
  |          <description>Methods that connect be used</description>
  |          <method>
  |             <method-name>excluded</method-name>
  |          </method>
  |          <field>
  |             <field-name>excludedField</field-name>
  |          </field>
  |          <constructor>
  |             <constructor-params>
  |                <constructor-param>java.lang.String</constructor-param>
  |             </constructor-params>
  |          </constructor>
  |       </exclude-list>
  |    </metadata>
  | 

The packaging of this is

  | aop-test.sar/
  |  |_aop-test.aop/
  |     |_META-INF/
  |        |_jboss-aop.xml

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4002716#4002716

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4002716



More information about the jboss-user mailing list