From ae5dbf0fc07967418f2b20099f7d8e8ce839c10e Mon Sep 17 00:00:00 2001 From: Victor Chembaev Date: Tue, 3 Dec 2024 22:06:17 +0200 Subject: [PATCH] Add ability to pass client tls certificate Add ablity to pass client tls certificate to make mTLS connection to OpenStack provider. Closes-Bug: #2090953 Change-Id: I33ef38c830309cf4f9fae11c8403fb4e616cf315 --- plugins/module_utils/openstack.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/module_utils/openstack.py b/plugins/module_utils/openstack.py index 2f365121..03b3ed9c 100644 --- a/plugins/module_utils/openstack.py +++ b/plugins/module_utils/openstack.py @@ -183,7 +183,7 @@ def openstack_cloud_from_module(module, min_version=None, max_version=None): " excluded.") for param in ( 'auth', 'region_name', 'validate_certs', - 'ca_cert', 'client_key', 'api_timeout', 'auth_type'): + 'ca_cert', 'client_cert', 'client_key', 'api_timeout', 'auth_type'): if module.params[param] is not None: module.fail_json(msg=fail_message.format(param=param)) # For 'interface' parameter, fail if we receive a non-default value @@ -199,6 +199,7 @@ def openstack_cloud_from_module(module, min_version=None, max_version=None): verify=module.params['validate_certs'], cacert=module.params['ca_cert'], key=module.params['client_key'], + cert=module.params['client_cert'], api_timeout=module.params['api_timeout'], interface=module.params['interface'], ) @@ -358,7 +359,7 @@ class OpenStackModule: " excluded.") for param in ( 'auth', 'region_name', 'validate_certs', - 'ca_cert', 'client_key', 'api_timeout', 'auth_type'): + 'ca_cert', 'client_cert', 'client_key', 'api_timeout', 'auth_type'): if self.params[param] is not None: self.fail_json(msg=fail_message.format(param=param)) # For 'interface' parameter, fail if we receive a non-default value