Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

The openssl cookbook has been deprecated

Author provided reason for deprecation:

The openssl cookbook has been deprecated and is no longer being maintained by its authors. Use of the openssl cookbook is no longer recommended.

RSS

openssl (32) Versions 3.0.2

Resources and libraries for interacting with certificates, keys, passwords, and dhparam files.

Policyfile
Berkshelf
Knife
cookbook 'openssl', '= 3.0.2', :supermarket
cookbook 'openssl', '= 3.0.2'
knife supermarket install openssl
knife supermarket download openssl
README
Dependencies
Changelog
Quality 0%

openssl Cookbook

This cookbook provides a library method to generate secure random passwords in recipes using the Ruby OpenSSL library.

It also provides an attribute-driven recipe for upgrading OpenSSL packages.

Requirements

The secure_password works on any platform with OpenSSL Ruby bindings installed, which are a requirement for Chef anyway.

The upgrade recipe works on the following tested platforms:

  • Ubuntu 12.04, 14.04
  • Debian 7.4
  • CentOS 6.5

It may work on other platforms or versions of the above platforms with or without modification.

Chef Sugar was introduced as a dependency to provide helpers that make the default attribute settings (see Attributes) easier to reason about.

Attributes

  • node['openssl']['packages'] - An array of packages of openssl. The default attributes attempt to be smart about which packages are the default, but this may need to be changed by users of the openssl::upgrade recipe.
  • node['openssl']['restart_services'] - An array of service resources that use the node['openssl']['packages']. This is empty by default as Chef has no reliably reasonable way to detect which applications or services are compiled against these packages. Note These each need to be "service" resources specified somewhere in the recipes in the node's run list.

Recipes

upgrade

The upgrade recipe iterates over the list of packages in the node['openssl']['packages'] attribute and manages them with the :upgrade action. Each package will send :restart notification to service resources named by the node['openssl']['restart_services'] attribute.

Usage

Most often this will be used to generate a secure password for an attribute. In a recipe:

::Chef::Recipe.send(:include, Chef::OpenSSL::Password)
node.set_unless[:my_password] = secure_password

To use the openssl::upgrade recipe, set the attributes as mentioned above. For example, we have a "stats_collector" service that uses openssl. It has a recipe that looks like this:

LWRP

This cookbook includes an LWRP for generating Self Signed Certificates

openssl_x509

generate a pem formatted x509 cert + key

Attributes

common_name A String representing the CN ssl field
org A String representing the O ssl field
org_unit A String representing the OU ssl field
country A String representing the C ssl field
expire A Fixnum reprenting the number of days from now to expire the cert
key_file Optional A string to the key file to use. If no key is present it will generate and store one.
key_pass A String that is the key's passphrase
key_length A Fixnum reprenting your desired Bit Length Default: 2048
owner The owner of the files Default: "root"
group The group of the files Default: "root"
mode The mode to store the files in Default: "0400"

Example usage

openssl_x509 "/tmp/mycert.pem" do
  common_name "www.f00bar.com"
  org "Foo Bar"
  org_unit "Lab"
  country "US"
end

License and Author

Author:: Jesse Nelson (spheromak@gmail.com)

Author:: Joshua Timberman (joshua@chef.io)

node.default['openssl']['restart_services'] = ['stats_collector']

# other recipe code here...
service 'stats_collector' do
  action [:enable, :start]
end

include_recipe 'openssl::upgrade'

This will ensure that openssl is upgraded to the latest version so the stats_collector service won't be exploited (hopefully!).

Copyright:: 2009-2011, Chef Software, Inc
Copyright:: 2014, Chef Software, Inc <legal@chef.io>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

chef-sugar >= 0.0.0

Contingent cookbooks

aegir Applicable Versions
apache2_odin_auth Applicable Versions
application_zf Applicable Versions
bacula Applicable Versions
bacula-backup Applicable Versions
bootstrap Applicable Versions
boxbilling Applicable Versions
cakephp Applicable Versions
chef Applicable Versions
chef-bareos Applicable Versions
chef-jellyfish Applicable Versions
chef-server Applicable Versions
confluence Applicable Versions
couchbase Applicable Versions
couchbase-ng Applicable Versions
crowd Applicable Versions
dokku Applicable Versions
drone_app Applicable Versions
drupal Applicable Versions
elefant Applicable Versions
elkstack Applicable Versions
esri-iis Applicable Versions
esri-tomcat Applicable Versions
et_haproxy Applicable Versions
frog Applicable Versions
gallery Applicable Versions
github-users Applicable Versions
gitlab-server Applicable Versions
ice Applicable Versions
jahia Applicable Versions
jenkinsstack Applicable Versions
jetty Applicable Versions
jira Applicable Versions
kagent Applicable Versions
katello Applicable Versions
liquid-feedback Applicable Versions
logserver Applicable Versions
magento Applicable Versions
magentostack Applicable Versions
mailman Applicable Versions
metarepo Applicable Versions
mysql Applicable Versions
mysql-multi Applicable Versions
mysqler Applicable Versions
nginx-hardening Applicable Versions
nodestack Applicable Versions
openbazaar Applicable Versions
openerp Applicable Versions
openldap Applicable Versions
opennebula Applicable Versions
opennms Applicable Versions
opsview Applicable Versions
owncloud Applicable Versions
paramount Applicable Versions
percona Applicable Versions
percona-tools Applicable Versions
phpstack Applicable Versions
postfixadmin Applicable Versions
postgresql Applicable Versions
postgresql91 Applicable Versions
pythonstack Applicable Versions
rainloop Applicable Versions
rancher-ha Applicable Versions
riot_mysql Applicable Versions
roundcube Applicable Versions
rundeck-node Applicable Versions
singularity Applicable Versions
sitecore Applicable Versions
sql_server Applicable Versions
sqlcipher Applicable Versions
stack_commons Applicable Versions
stackstorm Applicable Versions
strongloop Applicable Versions
sugar_crm Applicable Versions
sugarcrm Applicable Versions
sugarcrm_ce Applicable Versions
teampass Applicable Versions
testswarm Applicable Versions
tincvpn Applicable Versions
tomcat Applicable Versions
tomee Applicable Versions
transmission Applicable Versions
twindb-repo Applicable Versions
uptime Applicable Versions
webgoat Applicable Versions
wordpress Applicable Versions
wordpress-windows Applicable Versions
zabbix-pkg Applicable Versions
zarafa Applicable Versions
zenoss Applicable Versions
zf2 Applicable Versions
zncrypt Applicable Versions

openssl Cookbook CHANGELOG

This file is used to list changes made in each version of the openssl cookbook.

v3.0.0 (2014-02-17)

  • Changing helper module name from Opscode to OpenSSLCookbook

v2.0.2 (2014-12-30)

  • Call cert.to_pem before recipe DSL

v2.0.0 (2014-06-11)

  • #1 - COOK-847 - Add LWRP for generating self signed certs
  • #4 - COOK-4715 - add upgrade recipe and complete test harness

v1.1.0

Improvement

  • COOK-3222 - Allow setting length for secure_password

v1.0.2

  • Add name attribute to metadata

Foodcritic Metric
            

3.0.2 failed this metric

FC031: Cookbook without metadata file: /tmp/cook/881b692018286ad760e02a52/openssl/metadata.rb:1
FC045: Consider setting cookbook name in metadata: /tmp/cook/881b692018286ad760e02a52/openssl/metadata.rb:1