logankoester / selfsigned_certificate

Cookbook for selfsigned_certificate using openssl.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

selfsigned_certificate cookbook

This cookbook allow you to create a self signed certificate using openssl. The certificate is configured using the provided attributes.

Requirements

No requirement. Openssl package will be installed along the default recipe.

Usage

Testing

You can test the cookbook using the provided Vagrantfile. Make sure you edit sample attribute provided in the Vagrantfile to match your test needs.

Beware: vagrant 1.2.x aka Vagrant 2 is mandatory.

Depending on this cookbook

  1. Make your cookbook depends on this cookbook (e.g. in your Berksfile if you are using berkshelf, and in your metadata).
  2. You must override all the attributes as described below, except node.selfsigned_certifcate[:destination] which is recommended but not compulsory.
  3. Call the recipe using include_recipe 'selfsigned_certificate'
  4. You can then use the generated certificate in your own template using the attribute node.selfsigned_certifcate[:destination]/server.crt (and .key), for instance for nginx or Apache configuration.

Attributes

  • node.selfsigned_certifcate[:destination] : Where to store the created self-signed certificate.
  • node.selfsigned_certifcate[:passphrase] : The passphrase used to generate the request for signature and self CA signature. Obviously very sensible, you should configure it in your attribute files using a databag.
  • node.selfsigned_certifcate[:country] : Country code for the certificate.
  • node.selfsigned_certifcate[:state] : State for the certificate.
  • node.selfsigned_certifcate[:city] : City for the certificate.
  • node.selfsigned_certifcate[:orga] : Organisation for the certificate.
  • node.selfsigned_certifcate[:depart] : Departement for the certificate.
  • node.selfsigned_certifcate[:cn] : Common name for the certificate.
  • node.selfsigned_certifcate[:email] : Contact email for the certificate.

Recipes

Default recipe in current version.

Todo

  • Unit tests

Author

Author:: Christophe Gravier (christophe.gravier@univ-st-etienne.fr)

Licence:: Apache 2.0

About

Cookbook for selfsigned_certificate using openssl.

License:Other


Languages

Language:Ruby 100.0%