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

please support https client certificate authentication #72

Closed
cjw296 opened this issue Jun 23, 2011 · 0 comments
Closed

please support https client certificate authentication #72

cjw296 opened this issue Jun 23, 2011 · 0 comments

Comments

@cjw296
Copy link
Contributor

cjw296 commented Jun 23, 2011

The following Apache config section enforces the kind of auth I'm talking about:

SSLCACertificateFile /root/CA/cacert.pem
SSLVerifyClient require
SSLVerifyDepth 1

Using httplib2 (http://code.google.com/p/httplib2/) this is done as follows:

from httplib2 import Http
http = Http()
http.add_certificate(keyfile,certfile,urlparse(url).netloc)

...which is great, except for the suck of having to parse the netloc.

My wishlist for requests would be:

requests.get(full_url,auth=AuthObject(method='cert',keyfile=keyfile,certfile=certfile))

However, on the subject, it's important for auth types of be used in parallel.
The specific case I have here has both client certificate and basic auth at the same time.
I have no idea how I'd choose to spell that nicely, although httplib2 does it quite nicely:

http = Http()
http.add_credentials(username,password)
http.add_certificate(keyfile,certfile,urlparse(url).netloc)

thanks!

Chris

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants