Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-7968

[Java Broker] [AMQP 1.0] AccessControlException thrown on authorization of connection creation is caught in FrameHandler instead of AMQPConnection_1_0Impl

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: qpid-java-broker-7.0.0
    • Component/s: Broker-J
    • Labels:
      None

      Description

      ACL exception for opening of connection is not handled correctly.
      It is currently caught in FrameHandler and reported as internal error. It should be caught in AMQPConnection and reported back to the client as error "amqp:not-allowed". Here is an exception stack trace

      2017-10-10 11:39:55,590          WARN  [IO-/127.0.0.1:59709] o.a.q.s.p.v.f.FrameHandler Unexpected exception handling frame
      java.security.AccessControlException: Permission PERFORM_ACTION(connect) is denied for : VirtualHost 'test' on VirtualHostNode 'test'
              at org.apache.qpid.server.model.AbstractConfiguredObject.authorise(AbstractConfiguredObject.java:2995)
              at org.apache.qpid.server.model.AbstractConfiguredObject.authorise(AbstractConfiguredObject.java:2929)
              at org.apache.qpid.server.virtualhost.AbstractVirtualHost.authoriseCreateConnection(AbstractVirtualHost.java:1144)
              at org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receiveOpenInternal(AMQPConnection_1_0Impl.java:970)
              at org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receiveOpen(AMQPConnection_1_0Impl.java:886)
              at org.apache.qpid.server.protocol.v1_0.type.transport.Open.invoke(Open.java:274)
              at org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:499)
              at org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.receive(AMQPConnection_1_0Impl.java:481)
              at org.apache.qpid.server.protocol.v1_0.framing.FrameHandler.parse(FrameHandler.java:216)
              at org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.lambda$received$11(AMQPConnection_1_0Impl.java:1320)
              at java.security.AccessController.doPrivileged(Native Method)
              at org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl.received(AMQPConnection_1_0Impl.java:1295)
              at org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:134)
              at org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:593)
              at org.apache.qpid.server.transport.NonBlockingConnectionPlainDelegate.processData(NonBlockingConnectionPlainDelegate.java:58)
              at org.apache.qpid.server.transport.NonBlockingConnection.doRead(NonBlockingConnection.java:483)
              at org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:270)
              at org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:129)
              at org.apache.qpid.server.transport.SelectorThread$ConnectionProcessor.processConnection(SelectorThread.java:563)
              at org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:354)
              at org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:97)
              at org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:521)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:745)
      
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              orudyy Alex Rudyy
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: