ehaselwanter / chef-postgres-hardening

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

postgres-hardening (Postgres cookbook)

Description

Provides security configurations for postgres.

Note: This is currently work in progress and not tested on all supported platforms

Requirements

  • chef

Usage

This cookbook is optimized to work with os-hardening and ssh-hardening. It will play well without, but you need to ensure all preconditions like apt-get update or yum update are met.

add recipe[postgres-hardening::server] to your runlist and customize security option attributes

Enable SSL

Please read http://www.postgresql.org/docs/9.1/static/ssl-tcp.html first.

This cookbook will delete the links from /var/lib/postgresql/#{node['postgresql']['version']}/main/server.crt to /etc/ssl/certs/ssl-cert-snakeoil.pem and /var/lib/postgresql/#{node['postgresql']['version']}/main/server.key to /etc/ssl/private/ssl-cert-snakeoil.key on Debian systems. This certificates are self-signed (see http://en.wikipedia.org/wiki/Snake_oil_%28cryptography%29) and therefore not trusted. You have to provide your own trusted certificates for SSL.

Security Options

Tests

# fast test on one machine
kitchen test default-ubuntu-1204

# test on all machines
kitchen test

# for development
kitchen create default-ubuntu-1204
kitchen converge default-ubuntu-1204

Contributors + Kudos

  • Edmund Haselwanter
  • Dominik Richter
  • Christoph Hartmann
  • Patrick Meier

License and Author

  • Author:: Deutsche Telekom AG

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.

About

License:Apache License 2.0


Languages

Language:Ruby 100.0%