2 Replies Latest reply on Sep 23, 2003 2:17 AM by juha

    Security Domain Understanding

    terablot

      Hi,

      In jboss.xml of defaul server configuration, I have
      <container-configuration extends="Standard Stateless SessionBean">
      <container-name>Secure Stateless SessionBean</container-name>
      <security-domain>java:/jaas/mydomain</security-domain>
      </container-configuration>


      in login-config.xml, I have

      <application-policy name="jbpm-domain">

      <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
      <module-option name="dsJndiName">java:/DefaultDS</module-option>
      <module-option name="principalsQuery">
      select pw from user where id=?
      </module-option>
      <module-option name="rolesQuery">
      select role, null
      from member m
      where m.user_ = ?
      and m.group_ = 'mydomain'
      </module-option>
      </login-module>

      </application-policy>


      I am wondering, why in login-config.xml application-policy name="jbpm-domain" and in the jboss.xml

      <security-domain>java:/jaas/jbpm-domain</security-domain>

      why not jbpm-domain instead of java:/jaas/jbpm-domain?




      the same things goes with data source, in hsqldb-ds.xml the jndi name is set to DefaultDS but when refering to it like in the login-config.xml

      <module-option name="dsJndiName">java:/DefaultDS</module-option>

      it has to be specified as java:/DefaultDS

      Thanks

        • 1. Re: Security Domain Understanding
          terablot

          Hi,

          could someone kindly point me to any relevant link or docs where i could find the answer. Am i posting in the correct forum?

          Thanks again

          • 2. Re: Security Domain Understanding

            java:/jaas/domain is the full and correct JNDI lookup context, it is not needed in login-config.xml as the security manager is only trying to find the matching Configuration for the domain name, not attempting to do a naming lookup with that name.

            -- Juha