Skip to content

Commit 5165c8c

Browse files
committed
documented disabling ssl verification
1 parent 00c0b45 commit 5165c8c

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

doc/index.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,9 @@ The final method for supplying credentials is also simple and straight-forward:
236236
- :envvar:`SASCTL_USER_NAME`
237237
- :envvar:`SASCTL_PASSWORD`
238238

239+
240+
241+
239242
SSL Certificates
240243
++++++++++++++++
241244

@@ -249,6 +252,13 @@ to accomplish this behavior:
249252
- :envvar:`CAS_CLIENT_SSL_CA_LIST`
250253
- :envvar:`REQUESTS_CA_BUNDLE`
251254

255+
In addition, it is possible to disable SSL ceritificate validation entirely, although this should be used with caution.
256+
When instantiating a :class:`.Session` instance you can set the `verify_ssl` parameter to False::
257+
258+
>>> s = Session(hostname, username, verify_ssl=False)
259+
260+
If you're using **sasctl** from the command line, or want to disable SSL validation for all sessions, you can use the following :envvar:`SSLREQCERT` environment variable.
261+
252262

253263
Logging
254264
+++++++
@@ -291,6 +301,10 @@ will take precedence over :envvar:`REQUESTS_CA_BUNDLE`.
291301

292302
Client-side path to a certificate file containing :abbr:`CA (Certificate Authority)` certificates to be trusted. Used by the :mod:`requests` module.
293303

304+
.. envvar:: SSLREQCERT
305+
306+
Disables validation of SSL certificates when set to `no` or `false`
307+
294308
.. envvar:: SASCTL_SERVER_NAME
295309

296310
Hostname of the SAS Viya server to connect to. Required for CLI usage.

src/sasctl/core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,8 @@ def request(self, method, url,
379379
raise RuntimeError(
380380
"SSL handshake failed. The 'REQUESTS_CA_BUNDLE' "
381381
"environment variable should contain the path to the CA "
382-
"certificate.")
382+
"certificate. Alternatively, set verify_ssl=False to "
383+
"disable certificate verification.")
383384
else:
384385
raise e
385386

0 commit comments

Comments
 (0)