You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Martin Ritchie (JIRA)" <qp...@incubator.apache.org> on 2007/01/15 17:59:27 UTC

[jira] Commented: (QPID-292) Authentication failures are not properly handled

    [ https://issues.apache.org/jira/browse/QPID-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12464856 ] 

Martin Ritchie commented on QPID-292:
-------------------------------------

If client authentication fails broker logs (line ConnectionSecureOkMethodHandler:76)
                _logger.info("Authentication failed");
                stateManager.changeState(AMQState.CONNECTION_CLOSING);

                AMQFrame close = ConnectionCloseBody.createAMQFrame(0,
                    (byte)8, (byte)0,	// AMQP version (major, minor)
                    ConnectionCloseBody.getClazz((byte)8, (byte)0),		// classId
                    ConnectionCloseBody.getMethod((byte)8, (byte)0),	// methodId
                    AMQConstant.NOT_ALLOWED.getCode(),	// replyCode
                    AMQConstant.NOT_ALLOWED.getName());	// replyText
                protocolSession.writeFrame(close);
                disposeSaslServer(protocolSession);

And then proceeds to close the connection with a not_allowed error code. This is or was properly propogated to the clients the test is currently not possible as the inVM broker doesn't do authentication.. see QPID-70

> Authentication failures are not properly handled
> ------------------------------------------------
>
>                 Key: QPID-292
>                 URL: https://issues.apache.org/jira/browse/QPID-292
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker, Java Client
>    Affects Versions: M1
>         Environment: Any
>            Reporter: Robert Greig
>
> If the client passes invalid credentials, the broker does not send a useful response back to the client.
> In fact the client appears to hang and the broker shows this stack trace:
> 2007-01-14 15:19:19,159 INFO  [pool-3-thread-1] handler.ConnectionSecureOkMethod
> Handler (ConnectionSecureOkMethodHandler.java:76) - Authentication failed
> 2007-01-14 15:19:19,169 INFO  [SocketAcceptorIoProcessor-0.1] protocol.AMQPFastP
> rotocolHandler (AMQPFastProtocolHandler.java:135) - Protocol Session closed
> 2007-01-14 15:19:19,169 INFO  [SocketAcceptorIoProcessor-0.1] pool.PoolingFilter
>  (PoolingFilter.java:174) - Destroy called on PoolingFilter AsynchronousWriteFil
> ter
> 2007-01-14 15:19:19,169 INFO  [SocketAcceptorIoProcessor-0.1] pool.PoolingFilter
>  (PoolingFilter.java:174) - Destroy called on PoolingFilter AsynchronousReadFilt
> er
> 2007-01-14 15:19:19,189 ERROR [pool-3-thread-3] protocol.AMQPFastProtocolHandler
>  (AMQPFastProtocolHandler.java:186) - Exception caught inAMQProtocolSession(/127
> .0.0.1:1533), closing session explictly: java.lang.IllegalStateException: Handed
>  undecoded ByteBuffer buf = HeapBuffer[pos=0 lim=12 cap=32768: 01 00 00 00 00 00
>  04 00 0A 00 3D CE]
> java.lang.IllegalStateException: Handed undecoded ByteBuffer buf = HeapBuffer[po
> s=0 lim=12 cap=32768: 01 00 00 00 00 00 04 00 0A 00 3D CE]
>         at org.apache.qpid.server.protocol.AMQPFastProtocolHandler.messageReceiv
> ed(AMQPFastProtocolHandler.java:208)
>         at org.apache.mina.common.support.AbstractIoFilterChain$2.messageReceive
> d(AbstractIoFilterChain.java:189)
>         at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageR
> eceived(AbstractIoFilterChain.java:502)
>         at org.apache.mina.common.support.AbstractIoFilterChain.access$1000(Abst
> ractIoFilterChain.java:52)
>         at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.mess
> ageReceived(AbstractIoFilterChain.java:777)
>         at org.apache.qpid.pool.Event$ReceivedEvent.process(Event.java:55)
>         at org.apache.qpid.pool.Job.processAll(Job.java:81)
>         at org.apache.qpid.pool.Job.run(Job.java:103)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
> utor.java:650)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
> .java:675)
>         at java.lang.Thread.run(Thread.java:595)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira