summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/acl.py
diff options
context:
space:
mode:
authorCharles E. Rolke <chug@apache.org>2013-04-08 18:40:34 +0000
committerCharles E. Rolke <chug@apache.org>2013-04-08 18:40:34 +0000
commitd8d247cf054414af090e6d2a9dbb5a299158bb69 (patch)
treeaca9766a049f594d5b4af2cb3fa073a4ceb4d827 /qpid/cpp/src/tests/acl.py
parent797fcaf14ca1bfeb5778cbe526b3110f256862f2 (diff)
downloadqpid-python-d8d247cf054414af090e6d2a9dbb5a299158bb69.tar.gz
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
Diffstat (limited to 'qpid/cpp/src/tests/acl.py')
-rwxr-xr-xqpid/cpp/src/tests/acl.py11
1 files changed, 11 insertions, 0 deletions
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
#=====================================