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

Updating docs #366

Merged
merged 1 commit into from
Feb 28, 2025
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
10 changes: 6 additions & 4 deletions arango/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,12 @@ class ArangoClient:
:type deserializer: callable
:param verify_override: Override TLS certificate verification. This will
override the verify method of the underlying HTTP client.
None: Do not change the verification behavior of the underlying HTTP client.
True: Verify TLS certificate using the system CA certificates.
False: Do not verify TLS certificate.
str: Path to a custom CA bundle file or directory.

- `None`: Do not change the verification behavior of the
underlying HTTP client.
- `True`: Verify TLS certificate using the system CA certificates.
- `False`: Do not verify TLS certificate.
- `str`: Path to a custom CA bundle file or directory.
:type verify_override: Union[bool, str, None]
:param request_timeout: This is the default request timeout (in seconds)
for http requests issued by the client if the parameter http_client is
Expand Down
18 changes: 16 additions & 2 deletions docs/certificates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ your HTTP client as described in the :ref:`HTTPClients` section.

The ``ArangoClient`` class provides an option to override the verification behavior,
no matter what has been defined in the underlying HTTP session.
You can use this option to disable verification or provide a custom CA bundle without
defining a custom HTTP Client.
You can use this option to disable verification.

.. code-block:: python

Expand All @@ -34,3 +33,18 @@ application:

import requests
requests.packages.urllib3.disable_warnings()

You can also provide a custom CA bundle without defining a custom HTTP Client:

.. code-block:: python

client = ArangoClient(hosts="https://localhost:8529", verify_override="path/to/certfile")

If `verify_override` is set to a path to a directory, the directory must have been processed using the `c_rehash` utility
supplied with OpenSSL. For more information, see the `requests documentation <https://requests.readthedocs.io/en/master/user/advanced/#ssl-cert-verification>`_.

Setting `verify_override` to `True` will use the system's default CA bundle.

.. code-block:: python

client = ArangoClient(hosts="https://localhost:8529", verify_override=True)
Loading