JBoss Community

Re: remote ejb client username is encrypted at the server(JBOSS7.1 CR1)

created by apparaonali in JBoss AS 7 Development - View the full discussion

Thanks for the suggestions and with these suggestions it went ahead, I am getting below errors(Underlined) at server side while accessing the secured ejb. Now user name and password are getting passed to server, however password is not matching. Same database was working for jboss6.

 

13:38:17,435 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] (Remoting "alh-anxp-dt" task-1) initialize
13:38:17,435 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] (Remoting "alh-anxp-dt" task-1) Security domain: AppuLogin
13:38:17,435 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] (Remoting "alh-anxp-dt" task-1) Password hashing activated: algorithm = SHA-256, encoding = base64, charset = {default}, callback = null, storeCallback = null
13:38:17,435 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] (Remoting "alh-anxp-dt" task-1) DatabaseServerLoginModule, dsJndiName=java:/jdbc/IceCube
13:38:17,451 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] (Remoting "alh-anxp-dt" task-1) principalsQuery=select password from sessionuser where name=?
13:38:17,451 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] (Remoting "alh-anxp-dt" task-1) rolesQuery=select role, 'Roles' from sessionrole where name=?
13:38:17,451 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] (Remoting "alh-anxp-dt" task-1) suspendResume=true
13:38:17,451 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] (Remoting "alh-anxp-dt" task-1) login
13:38:17,451 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] (Remoting "alh-anxp-dt" task-1) suspendAnyTransaction
13:38:17,451 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] (Remoting "alh-anxp-dt" task-1) Excuting query: select password from sessionuser where name=?, with username: admin
13:38:17,545 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] (Remoting "alh-anxp-dt" task-1) Obtained user password
13:38:17,545 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] (Remoting "alh-anxp-dt" task-1) resumeAnyTransaction
13:38:17,545 DEBUG [org.jboss.security.auth.spi.DatabaseServerLoginModule] (Remoting "alh-anxp-dt" task-1) Bad password for username=admin
13:38:17,545 TRACE [org.jboss.security.auth.spi.DatabaseServerLoginModule] (Remoting "alh-anxp-dt" task-1) abort

 

 



I am getting below exceptions at client side.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Feb 22, 2012 1:38:17 PM org.jboss.remoting3.remote.RemoteConnection handleException
ERROR: JBREM000200: Remote connection failed: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed
Feb 22, 2012 1:38:17 PM org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector setupEJBReceivers
WARN: Could not register a EJB receiver for connection to remote://localhost:4447
java.lang.RuntimeException: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed
at org.jboss.ejb.client.remoting.IoFutureHelper.get(IoFutureHelper.java:91)
at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.setupEJBReceivers(ConfigBasedEJBClientContextSelector.java:115)
at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.<init>(ConfigBasedEJBClientContextSelector.java:77)
at org.jboss.ejb.client.EJBClientContext.<clinit>(EJBClientContext.java:76)
at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:120)
at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)
at $Proxy0.getPrincipal(Unknown Source)
at demo.RemoteEJBClient.invokeStatelessBean(RemoteEJBClient.java:73)
at demo.RemoteEJBClient.main(RemoteEJBClient.java:65)
Caused by: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed
at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:315)
at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:214)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72)
at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:189)
at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:103)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72)
at org.xnio.nio.NioHandle.run(NioHandle.java:90)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:184)
at ...asynchronous invocation...(Unknown Source)
at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:270)
at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:251)
at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:349)
at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:333)
at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.setupEJBReceivers(ConfigBasedEJBClientContextSelector.java:113)
... 7 more
java.lang.IllegalStateException: No EJB receiver available for handling [appName:TestEAR,modulename:TestEJB,distinctname:] combination
at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:530)
at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:84)
at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:175)
at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136)
at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121)
at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)
at $Proxy0.getPrincipal(Unknown Source)
at demo.RemoteEJBClient.invokeStatelessBean(RemoteEJBClient.java:73)
at demo.RemoteEJBClient.main(RemoteEJBClient.java:65)

 

My test details: Added below bold proprties for management realm

 

jboss-ejb-client.properties:

 

endpoint.name=client-endpoint
remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false
remote.connections=default
remote.connection.default.host=localhost
remote.connection.default.port = 4447
remote.connection.default.username=admin
remote.connection.default.password=admin
remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT=false
remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
remote.connection.default.connect.options.org.xnio.Options.SASL_DISALLOWED_MECHANISMS=JBOSS-LOCAL-USER

 

Reply to this message by going to Community

Start a new discussion in JBoss AS 7 Development at Community