pythonsslreview-board

How can I disable SSL verification with Reviewboards Python API?


In order to access a Reviewboard server I need to disable the SSL verification, however, I can't seem to do this from Reviewboard's Python API.

I've added a 'DISABLE_SSL_VERFICATION = True' line to ~/.reviewboardrc. The rbt commands themselves find this file ok, but scripts using the Python API don't seem to know it exists.

I'm seeing this behavior on both Ubuntu and a Cygwin install under Windows.

Is there something I'm missing with setting my Reviewboard configuration? Is there another way to disable SSL verification with the Python API?


Solution

  • I wasn't able to disable ssl verification globally, but there is a way to disable it when creating the RBClient that then carries through to any operations performed using that client.

    Originally I was creating my client as below:

    client = RBClient('server_url')
    

    To disable ssl verification I added a verify_ssl argument and set it to false:

    client = RBClient('server_url', verify_ssl=False)