All Projects → sous-chefs → stunnel

sous-chefs / stunnel

Licence: Apache-2.0 license
Development repository for the stunnel cookbook

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects
HTML
75241 projects

Projects that are alternatives of or similar to stunnel

squid
Development repository for the squid cookbook
Stars: ✭ 27 (+92.86%)
Mutual labels:  chef-cookbook, chef, chef-resource, managed-by-terraform
memcached
Development repository for the memcached cookbook
Stars: ✭ 50 (+257.14%)
Mutual labels:  chef-cookbook, chef, chef-resource, managed-by-terraform
vagrant
Development repository for the vagrant cookbook
Stars: ✭ 54 (+285.71%)
Mutual labels:  chef-cookbook, chef, chef-resource, managed-by-terraform
drbd
Development repository for the drbd cookbook
Stars: ✭ 19 (+35.71%)
Mutual labels:  chef-cookbook, chef, chef-resource, managed-by-terraform
golang
Development repository for the golang cookbook
Stars: ✭ 48 (+242.86%)
Mutual labels:  chef-cookbook, chef, chef-resource, managed-by-terraform
github
Development repository for the github cookbook
Stars: ✭ 22 (+57.14%)
Mutual labels:  chef-cookbook, chef, chef-resource, managed-by-terraform
firewall
Development repository for the firewall cookbook
Stars: ✭ 97 (+592.86%)
Mutual labels:  chef-cookbook, chef, chef-resource, managed-by-terraform
reprepro
Development repository for the reprepro cookbook
Stars: ✭ 11 (-21.43%)
Mutual labels:  chef-cookbook, chef, chef-resource, managed-by-terraform
kafka
Development repository for the kafka cookbook
Stars: ✭ 87 (+521.43%)
Mutual labels:  chef-cookbook, chef, chef-resource, managed-by-terraform
yum-epel
Development repository for the yum-epel cookbook
Stars: ✭ 23 (+64.29%)
Mutual labels:  chef-cookbook, chef, chef-resource, managed-by-terraform
sssd ldap
Development repository for the sssd_ldap cookbook
Stars: ✭ 17 (+21.43%)
Mutual labels:  chef-cookbook, chef, chef-resource, managed-by-terraform
line
Development repository for the line cookbook
Stars: ✭ 96 (+585.71%)
Mutual labels:  chef-cookbook, chef, chef-resource, managed-by-terraform
freebsd
Development repository for the freebsd cookbook
Stars: ✭ 27 (+92.86%)
Mutual labels:  chef-cookbook, chef, chef-resource, managed-by-terraform
selinux
Development repository for the selinux cookbook
Stars: ✭ 57 (+307.14%)
Mutual labels:  chef-cookbook, chef, chef-resource, managed-by-terraform
apparmor
Development repository for the apparmor cookbook
Stars: ✭ 13 (-7.14%)
Mutual labels:  chef-cookbook, chef, chef-resource, managed-by-terraform
confluence
Development repository for the confluence cookbook
Stars: ✭ 42 (+200%)
Mutual labels:  chef-cookbook, chef, chef-resource, managed-by-terraform
passenger apache2
Development repository for the passenger_apache2 cookbook
Stars: ✭ 37 (+164.29%)
Mutual labels:  chef-cookbook, chef, chef-resource, managed-by-terraform
maven
Development repository for the maven cookbook
Stars: ✭ 35 (+150%)
Mutual labels:  chef-cookbook, chef, chef-resource, managed-by-terraform
samba
Development repository for the samba cookbook
Stars: ✭ 30 (+114.29%)
Mutual labels:  chef-cookbook, chef, chef-resource, managed-by-terraform
transmission
Development repository for the transmission cookbook
Stars: ✭ 14 (+0%)
Mutual labels:  chef-cookbook, chef, chef-resource, managed-by-terraform

stunnel

Cookbook Version Build Status OpenCollective OpenCollective License

Chef cookbook to install and configure stunnel

Maintainers

This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you’d like to know more please visit sous-chefs.org or come chat with us on the Chef Community Slack in #sous-chefs.

Requirements

  • Chef 13

Platform Support

  • Ubuntu 14.04+
  • CentOS 6.9+

Resources

An stunnel_connection resource is provided for defining stunnel connections. As a client:

include_recipe 'stunnel'

stunnel_connection 'random_service' do
  connect "#{rnd_srv_node['ipaddress']}:#{rnd_srv_node['random_service']['port']}"
  accept node['random_service']['local_accept_port']
  notifies :restart, 'service[stunnel]'
end

As a server:

include_recipe 'stunnel::server'

stunnel_connection 'random_service' do
  accept node['random_service']['tunnel_port']
  connect node['random_service']['port']
  notifies :restart, 'service[stunnel]'
end

Attributes

Lots of configurable attributes:

default['stunnel']['install_method'] = 'package'  # the other valid option is 'source'

default['stunnel']['packages'] = %w(stunnel4)
default['stunnel']['service_name'] = 'stunnel4'

default['stunnel']['ssl_dir'] = '/etc/ssl'
default['stunnel']['server_ssl_req']  = "/C=US/ST=Several/L=Locality/O=Example/OU=Operations/CN=#{node['fqdn']}/emailAddress=root@#{node['fqdn']}"
default['stunnel']['cert_fqdn'] = node['fqdn']

default['stunnel']['use_chroot'] = false
default['stunnel']['chroot_path'] = "/usr/var/lib/stunnel"
default['stunnel']['pidfile'] = "/tmp/stunnel.pid"
default['stunnel']['user'] = "root"
default['stunnel']['group'] = "root"
default['stunnel']['ulimit'] = nil # set to a number to add ulimit setting to init script

default['stunnel']['https']['enabled'] = false
default['stunnel']['https']['accept_port'] = "443"
default['stunnel']['https']['connect_port'] = "81"

default['stunnel']['client_mode'] = true

default['stunnel']['fips'] = nil
default['stunnel']['ssl_version'] = 'all'
default['stunnel']['ssl_options'] = 'NO_SSLv2'
default['stunnel']['socket_tunings'] = %w(l:TCP_NODELAY=1 r:TCP_NODELAY=1)
default['stunnel']['compression'] = nil # zlib
default['stunnel']['debug'] = nil # 3
default['stunnel']['output'] = '/var/log/stunnel.log'

# key value pair mapping for default var file
default['stunnel']['default']['enabled'] = 1
default['stunnel']['default']['files'] = '/etc/stunnel/-.conf'
default['stunnel']['default']['options'] = ''

# certificate/key is needed in server mode and optional in client mode
default['stunnel']['certificate_path'] = nil # /etc/pki/stunnel/cert.pem
default['stunnel']['key_path'] = nil # /etc/pki/stunnel/key.pem

FIPS

FIPS mode can be enabled or disabled with the attribute ['stunnel']['fips']. A value of nil will omit the "fips" setting from the config file altogether, falling back to the default behavior for that version of stunnel:

  • For 4.x releases FIPS defaults to on if stunnel was compiled with FIPS support.
  • For 5.x releases FIPS defaults to off.

ChefSpec Matchers

A set of ChefSpec matchers is included for unit testing with ChefSpec. These are automatically available when you make this cookbook a dependency in your cookbook's metadata. To illustrate:

Recipe code:

stunnel_connection 'haproxy_ssl' do
  accept    '443'
  connect   '8443'
end

And the matching spec:

it 'should create stunnel_connection haproxy_ssl' do
  expect(chef_run).to create_stunnel_connection('haproxy_ssl').with(
    accept:  '443',
    connect: '8443'
  )
end

You can also make assertions for notifying other resources:

it 'should notify stunnel to restart on changes to stunnel_connection[haproxy_ssl]' do
  resource = chef_run.stunnel_connection('haproxy_ssl')
  expect(resource).to notify('service[stunnel]').to(:restart)
end

A matcher for the delete action is also available:

it 'should delete stunnel_connection haproxy_ssl' do
  expect(chef_run).to delete_stunnel_connection('haproxy_ssl')
end

Testing Locally

To run the tests, make sure you've got the latest ChefDK along with Vagrant then you can run chef exec kitchen test which will run the entire test suite on all platforms.

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers!

https://opencollective.com/sous-chefs#backers

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

https://opencollective.com/sous-chefs/sponsor/0/website https://opencollective.com/sous-chefs/sponsor/1/website https://opencollective.com/sous-chefs/sponsor/2/website https://opencollective.com/sous-chefs/sponsor/3/website https://opencollective.com/sous-chefs/sponsor/4/website https://opencollective.com/sous-chefs/sponsor/5/website https://opencollective.com/sous-chefs/sponsor/6/website https://opencollective.com/sous-chefs/sponsor/7/website https://opencollective.com/sous-chefs/sponsor/8/website https://opencollective.com/sous-chefs/sponsor/9/website

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].