mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Urls client cert auth (#18141)
* Build HTTPSClientAuthHandler more similarly to how HTTPSHandler works * Add docs for new client cert authentication * Support older versions of python * Simplify logic * Initial support for client certs in urls.py * Add an extra test * Add a get_url test for client cert auth * Add additional test for client cert auth, with validation and ssl mismatch * Skip assert when http tester not available * Update version_added for new options
This commit is contained in:
parent
3934513121
commit
621e27b5dd
6 changed files with 138 additions and 4 deletions
|
@ -211,3 +211,18 @@
|
|||
get_url:
|
||||
url: https://{{ httpbin_host }}
|
||||
dest: "{{ output_dir }}"
|
||||
|
||||
|
||||
- name: Test client cert auth, with certs
|
||||
get_url:
|
||||
url: "https://ansible.http.tests/ssl_client_verify"
|
||||
client_cert: "{{ output_dir }}/client.pem"
|
||||
client_key: "{{ output_dir }}/client.key"
|
||||
dest: "{{ output_dir }}/ssl_client_verify"
|
||||
when: has_httptester
|
||||
|
||||
- name: Assert that the ssl_client_verify file contains the correct content
|
||||
assert:
|
||||
that:
|
||||
- 'lookup("file", "{{ output_dir }}/ssl_client_verify") == "ansible.http.tests:SUCCESS"'
|
||||
when: has_httptester
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue