1 2 Previous Next 26 Replies Latest reply on Aug 7, 2013 11:05 AM by massassa Go to original post
      • 15. Re: Custom login module is never called
        sfcoy

        That link is not visible to us plebs...

        • 16. Re: Custom login module is never called
          massassa

          Thanks for your reply but I can't access the link you provided in your post. Probably I have insuffcient privileges?

          • 17. Re: Custom login module is never called
            jaikiran

            Moaffak Assassa wrote:

             

            Thanks for your reply but I can't access the link you provided in your post. Probably I have unsuffcient privileges?

            Can you try now? I have edited my previous post to update that link. It had a minor issue but I don't see why it should have prevented access to the thread.

            • 18. Re: Custom login module is never called
              sfcoy

              It says (still):

               

              Unauthorized

               

               


              It appears you're not allowed to view what you requested. You might contact your administrator if you think this is a mistake.

               

              • 19. Re: Custom login module is never called
                jaikiran

                That's weird. That threads resides in the AS7 dev forum which no longer allows new discussions. But it shouldn't be causing this problem. I'm able to view that post/thread and other threads in there. I'll check with the .org team on what's going on.

                • 20. Re: Custom login module is never called
                  sfcoy

                  The AS7 dev forum is completely invisible.

                  • 21. Re: Custom login module is never called
                    massassa

                    Ok, so the link works now. I've had a look and it was an interesting discussion. I tried to add the module-attribute as adviced and ended up with the following:

                     

                    <login-module code="org.jboss7app.ejb.MyLoginModule" flag="required" module="deployment.jboss7app.ear.jboss7app.ejb.jar">

                         <module-option name="usersProperties" value="${jboss.server.config.dir}/my-users.properties"/>

                         <module-option name="rolesProperties" value="${jboss.server.config.dir}/my-roles.properties"/>

                    </login-module>

                     

                    My jboss7app.ear file looks like this:

                    2013-05-23 11_40_18-C__Users_moaffak_git_sandbox_jboss7app_ear_target_jboss7app.ear_.png

                     

                    But still no success. I added a break point to the JaasCallbackHandler at line 134 to see the exception that is caught there. Obviously my class cannot be loaded and therefore it is not called.

                    • 22. Re: Custom login module is never called
                      jaikiran

                      Can you print a stacktrace when you have that breakpoint and post that stacktrace here?

                      • 23. Re: Custom login module is never called
                        massassa

                        Sure. Here's the stacktrace:

                         

                        javax.security.auth.login.LoginException: LoginModule-Klasse kann nicht gefunden werden: org.jboss7app.ejb.MyLogin Module from [Module "org.jboss.as.remoting:main" from local module loader @469bc (roots: C:\java\jboss-as-7.1.1.Final\modules)]

                               at javax.security.auth.login.LoginContext.invoke(LoginContext.java:822)

                               at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203)

                               at javax.security.auth.login.LoginContext$4.run(LoginContext.java:698)

                               at javax.security.auth.login.LoginContext$4.run(LoginContext.java:696)

                               at java.security.AccessController.doPrivileged(Native Method)

                               at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:695)

                               at javax.security.auth.login.LoginContext.login(LoginContext.java:594)

                               at org.jboss.as.domain.management.security.JaasCallbackHandler.handle(JaasCallbackHandler.java:126)

                               at org.jboss.as.remoting.RealmSecurityProvider$RealmCallbackHandler.handle(RealmSecurityProvider.java:418)

                               at org.jboss.sasl.util.AbstractSaslParticipant.tryHandleCallbacks(AbstractSaslParticipant.java:98)

                               at org.jboss.sasl.util.AbstractSaslParticipant.handleCallbacks(AbstractSaslParticipant.java:83)

                               at org.jboss.sasl.plain.PlainSaslServer.access$000(PlainSaslServer.java:41)

                               at org.jboss.sasl.plain.PlainSaslServer$1.evaluateMessage(PlainSaslServer.java:95)

                               at org.jboss.sasl.util.AbstractSaslParticipant.evaluateMessage(AbstractSaslParticipant.java:165)

                               at org.jboss.sasl.util.AbstractSaslServer.evaluateResponse(AbstractSaslServer.java:56)

                               at org.xnio.sasl.SaslUtils.evaluateResponse(SaslUtils.java:194)

                               at org.jboss.remoting3.remote.ServerConnectionOpenListener$AuthStepRunnable.run(ServerConnectionOpenListener.java:407)

                               at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

                               at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

                               at java.lang.Thread.run(Thread.java:722)

                        • 24. Re: Custom login module is never called
                          pweldon

                          Check the logs for the client, the failure is most probably recorded there. This thread may help: https://community.jboss.org/thread/200058. I was never able to create a deployable custom login module, and settled for adding it as a module to jboss (but that may not be an option for you).

                          • 25. Re: Custom login module is never called
                            massassa

                            Is there any chance that a deployable login module can be called in AS 7.2?

                            • 26. Re: Custom login module is never called
                              massassa

                              The problem is solved in AS7.2/EAP 6.1.

                               

                              It works out of the box using the following login-module-confuguration:

                               

                              <login-module code="org.myApp.security.jaas.MyLoginModule" flag="required" module="deployment.myApp.ear">

                               

                              In case you are wondering why there's no AS7.2 you might want to read this:

                              http://www.jboss.org/jbossas/faq

                              1 2 Previous Next