Reliable TLS whitelist for use with commercial CA certs?
Posted: Fri May 20, 2011 2:42 am
I would like to set up an OpenVPN server to use server and client certificates signed by a commercial CA instead of self-signed certs. (At present, all the server and client certs have been signed by the same commercial CA, but that might change in future.) But (as is usual) I only want to allow approved clients to connect, and not anyone with a certificate signed by the commercial CA cert(s) I add to the approved certificates. I don't want to rely on a second form of identification like a user/password challenge: I want the server to just reject certificates which are not on a whitelist maintained by me. Similarly, it will of course be necessary to make sure that the clients will only accept the right server cert.
I'd rather use OpenVPN 2.1 (since that's what's standard with the current Ubuntu, 11.04). Obviously I'll consider installing 2.2 if it's going to help fix my problem. But comparing the 2.1 and 2.2 manpages doesn't suggest that there are any relevant differences.
The obvious solution would be to use a verify-cn whitelist, except that verify-cn only checks Common Names, and afaict there's no guarantee that all the people/organisations who are issued certificates by a particular commercial CA will each have a unique CN in their certs, let alone that any two different people/organisations with certificates signed by two different big-name CAs will each have two different CNs on their certs. (Is this correct?) It seems to be necessary to whitelist on Distinguished Name, or perhaps SubjectAltName or something. Is there an official OpenVPN script or plugin to do this, or at least a widely-adopted one? I'd rather not have to roll my own --tls-verify script: partly out of laziness, but partly for security reasons. I'd prefer not to take a chance on getting it right with a roll-your-own solution, especially since I'm no expert on PKI. If I do have to roll my own, what set of fields should I inspect to get a unique ID and how?
I'd rather use OpenVPN 2.1 (since that's what's standard with the current Ubuntu, 11.04). Obviously I'll consider installing 2.2 if it's going to help fix my problem. But comparing the 2.1 and 2.2 manpages doesn't suggest that there are any relevant differences.
The obvious solution would be to use a verify-cn whitelist, except that verify-cn only checks Common Names, and afaict there's no guarantee that all the people/organisations who are issued certificates by a particular commercial CA will each have a unique CN in their certs, let alone that any two different people/organisations with certificates signed by two different big-name CAs will each have two different CNs on their certs. (Is this correct?) It seems to be necessary to whitelist on Distinguished Name, or perhaps SubjectAltName or something. Is there an official OpenVPN script or plugin to do this, or at least a widely-adopted one? I'd rather not have to roll my own --tls-verify script: partly out of laziness, but partly for security reasons. I'd prefer not to take a chance on getting it right with a roll-your-own solution, especially since I'm no expert on PKI. If I do have to roll my own, what set of fields should I inspect to get a unique ID and how?