Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Storing SSL cert in source control

Would there be a security issue with storing the SSL cert for your web app in the source code repository, SO LONG AS you were NOT storing your private key as well?

I'm a little spoiled by how easy it is to use source control to make a backup of such things, and want to make the most of it, but I also don't want to be sloppy about its use, or endanger security.

like image 946
jefflunt Avatar asked Aug 12 '10 18:08

jefflunt


People also ask

Where should I store SSL certificates?

The right place to store your certificate is /etc/ssl/certs/ directory. Save your private keys to /etc/ssl/private/ directory.

How do you store SSL certificates?

Since SSL Keys and Certificates are just text files, you could base64 encode them, and save it as a string in Vault, or even just the text in Vault as well.

Where are SSL private keys stored?

The most secure method of storing your private keys is to use some form of cryptographic hardware storage device. While they can be expensive, tools like Hardware Storage Modules (HSM), Smart Cards, or USB tokens are great lines of defense against an attack.


1 Answers

No. The certificate is public; the server will present it during every SSL handshake, and some CAs even maintain a public repository of all of the certificates they issue. There's no need to try to keep a certificate secret.

The private key, on the other hand, must be kept secret. And, if you were trying to authenticate someone ("two-way SSL" or client authentication), you would need to integrity protection for your root certificates. If you were to store this material in your revision control system, it should be protected with strong password.

like image 132
erickson Avatar answered Sep 20 '22 18:09

erickson