Repository: qpid-dispatch Updated Branches: refs/heads/master 2def0a9b4 -> c32c79c34
DISPATCH-737 - Set the sasl_enabled flag so that SASL exchange does not happen when not necessary Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/c32c79c3 Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/c32c79c3 Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/c32c79c3 Branch: refs/heads/master Commit: c32c79c34d5443a0386e2508c2939f260214f62e Parents: 2def0a9 Author: Ganesh Murthy <gmur...@redhat.com> Authored: Fri Jul 14 16:08:10 2017 -0400 Committer: Ganesh Murthy <gmur...@redhat.com> Committed: Fri Jul 14 16:08:10 2017 -0400 ---------------------------------------------------------------------- python/qpid_dispatch/management/client.py | 6 ++++++ tests/system_tests_user_id.py | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/c32c79c3/python/qpid_dispatch/management/client.py ---------------------------------------------------------------------- diff --git a/python/qpid_dispatch/management/client.py b/python/qpid_dispatch/management/client.py index f3a7ee3..f50cf53 100644 --- a/python/qpid_dispatch/management/client.py +++ b/python/qpid_dispatch/management/client.py @@ -86,10 +86,16 @@ class Node(object): else: url.path = u'$management' + if ssl_domain: + sasl_enabled = True + else: + sasl_enabled = True if sasl else False + # if sasl_mechanism is unicode, convert it to python string return BlockingConnection(url, timeout=timeout, ssl_domain=ssl_domain, + sasl_enabled=sasl_enabled, allowed_mechs=str(sasl.mechs) if sasl else None, user=str(sasl.user) if sasl else None, password=str(sasl.password) if sasl else None) http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/c32c79c3/tests/system_tests_user_id.py ---------------------------------------------------------------------- diff --git a/tests/system_tests_user_id.py b/tests/system_tests_user_id.py index 789fb71..e62f311 100644 --- a/tests/system_tests_user_id.py +++ b/tests/system_tests_user_id.py @@ -295,10 +295,11 @@ class QdSSLUseridTest(TestCase): user = node.query(type='org.apache.qpid.dispatch.connection', attribute_names=[u'user']).results[10][0] self.assertEqual("C=US,ST=NC,L=Raleigh,OU=Dev,O=Client,CN=127.0.0.1", str(user)) + # authenticatePeer is set to 'no' in this listener, there should be no user on the connection. addr = self.address(11).replace("amqp", "amqps") node = Node.connect(addr) user = node.query(type='org.apache.qpid.dispatch.connection', attribute_names=[u'user']).results[11][0] - self.assertEqual("anonymous", user) + self.assertEqual(None, user) addr = self.address(12).replace("amqp", "amqps") node = Node.connect(addr, ssl_domain=domain) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org