chef-repo icon indicating copy to clipboard operation
chef-repo copied to clipboard

A quick way to insert certificates?

Open berkes opened this issue 10 years ago • 0 comments

Right now, you need to embed the contents of the cert and the key. This works, but is kindof a PIAS with regards to line-endings and formatting.

Either your json gets formatted rather ugly, or you need to replace all line-endings with a literal \n, which is error-prone, especially when managing by hand.

Would it be an option to point to files instead? ssl_key_file and ssl_cert_file? If so, would it be smart to offer this as only option and to deprecate the option to include a certificate completely? IMHO this also offers better security.

An alternative could be to go the route of "Black Magick", famous in the Rails community: When there is a an app named example_application and the certificates directory contains a cert and key: example_application.cert example_application.key, then these are used automagically.

If there is a good idea, I'll whip up a PR.

berkes avatar Nov 09 '14 11:11 berkes