summaryrefslogtreecommitdiff
path: root/taskflow
diff options
context:
space:
mode:
authorAnn Kamyshnikova <akamyshnikova@mirantis.com>2020-03-02 16:41:40 +0400
committerAnn Kamyshnikova <akamyshnikova@mirantis.com>2020-03-06 12:49:58 +0400
commitb46cf94a25d45dd16362ffe7179c7f426c12e097 (patch)
treeb372206a2c6ab5e5c1167dd470c3cc197589ce48 /taskflow
parentfc401959ecedf2b740c3e3156649655c12f2c239 (diff)
downloadtaskflow-b46cf94a25d45dd16362ffe7179c7f426c12e097.tar.gz
Zookeeper backend SSL supportussuri-em4.1.0
Bump kazoo version to 2.6.0 that supports SSL. Allow to configure ssl config options via conf * keyfile * keyfile_password * certfile * use_ssl * verify_certs https://kazoo.readthedocs.io/en/latest/api/client.html#kazoo.client.KazooClient This should be done in conformance with Redis jobboard backend, that already allows SSL settings. Change-Id: Ic2670c3c4caa93f69bc2d541c3701df2b6037d2e
Diffstat (limited to 'taskflow')
-rw-r--r--taskflow/utils/kazoo_utils.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/taskflow/utils/kazoo_utils.py b/taskflow/utils/kazoo_utils.py
index 6ff0ce6..2d856bd 100644
--- a/taskflow/utils/kazoo_utils.py
+++ b/taskflow/utils/kazoo_utils.py
@@ -175,6 +175,13 @@ def make_client(conf):
- ``handler``: a kazoo handler object that can be used to provide the
client with alternate async strategies (the default is `thread`_
based, but `gevent`_, or `eventlet`_ ones can be provided as needed)
+ - ``keyfile`` : SSL keyfile to use for authentication
+ - ``keyfile_password``: SSL keyfile password
+ - ``certfile``: SSL certfile to use for authentication
+ - ``ca``: SSL CA file to use for authentication
+ - ``use_ssl``: argument to control whether SSL is used or not
+ - ``verify_certs``: when using SSL, argument to bypass
+ certs verification
.. _client: https://kazoo.readthedocs.io/en/latest/api/client.html
.. _kazoo: https://kazoo.readthedocs.io/
@@ -191,6 +198,12 @@ def make_client(conf):
'read_only': bool(conf.get('read_only')),
'randomize_hosts': bool(conf.get('randomize_hosts')),
'logger': LOG,
+ 'keyfile': conf.get('keyfile', None),
+ 'keyfile_password': conf.get('keyfile_password', None),
+ 'certfile': conf.get('certfile', None),
+ 'use_ssl': conf.get('use_ssl', False),
+ 'verify_certs': conf.get('verify_certs', True),
+
}
# See: https://kazoo.readthedocs.io/en/latest/api/retry.html
if 'command_retry' in conf: