10 Replies Latest reply on Aug 3, 2002 1:11 PM by dmitry_ame

    DatabaseServerLoginModule with 3.0?

    bigcanoftuna

      Has anyone gotten DatabaseServerLoginModule working with 3.0? That is all I need to know!

        • 1. Re: DatabaseServerLoginModule with 3.0?
          mjeffrey

          Yes. We have it working. I suggest you take a look at the source code to understand it, but it works as documented.

          regards,
          Mark

          • 2. Re: DatabaseServerLoginModule with 3.0?
            blipa

            Sounds good, but how do you get it working as documented?

            • 3. Re: DatabaseServerLoginModule with 3.0?
              mmoore303

              Pretty much works the same as Jboss 2.x - you just need to add an entry to login-config.xml something like:

              <application-policy name="database">

              <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
              <module-option name="dsJndiName">java:/AgiluxRealm</module-option>
              <module-option name="principalsQuery">select user_pass from user where user_name=?</module-option>
              <module-option name="rolesQuery">select role_name, role_group from user_roles where user_name=?</module-option>
              <module-option name="unauthenticatedIdentity">nobody</module-option>
              </login-module>

              </application-policy>

              • 4. Re: DatabaseServerLoginModule with 3.0?
                l.g.

                The example from JBoss oracle-service.xml (and the rest examples) is different:
                ===========================================
                <application-policy name = "OracleDbRealm">

                <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
                <module-option name = "principal">yourprincipal</module-option>
                <module-option name = "userName">yourusername</module-option>
                <module-option name = "password">yourpassword</module-option>
                <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=OracleDS</module-option>
                </login-module>

                </application-policy>
                =========================================
                The problem is: it does not work :-(

                Anybody knows why it does not work?!

                TIA

                • 5. Re: DatabaseServerLoginModule with 3.0?
                  l.g.

                  There is an example /doc/examples/jca/oracle-service.xml

                  <!-- Include a login module configuration named OracleDbRealm.
                  Update your login-conf.xml, here is an example for a
                  ConfiguredIdentityLoginModule:

                  <application-policy name = "OracleDbRealm">

                  <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
                  <module-option name = "principal">yourprincipal</module-option>
                  <module-option name = "userName">yourusername</module-option>
                  <module-option name = "password">yourpassword</module-option>
                  <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=OracleDS</module-option>
                  </login-module>

                  </application-policy>

                  The problem is: it's not working. (Well, at list for me) :-(

                  Is anybody can post (attach) login-config.xml, web.xml, jboss-web.xml, etc. files related to DatabaseServerLoginModule.

                  TIA.

                  • 6. Re: DatabaseServerLoginModule with 3.0?
                    l.g.

                    There is an example /doc/examples/jca/oracle-service.xml

                    <!-- Include a login module configuration named OracleDbRealm.
                    Update your login-conf.xml, here is an example for a
                    ConfiguredIdentityLoginModule:

                    <application-policy name = "OracleDbRealm">

                    <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
                    <module-option name = "principal">yourprincipal</module-option>
                    <module-option name = "userName">yourusername</module-option>
                    <module-option name = "password">yourpassword</module-option>
                    <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=OracleDS</module-option>
                    </login-module>

                    </application-policy>

                    The problem is: it's not working. (Well, at list for me) :-(

                    Is anybody can post (attach) login-config.xml, web.xml, jboss-web.xml, etc. files related to DatabaseServerLoginModule.

                    TIA.

                    • 7. Re: DatabaseServerLoginModule with 3.0?
                      l.g.

                      Sorry, to many posts - it's related to forum bug, I think.

                      • 8. Re: DatabaseServerLoginModule with 3.0?
                        mmoore303

                        You do need the 'application-policy' section that uses org.jboss.resource.security.ConfiguredIdentityLoginModule (as you posted) This section authenticates you to the database server with the granted privledges.

                        For J2EE authentication, you need the DatabaseServerLoginModule also entered into the same login-config.xml file. (See my earlier post for how this should look.) I know there are some other threads that provided some good example config's.

                        Mike M.

                        • 9. Re: DatabaseServerLoginModule with 3.0?
                          dmitry_ame

                          Mike,

                          it seems that you've got it working, would it be possible for you to post here your login-config.xml, jboss-service.xml and perhaps your oracle-service.xml, not just fragments of them but the full version.

                          You gave a greate axplanation of what the DatabaseServerLoginModule and ConfiguredIdentityLoginModule are there for, it's still hard to put all the things together and make it work without good example. It would be also helpfull to see (just in case) you web.xml and jboss-web.xml.

                          Dmitry A.

                          • 10. Re: DatabaseServerLoginModule with 3.0?
                            dmitry_ame