Implement AsyncOpenSearch() parameter ssl_assert_hostname (#843)

* Implement AsyncOpenSearch() parameter `ssl_assert_hostname` to allow disabling SSL hostname verification

Signed-off-by: merlinz01 <[email protected]>

* Update PR link

Signed-off-by: merlinz01 <[email protected]>

* Add test

Signed-off-by: merlinz01 <[email protected]>

* Update docs

Signed-off-by: merlinz01 <[email protected]>

* Add test for default value

Signed-off-by: merlinz01 <[email protected]>

* Fix formatting

Signed-off-by: merlinz01 <[email protected]>

* Fix test failing on Python >3.12.7

Signed-off-by: merlinz01 <[email protected]>

* Fix formatting

Signed-off-by: merlinz01 <[email protected]>

---------

Signed-off-by: merlinz01 <[email protected]>
Signed-off-by: Daniel (dB.) Doubrovkine <[email protected]>
Co-authored-by: Daniel (dB.) Doubrovkine <[email protected]>
This commit is contained in:
Merlin
2024-11-16 08:29:10 -05:00
committed by GitHub
co-authored by Daniel Doubrovkine
parent 1269cdc95a
commit 12c379d32d
6 changed files with 39 additions and 7 deletions
+5 -3
View File
@@ -109,7 +109,7 @@ class AsyncOpenSearch(Client):
])
If using SSL, there are several parameters that control how we deal with
certificates (see :class:`~opensearchpy.Urllib3HttpConnection` for
certificates (see :class:`~opensearchpy.AIOHttpConnection` for
detailed description of the options)::
client = OpenSearch(
@@ -123,7 +123,7 @@ class AsyncOpenSearch(Client):
)
If using SSL, but don't verify the certs, a warning message is showed
optionally (see :class:`~opensearchpy.Urllib3HttpConnection` for
optionally (see :class:`~opensearchpy.AIOHttpConnection` for
detailed description of the options)::
client = OpenSearch(
@@ -132,12 +132,14 @@ class AsyncOpenSearch(Client):
use_ssl=True,
# no verify SSL certificates
verify_certs=False,
# don't verify the hostname in the certificate
ssl_assert_hostname=False,
# don't show warnings about ssl certs verification
ssl_show_warn=False
)
SSL client authentication is supported
(see :class:`~opensearchpy.Urllib3HttpConnection` for
(see :class:`~opensearchpy.AIOHttpConnection` for
detailed description of the options)::
client = OpenSearch(