Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Mutual TLS authentication #702

Merged
merged 2 commits into from
Jul 11, 2019
Merged

Mutual TLS authentication #702

merged 2 commits into from
Jul 11, 2019

Conversation

LloydW93
Copy link
Contributor

A recreation of #677 because I accidentally made a mess of my branch :(

With the Python requests module, it is possible to configure a client certificate to use for mutual TLS authentication, for example if an nginx instance in front of influxdb is performing the TLS termination and has a whitelist of allowed CNs.

This PR adds a new optional argument to the client constructor which passes through the path to such a client certificate to the requests session.

@petetanton
Copy link

We would like to start using mutual TLS with our InfluxDB deployments so that we can evaluate InfluxDB for production use.
@aviau @sebito91 or @xginn8 please can someone review this PR?

@westfeld
Copy link

westfeld commented May 7, 2019

If I got it correctly, for valid client-side certificate authentication you need a client certificate and its matching private key. They can be both in one file or in two separate files.

I would suggest adding this to the documentation of the new parameter like requests does it, that it is also possible to have a tuple with both file paths instead of one path only.

From the requests documentation

You can also specify a local cert to use as client side certificate, as a single file (containing the private key and the certificate) or as a tuple of both files’ paths

Requests documentation about client certificates

@sebito91
Copy link
Contributor

Sorry, been consumed lately but will get this reviewed this week!

@LloydW93
Copy link
Contributor Author

I've updated the documentation to more explicitly state the supported values. I considered explicitly linking to the Requests documentation - but I'm not sure whether this would be preferred, especially as links can break over time.

@shapzka
Copy link

shapzka commented Jul 3, 2019

Hello! Are there any updates on this PR?

@lovasoa
Copy link
Contributor

lovasoa commented Jul 11, 2019

@aviau I think this PR can be merged.

@aviau
Copy link
Collaborator

aviau commented Jul 11, 2019

Sure, LGTM.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants