You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by or...@apache.org on 2017/10/10 15:04:27 UTC

qpid-broker-j git commit: QPID-7968: [Java Broker][AMQP 1.0] Propagate ACL error message back to the client on authorisation failure

Repository: qpid-broker-j
Updated Branches:
  refs/heads/master 4889eac08 -> 332a3c08c


QPID-7968: [Java Broker][AMQP 1.0] Propagate ACL error message back to the client on authorisation failure


Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/332a3c08
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/332a3c08
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/332a3c08

Branch: refs/heads/master
Commit: 332a3c08c14705ebab2853ab2e58f2f64a24f409
Parents: 4889eac
Author: Alex Rudyy <or...@apache.org>
Authored: Tue Oct 10 15:53:07 2017 +0100
Committer: Alex Rudyy <or...@apache.org>
Committed: Tue Oct 10 16:04:20 2017 +0100

----------------------------------------------------------------------
 .../qpid/server/protocol/v1_0/AMQPConnection_1_0Impl.java      | 6 +-----
 .../org/apache/qpid/server/security/acl/MessagingACLTest.java  | 5 +++++
 2 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/332a3c08/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/AMQPConnection_1_0Impl.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/AMQPConnection_1_0Impl.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/AMQPConnection_1_0Impl.java
index dbc2f3e..e239c19 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/AMQPConnection_1_0Impl.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/AMQPConnection_1_0Impl.java
@@ -991,11 +991,7 @@ public class AMQPConnection_1_0Impl extends AbstractAMQPConnection<AMQPConnectio
                         }
                     }
                 }
-                catch (AccessControlException e)
-                {
-                    closeConnection(AmqpError.NOT_ALLOWED, "Connection refused");
-                }
-                catch (VirtualHostUnavailableException e)
+                catch (VirtualHostUnavailableException | AccessControlException e)
                 {
                     closeConnection(AmqpError.NOT_ALLOWED, e.getMessage());
                 }

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/332a3c08/systests/src/test/java/org/apache/qpid/server/security/acl/MessagingACLTest.java
----------------------------------------------------------------------
diff --git a/systests/src/test/java/org/apache/qpid/server/security/acl/MessagingACLTest.java b/systests/src/test/java/org/apache/qpid/server/security/acl/MessagingACLTest.java
index 5b4bb2d..8913baa 100644
--- a/systests/src/test/java/org/apache/qpid/server/security/acl/MessagingACLTest.java
+++ b/systests/src/test/java/org/apache/qpid/server/security/acl/MessagingACLTest.java
@@ -70,6 +70,11 @@ public class MessagingACLTest extends AbstractACLTestCase
     {
         assertTrue("Unexpected exception message:" + e.getMessage(),
                    e.getMessage().contains("Permission PERFORM_ACTION(connect) is denied"));
+        if (isBroker10())
+        {
+            assertTrue("Unexpected error condition reported:" + e.getMessage(),
+                       e.getMessage().contains("amqp:not-allowed"));
+        }
     }
 
     public void setUpAccessVirtualHostWithName() throws Exception


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org