3 Replies Latest reply on Dec 27, 2006 2:56 PM by anil.saldhana

    Tomcat MemoryRealm

    justin_sane

      I have a project in Tomcat 5.5 that i want to migrate to JBoss.
      I have an authentication using tomcat's default MemoryRealm (conf/tomcat-users.xml).
      Is there anyway that I can implement this whitin JBoss or do I have to redefine it, and use JAAS?

        • 1. Re: Tomcat MemoryRealm
          anil.saldhana

          Just provide two properties files under the conf directory.

          users.properties
          the following format:
          username=passwd

          roles.properties
          username=role1,role2

          Tell me if that works.

          • 2. Re: Tomcat MemoryRealm
            justin_sane

            And how do I define the realm?

            In jboss\server\default\conf\login-config.xml, like:
            <application-policy name="userDatabase">

            <login-module code="org.apache.catalina.users.MemoryUserDatabaseFactory" flag="required">
            <module-option name="usersProperties">props/users.properties</module-option>
            <module-option name="rolesProperties">props/roles.properties</module-option>
            </login-module>

            </application-policy>

            Or just copy/past what I had in conf/server.xml in Tomcat alone?

            • 3. Re: Tomcat MemoryRealm
              anil.saldhana

              You do not have to define anything. Basically the security domain defaults to "other" which has a UserRolesLoginModule which by default looks for these properties files.