summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp/src/tests')
-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
#=====================================