6 Replies Latest reply on Apr 1, 2014 2:34 AM by urml

    Setting security-domain via jboss-web.xml


      Hello together,


      i have a little problem by setting up my new wildfly server.

      The problem is about specifying the security domain via the jboss-web.xml-file.


      In the jboss-web.xml there is the following content:


      While in the standalone.xml I have the following content:

      <subsystem xmlns="urn:jboss:domain:security:1.2">
              <security-domain name="accd-web-domain" cache-type="default">
                      <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
                          <module-option name="dsJndiName" value="java:/accd"/>
                          <module-option name="principalsQuery" value="SELECT 'pass' FROM PA WHERE LENGTH(?) > 0"/>
                          <module-option name="rolesQuery" value="SELECT 'RO', 'Roles' FROM PA WHERE LENGTH(?) > 0"/>

      (the other security-domains where cut out here for shortening the post)


      Under Jboss 7.1 there was no problem, so that we could specify the security-domain via the jboss-web.xml.

      But now with wildfly 8.0 it seems that the value passed by jboss-web.xml is totally ignored - the default-security-domain (set in standalone.xml) is used every time.


      When setting

      <default-security-domain value="other"/>


      <default-security-domain value="accd-web-domain"/>

      the authentification works fine.


      So is there a point I maybe missed? Or why is wildfly 8 ignoring the value set via the jboss-xml?

      As we need to set the security-domain for each project, how could we solve that in wildfly 8 if it is not working like the way it does in Jboss 7?


      Thank you for your help