Jboss 7.2 Custom login module Ejb invocation error
sketcha May 7, 2013 6:36 AMHi we are using the Jboss 7.2. when i use prediefined configuration with ApplicationRelm, the ejb invocation goes through without any error.
How ever if i make use of my own custom login module, I get below exception
15:52:37,724 ERROR connection:105 - JBREM000200: Remote connection failed: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed
javax.naming.NamingException: Failed to connect to any server. Servers tried: [remote://127.0.0.1:4447]
javax.naming.NamingException: Failed to connect to any server. Servers tried: [remote://127.0.0.1:4447]
at org.jboss.naming.remote.client.HaRemoteNamingStore.failOverSequence(HaRemoteNamingStore.java:200)
at org.jboss.naming.remote.client.HaRemoteNamingStore.namingStore(HaRemoteNamingStore.java:131)
at org.jboss.naming.remote.client.HaRemoteNamingStore.namingOperation(HaRemoteNamingStore.java:112)
at org.jboss.naming.remote.client.HaRemoteNamingStore.lookup(HaRemoteNamingStore.java:223)
at org.jboss.naming.remote.client.RemoteContext.lookup(RemoteContext.java:79)
at org.jboss.naming.remote.client.RemoteContext.lookup(RemoteContext.java:83)
at javax.naming.InitialContext.lookup(Unknown Source)
at Client.main(Client.java:37)
here is my security domain configuration
<security-domain name="ejb-security-domain" cache-type="default">
<authentication>
<login-module code="test.security.auth.spi.ServerLoginModule" flag="required" module="mymodule"/>
</authentication>
</security-domain>
<security-realm name="ApplicationRealm">
<authentication>
<jaas name="ejb-security-domain"/>
<!--local default-user="$local" allowed-users="*"/>
<properties path="application-users.properties" relative-to="jboss.server.config.dir"/>
</authentication>
<authorization>
<properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>
</authorization-->
</authentication>
</security-realm>
if i remove the jaas from ApplicationRealm and retain the commented out part above everything goes fine
Can anybody guide me if i am missing some thing over here
Thanks in advance