-
15. Re: Custom login module is never called
sfcoy May 22, 2013 10:14 AM (in response to jaikiran)That link is not visible to us plebs...
-
16. Re: Custom login module is never called
massassa May 22, 2013 10:24 AM (in response to jaikiran)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 May 22, 2013 10:22 AM (in response to massassa)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 May 22, 2013 10:31 AM (in response to jaikiran)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 May 22, 2013 10:46 AM (in response to sfcoy)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 May 22, 2013 10:49 AM (in response to jaikiran)The AS7 dev forum is completely invisible.
-
21. Re: Custom login module is never called
massassa May 23, 2013 5:42 AM (in response to jaikiran)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:
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 May 23, 2013 6:03 AM (in response to massassa)Can you print a stacktrace when you have that breakpoint and post that stacktrace here?
-
23. Re: Custom login module is never called
massassa May 23, 2013 6:13 AM (in response to jaikiran)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 May 23, 2013 12:03 PM (in response to massassa)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 Jun 5, 2013 11:45 AM (in response to pweldon)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 Aug 7, 2013 11:05 AM (in response to 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: