nautobot / pynautobot

Nautobot Python SDK
https://pynautobot.readthedocs.io/en/latest/index.html
Apache License 2.0
36 stars 32 forks source link

Add option to ignore SSL validation #78

Closed matt852 closed 2 years ago

matt852 commented 2 years ago

When initializing a pynautobot.api instance with Nautobot, I'd like to be able to ignore SSL validation if possible. This would be helpful specifically for development purposes.

Kircheneer commented 2 years ago

You can disable TLS verification by doing the following:

from pynautobot import api
nb = api(...) # Add parameters
nb.http_session.verify = False

This works because nb.http_session is the Session object (see requests docs) that pynautobot uses to make HTTP requests with.

matt852 commented 2 years ago

Thank you, I will do this. Can we add this to the documentation before closing this issue please? I looked but didn't see it anywhere, and I think it'd be really helpful.

jmcgill298 commented 2 years ago

It is already in the docs: https://pynautobot.readthedocs.io/en/latest/advanced/session.html#ssl-verification