Score:0

How to ensure OpenVPN ccd uniqueness when use TLS in multi-client server mode

us flag

Many user client use TLS certificates in ccd, but how to ensure generated certificates is unique. Suppose I know your ccd name, I might generate a new certificate under your name. How to avoid this situation?

Score:0
za flag

Files in ccd are named after CN (common name) field of the certificate, so essentially you are asking "how do I make sure no duplicate CN's appear my VPN certificates".

It's CA duty to make sure certificates are correct and all information in them is valid. It is the sole purpose of having the Certificate Authority: it signs the certificates and thereby witnesses the validity of their contents. So, it's your work, as the VPN CA operator, to check everything before issuing.

To aid in that, SSL CA software permits setting various restrictions on what data could be in certificates. For instance, if you use OpenVPN's EasyRSA for CA management, by default if will prevent the issue of two simultaneously valid certificates with the same CN. In other words, if you have a certificate for CN=user, it won't sign another certificate with CN=user unless you revoke (invalidate) the previous certificate. (For this to fully work, you must use crl-verify in the VPN server configuration.) Other CA solutions also allow for the same type of restriction; for one case we used MS AD certifications services for that, and it worked as desired.

It is possible to do nasty things if you have an access the CA, for example, to alter the configuration or clone the CA store (which is a directory in case of EasyRSA) and issue "stray" certificates. This is why you must keep an eye on your CA and not let strangers to access it. Store it on the encrypted drive, store the CA private key separately, use tokens and so on. This is, again, your duty to keep everything secure.

9527 avatar
us flag
thanks you reply,we use easy-rsa generate certificate,but it's place on a specified pc ,so anyone can see all members certificate.i think it's awful.then i told them keep them own cert,and then delete them where it's generated. now my new solution is in the addtion to certficate ,add the user/password by auth-user-pass-verify param,in this case ,password is completely private
Nikita Kipriyanov avatar
za flag
Your CA store must be kept in the very secure place. The whole VPN security depends on it. Don't remove anything from it, keep it as it is manages itself, but don't allow any untrusted access. The certificate (PKI) approach done right actually is more secure than password-based. Also, it is not the certificate which is the private thing, but the private key. // I think this question isn't the right place to discuss the proper CA management practices and the whole PKI and asymmetric crypto operation; search for the details on ServerFault and on Security StackExchange.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.