EJB client is failing in authentication if password character size is more than 8192 bytes

Solution Verified - Updated -

Issue

EJB client is failing in authentication if password character contains more than 8192 bytes.

Client log

2020-06-29 12:44:14,520 ERROR [org.jboss.threads.errors] Thread Thread[XNIO-1 task-1,5,main] threw an uncaught exception: java.nio.BufferOverflowException
    at java.nio.DirectByteBuffer.put(DirectByteBuffer.java:362)
    at java.nio.ByteBuffer.put(ByteBuffer.java:859)
    at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.lambda$handleEvent$1(ClientConnectionOpenListener.java:478)
    at org.jboss.remoting3.EndpointImpl$TrackingExecutor.lambda$execute$0(EndpointImpl.java:991)
    at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1348)
    at java.lang.Thread.run(Thread.java:748)

Server.log

2020-08-06 22:46:51,208 TRACE [io.undertow.request] (default I/O-12) Opened connection with /127.0.0.1:37798
2020-08-06 22:46:51,226 DEBUG [io.undertow.request] (default I/O-12) Upgrading request HttpServerExchange{ GET /}
2020-08-06 22:46:51,226 TRACE [io.undertow.server.HttpServerExchange] (default I/O-12) Starting to write response for HttpServerExchange{ GET /}
2020-08-06 22:46:51,227 TRACE [org.jboss.remoting.remote.connection] (default I/O-12) Initialized connection from /127.0.0.1:37798 to /127.0.0.1:18080 with options {org.xnio.Options.TCP_NODELAY=>true,org.jboss.remoting3.RemotingOptions.SASL_PROTOCOL=>remote,org.xnio.Options.REUSE_ADDRESSES=>true}
2020-08-06 22:46:51,227 TRACE [org.jboss.remoting.remote.connection] (default I/O-12) Accepted connection from /127.0.0.1:37798 to sidde.pnq.csb/127.0.0.1:18080
2020-08-06 22:46:51,227 TRACE [org.jboss.remoting.remote] (default I/O-12) Setting read listener to org.jboss.remoting3.remote.ServerConnectionOpenListener$Initial@61ade9f6
2020-08-06 22:46:51,227 TRACE [org.jboss.remoting.remote.connection] (default I/O-12) Sent 20 bytes
2020-08-06 22:46:51,228 TRACE [org.jboss.remoting.remote.connection] (default I/O-12) Flushed channel
2020-08-06 22:46:51,244 TRACE [org.jboss.remoting.remote.connection] (default I/O-12) No buffers in queue for message header
2020-08-06 22:46:51,244 TRACE [org.jboss.remoting.remote.connection] (default I/O-12) Allocated fresh buffers
2020-08-06 22:46:51,244 TRACE [org.jboss.remoting.remote.connection] (default I/O-12) Received 51 bytes
2020-08-06 22:46:51,244 TRACE [org.jboss.remoting.remote.connection] (default I/O-12) Received message java.nio.HeapByteBuffer[pos=0 lim=47 cap=8192]
2020-08-06 22:46:51,244 TRACE [org.jboss.remoting.remote.server] (default I/O-12) Received java.nio.HeapByteBuffer[pos=0 lim=47 cap=8192]
2020-08-06 22:46:51,245 TRACE [org.jboss.remoting.remote.server] (default I/O-12) Server received capabilities request
2020-08-06 22:46:51,245 TRACE [org.jboss.remoting.remote.server] (default I/O-12) Server received capability: version 1
2020-08-06 22:46:51,245 TRACE [org.jboss.remoting.remote.server] (default I/O-12) Server received capability: message close protocol supported
2020-08-06 22:46:51,245 TRACE [org.jboss.remoting.remote.server] (default I/O-12) Server received capability: remote version is "5.0.18.Final-redhat-00001"
2020-08-06 22:46:51,245 TRACE [org.jboss.remoting.remote.server] (default I/O-12) Server received capability: remote channels in is "40"; resulting max outbound channels value is "40"
2020-08-06 22:46:51,245 TRACE [org.jboss.remoting.remote.server] (default I/O-12) Server received capability: remote channels out is "40"; resulting max inbound channels value is "40"
2020-08-06 22:46:51,245 TRACE [org.jboss.remoting.remote.server] (default I/O-12) Server received capability: authentication service
2020-08-06 22:46:51,245 TRACE [org.jboss.remoting.remote.server] (default I/O-12) No EXTERNAL mechanism due to lack of SSL
2020-08-06 22:46:51,246 TRACE [org.jboss.remoting.remote.server] (default I/O-12) Added mechanism PLAIN
2020-08-06 22:46:51,246 TRACE [org.jboss.remoting.remote.connection] (default I/O-12) Sent 65 bytes
2020-08-06 22:46:51,246 TRACE [org.jboss.remoting.remote.connection] (default I/O-12) Flushed channel

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.x (up to 7.3.3)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content