Conversation
|
I think adding the ability to add an Http object is worthwhile, but disabling certificate verification any point is definitely a very bad idea, especially in an authentication flow. Self-signed certificates would be the only even remote exception, but you shouldn't be using a self-signed certificate on an authentication server, anyway. |
| warn("HTTP argument is deprecated and unused", DeprecationWarning) | ||
| self.http = http | ||
| else: | ||
| self.http = httplib2.Http() |
There was a problem hiding this comment.
Why use self.http? Why does it need to be part of the class instance? Why not leave the scope local?
|
I agree with @OneWithTheCore, disabling certificate verification is not an option we want to enable. @databill86 Regarding the HTTP parameter being set on the class instance, what use case do you have that this would be helpful with? |
|
Disabling certificate verification is definitely a bad idea, but here it is only a option, which is is disabled by default (so default setup is a secure setup). |
|
The Requests library has a verify=False optional parameter to skip SSL verification. I can imagine there being situations where skipping verification of SSL certs is necessary/useful. |
|
This PR solves my issue. I have a self-signed certificate for my |
I've added http as a parameter to prevent the creation of a new Http() for every request.
This way, we can also disable ssl certificate verification:
oidc = OpenIDConnect(app, http=httplib2.Http(disable_ssl_certificate_validation=True))