Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added certificate authentication feature #154

Merged
merged 1 commit into from
Oct 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ansible-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:

- name: Generate coverage report
run: |
if [ "${{ matrix.ansible-version }}" == "devel" ]; then pip install coverage==6.4.4; fi
if [ "${{ matrix.ansible-version }}" == "devel" ]; then pip install coverage==6.5.0; fi
ansible-test coverage xml -v --group-by command --group-by version
working-directory: /home/runner/.ansible/collections/ansible_collections/infoblox/nios_modules/

Expand Down
14 changes: 14 additions & 0 deletions plugins/doc_fragments/nios.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,20 @@ class ModuleDocFragment(object):
- Value can also be specified using C(INFOBLOX_PASSWORD) environment
variable.
type: str
cert:
description:
- Specifies the client certificate file with digest of x509 config
for extra layer secure connection the remote instance of NIOS.
- Value can also be specified using C(INFOBLOX_CERT) environment
variable.
type: str
key:
description:
- Specifies private key file for encryption with the certificate
in order to connect with remote instance of NIOS.
- Value can also be specified using C(INFOBLOX_KEY) environment
variable.
type: str
validate_certs:
description:
- Boolean value to enable or disable verifying SSL certificates
Expand Down
2 changes: 2 additions & 0 deletions plugins/module_utils/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@
'host': dict(fallback=(env_fallback, ['INFOBLOX_HOST'])),
'username': dict(fallback=(env_fallback, ['INFOBLOX_USERNAME'])),
'password': dict(fallback=(env_fallback, ['INFOBLOX_PASSWORD']), no_log=True),
'cert': dict(fallback=(env_fallback, ['INFOBLOX_CERT'])),
'key': dict(fallback=(env_fallback, ['INFOBLOX_KEY']), no_log=True),
'validate_certs': dict(type='bool', default=False, fallback=(env_fallback, ['INFOBLOX_SSL_VERIFY']), aliases=['ssl_verify']),
'silent_ssl_warnings': dict(type='bool', default=True),
'http_request_timeout': dict(type='int', default=10, fallback=(env_fallback, ['INFOBLOX_HTTP_REQUEST_TIMEOUT'])),
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/plugins/module_utils/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def tearDown(self):
self.mock_check_type_dict.stop()

def test_get_provider_spec(self):
provider_options = ['host', 'username', 'password', 'validate_certs', 'silent_ssl_warnings',
provider_options = ['host', 'username', 'password', 'cert', 'key', 'validate_certs', 'silent_ssl_warnings',
'http_request_timeout', 'http_pool_connections',
'http_pool_maxsize', 'max_retries', 'wapi_version', 'max_results']
res = api.WapiBase.provider_spec
Expand Down