15.6.9.2. Configuration

The configuration for RuleBasedPermissionResolver requires that a Drools rule base is first configured in components.xml. By default, it expects the rule base to be named securityRules, as per the following example:
<components xmlns="http://jboss.com/products/seam/components"
            xmlns:core="http://jboss.com/products/seam/core"
            xmlns:security="http://jboss.com/products/seam/security"
            xmlns:drools="http://jboss.com/products/seam/drools"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation=
              "http://jboss.com/products/seam/core 
               http://jboss.com/products/seam/core-2.2.xsd
               http://jboss.com/products/seam/components 
               http://jboss.com/products/seam/components-2.2.xsd
               http://jboss.com/products/seam/drools 
               http://jboss.com/products/seam/drools-2.2.xsd
               http://jboss.com/products/seam/security 
               http://jboss.com/products/seam/security-2.2.xsd">
  
  <drools:rule-base name="securityRules">
    <drools:rule-files>
      <value>/META-INF/security.drl</value>
    </drools:rule-files>
  </drools:rule-base>
  
</components>
The default rule base name can be overridden by specifying the security-rules property for RuleBasedPermissionResolver:
 
<security:rule-based-permission-resolver 
          security-rules="#{prodSecurityRules}"/>
Once the RuleBase component is configured, you must write the security rules.