From d8d247cf054414af090e6d2a9dbb5a299158bb69 Mon Sep 17 00:00:00 2001 From: "Charles E. Rolke" Date: Mon, 8 Apr 2013 18:40:34 +0000 Subject: QPID-4727:C++ Broker ACL keyword to reference default exchange. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1465719 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/tests/acl.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'qpid/cpp/src/tests') diff --git a/qpid/cpp/src/tests/acl.py b/qpid/cpp/src/tests/acl.py index 94ede22783..a8861db170 100755 --- a/qpid/cpp/src/tests/acl.py +++ b/qpid/cpp/src/tests/acl.py @@ -1532,6 +1532,7 @@ class ACLTests(TestBase010): aclf.write('acl deny bob@QPID publish exchange name=amq.direct routingkey=rk1\n') aclf.write('acl deny bob@QPID publish exchange name=amq.topic\n') aclf.write('acl deny bob@QPID publish exchange name=myEx routingkey=rk2\n') + aclf.write("acl deny bob@QPID publish exchange name=amq.default routingkey=restricted\n") aclf.write('acl allow all all') aclf.close() @@ -1572,6 +1573,10 @@ class ACLTests(TestBase010): if (403 == e.args[0].error_code): self.fail("ACL should allow message transfer to exchange amq.direct with routing key rk2"); + self.LookupPublish("bob@QPID", "", "restricted", "deny") + self.LookupPublish("bob@QPID", "", "another", "allow") + self.LookupPublish("joe@QPID", "", "restricted", "allow") + def test_publish_acl_deny_mode(self): """ @@ -1582,6 +1587,7 @@ class ACLTests(TestBase010): aclf.write('acl allow bob@QPID publish exchange name=amq.topic\n') aclf.write('acl allow bob@QPID publish exchange name=myEx routingkey=rk2\n') aclf.write('acl allow bob@QPID create exchange\n') + aclf.write("acl allow bob@QPID publish exchange name=amq.default routingkey=unrestricted\n") aclf.write('acl allow anonymous all all \n') aclf.write('acl deny all all') aclf.close() @@ -1629,6 +1635,11 @@ class ACLTests(TestBase010): if (403 == e.args[0].error_code): self.fail("ACL should allow message transfer to exchange amq.direct with routing key rk1"); + self.LookupPublish("bob@QPID", "", "unrestricted", "allow") + self.LookupPublish("bob@QPID", "", "another", "deny") + self.LookupPublish("joe@QPID", "", "unrestricted", "deny") + + #===================================== # ACL broker configuration tests #===================================== -- cgit v1.2.1