8 Replies Latest reply on Mar 5, 2003 5:26 AM by Loic

    jaas login problems

    Loic Newbie

      Hi all,

      I've implemented the jaas security on my web site but when i try to log on i never can access pages. My login- password always refuse. I tried to do it with 4 or 5 different tutorials but never working....
      Does anyone have a link on an ear to look into how it has been done....? or could you send it to me : lfredouille@edieyes.net
      It will be very helpfull for me....

      MANY THANKS for all answers..
      Loic

        • 1. Re: jaas login problems
          Loic Newbie

          I would just precise that i lightest ear will be very good for me... else i put all the part of the security i tried if someone could see the problem...

          in the war jboss-web.xml:

          <?xml version="1.0"?>
          <jboss-web>
          <security-domain>java:/jaas/sitevisatol</security-domain>
          </jboss-web>

          in the war web.xml:

          <security-constraint>
          <web-resource-collection>
          <web-resource-name>Admin</web-resource-name>
          <url-pattern>/*</url-pattern>
          </web-resource-collection>

          <auth-constraint>
          <role-name>Tester</role-name>
          </auth-constraint>
          </security-constraint>

          <login-config>
          <auth-method>BASIC</auth-method>
          <realm-name>sitesecure</realm-name>
          </login-config>

          <security-role>
          <role-name>Tester</role-name>
          </security-role>

          in the jar roles.properties
          test=Tester

          in the jar users.properties
          test=password

          I change the login-config.xml :
          <application-policy name="sitesecure">

          <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="required" />

          <!-- These lines are optional userProperties default to users.properties
          rolesProperties default to roles.properties -->

          <module-option name="usersProperties">users.properties</module-option>
          <module-option name="rolesProperties">roles.properties</module-option>
          <module-option name="unauthenticatedIdentity">nobody</module-option>



          </application-policy>


          On deployement i can see:


          16:46:53,076 INFO [Engine] ContextConfig[/sitesecure]: Added certificates -> request attribute Valve
          16:46:53,108 INFO [Engine] ContextConfig[/sitesecure]: Configured an authenticator for method BASIC
          16:46:53,233 INFO [EmbeddedCatalinaServiceSX] Using Java2 parent classloader delegation: true
          16:46:53,233 INFO [Engine] StandardWrapper[/sitesecure:default]: Loading container servlet default
          16:46:53,248 INFO [Engine] StandardWrapper[/sitesecure:invoker]: Loading container servlet invoker
          16:46:53,264 INFO [MainDeployer] Deployed package: file:/C:/jboss-3.0.4_tomcat-4.0.6/server/default/deploy/sitesecure.ear

          And when i try to connect for the first time with the test password (log/pass) i have that one:

          16:47:15,389 INFO [JaasSecurityManagerService] Created securityMgr=org.jboss.security.plugins.JaasSecurityManager@6721bd
          16:47:15,389 INFO [JaasSecurityManagerService] setCachePolicy, c=org.jboss.util.TimedCachePolicy@d81ec9
          16:47:15,405 INFO [JaasSecurityManagerService] Added sitevisatol, org.jboss.security.plugins.SecurityDomainContext@cd3dd7 to map


          But nothing happens, i always see the login password box....

          Thanks for helping...

          • 2. Re: jaas login problems
            Loic Newbie

            Otherwise,
            Does anyone know a good tutorial to implement the jaas security on Jboss 3.0.4 (I would like to use jaas with hypersonic database to store login password).

            Thanks

            • 3. Re: jaas login problems
              Srinivasu Newbie

              I guess Version 3.0.4 of JBoss has this bug in it. Try using a different version and I guess this should solve your problem.

              Sony

              • 4. Re: jaas login problems
                Srinivasu Newbie

                Version 3.0.4 of JBoss has this bug in it. Try using a different version and I guess this should solve your problem.

                Sony

                • 5. Re: jaas login problems
                  Loic Newbie

                  Thanks for your answer but i think it's not a problem with the version, i try with the version 3.0.2 too and i have the same problem....

                  • 6. Re: jaas login problems
                    Peter Doornbosch Apprentice

                    The name of the security domain ("sitevisatol") in the jboss-web.xml must match the name of the application policy ("sitesecure") in the login-config.xml

                    Hth
                    Peter

                    • 7. Re: jaas login problems
                      Roger Newbie

                      In your jboss-web.xml file you have
                      <security-domain>java:/jaas/sitevisatol</security-domain>
                      I believe this should be
                      <security-domain>java:/jaas/sitesecure</security-domain>

                      Cheers
                      Roger

                      • 8. Re: jaas login problems
                        Loic Newbie

                        thanks for that,
                        i had changed it but the problem is the same.....
                        Nothing still happens when trying to logon