All Projects → dev-sec → chef-postgres-hardening

dev-sec / chef-postgres-hardening

Licence: Apache-2.0 license
This chef cookbook provides security configuration for PostgreSQL.

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to chef-postgres-hardening

delivery-truck
DEPRECATED: Delivery build cb for pipelines
Stars: ✭ 36 (+38.46%)
Mutual labels:  chef, cookbook
Cassandra Chef Cookbook
Chef cookbook for Apache Cassandra, DataStax Enterprise (DSE) and DataStax agent
Stars: ✭ 162 (+523.08%)
Mutual labels:  chef, cookbook
Sudo
Development repository for sudo cookbook
Stars: ✭ 113 (+334.62%)
Mutual labels:  chef, cookbook
Runit
Development repository for the Chef Runit Cookbook
Stars: ✭ 101 (+288.46%)
Mutual labels:  chef, cookbook
Windows
Development repository for Chef Cookbook windows
Stars: ✭ 251 (+865.38%)
Mutual labels:  chef, cookbook
Ark
Development repository for Chef Cookbook ark
Stars: ✭ 103 (+296.15%)
Mutual labels:  chef, cookbook
Chef Ssh Hardening
This chef cookbook provides secure ssh-client and ssh-server configurations.
Stars: ✭ 144 (+453.85%)
Mutual labels:  chef, hardening
Chef Windows Hardening
This chef cookbook provides windows hardening configurations for the DevSec Windows baseline profile.
Stars: ✭ 80 (+207.69%)
Mutual labels:  chef, hardening
Arcgis Cookbook
Chef cookbooks for ArcGIS
Stars: ✭ 227 (+773.08%)
Mutual labels:  chef, cookbook
Chef Client
Development repository for Chef Client cookbook
Stars: ✭ 183 (+603.85%)
Mutual labels:  chef, cookbook
Iptables
Development repository for Chef Cookbook iptables
Stars: ✭ 96 (+269.23%)
Mutual labels:  chef, cookbook
ohai
Development repository for Chef Cookbook ohai
Stars: ✭ 49 (+88.46%)
Mutual labels:  chef, cookbook
Yum
Development repository for yum cookbook
Stars: ✭ 96 (+269.23%)
Mutual labels:  chef, cookbook
omnibus
Prepares a machine to be an Omnibus builder. ┬──┬◡ノ(° -°ノ)
Stars: ✭ 28 (+7.69%)
Mutual labels:  chef, cookbook
Cookstyle
A linting tool that helps you to write better Chef Infra cookbooks by detecting and automatically correcting style, syntax, and logic mistakes in your code.
Stars: ✭ 95 (+265.38%)
Mutual labels:  chef, cookbook
Build Essential
Development repository for build-essential Chef Cookbook
Stars: ✭ 118 (+353.85%)
Mutual labels:  chef, cookbook
Chef Vault
chef-vault cookbook
Stars: ✭ 63 (+142.31%)
Mutual labels:  chef, cookbook
Ssh known hosts
Development repository for Chef Cookbook ssh_known_hosts
Stars: ✭ 73 (+180.77%)
Mutual labels:  chef, cookbook
Chef Server
Cookbook to install standalone Chef Server
Stars: ✭ 173 (+565.38%)
Mutual labels:  chef, cookbook
cookbook-cq
Chef cookbook for Adobe CQ (aka AEM)
Stars: ✭ 20 (-23.08%)
Mutual labels:  chef, cookbook

postgres-hardening (Postgres cookbook)

Supermarket Build Status Code Coverage Dependencies Gitter Chat

Description

Provides security configurations for postgres.

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

Requirements

  • Chef >= 12.5.1

Platform

  • Debian 7, 8
  • Ubuntu 12.04, 14.04, 16.04
  • RHEL 6, 7
  • CentOS 6, 7
  • Oracle Linux 6, 7

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 the following to your runlist and customize security option attributes

  "recipe[postgresql::server]",
  "recipe[postgres-hardening]"

You should also use the official postgres packages, because those offer the latest fixes. Enable the suitable option for the postgres cookbook.

"postgresql": {

   # debian, ubuntu
   "enable_pgdg_apt": true

   # rhel
   "enable_pgdg_yum": true

}

The hardening cookbook is only optimized for Postgresql 9.4. This can be activated for [postgres cookbook](https://github.com/sous-chefs/postgresql.

"postgresql": {
   version: "9.4"
}

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

# Install dependencies
gem install bundler
bundle install

# Do lint checks
bundle exec rake lint

# fast test on one machine
bundle exec kitchen test default-apt-ubuntu-1604

# test on all machines
bundle exec kitchen test

# for development
bundle exec kitchen create default-apt-ubuntu-1604
bundle exec kitchen converge default-apt-ubuntu-1604

Contributors + Kudos

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.

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].