Giter VIP home page Giter VIP logo

chef-postgres-hardening's Introduction

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.

chef-postgres-hardening's People

Contributors

arlimus avatar artem-sidorenko avatar atomic111 avatar chris-rock avatar ehaselwanter avatar renovate[bot] avatar schurzi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chef-postgres-hardening's Issues

Remove default self-generated ssl certificates

On Ubuntu postgres is shipped with default ssl certificates. The usage is not recommended for production use, because it allows man-in-the-middle attacks. Therefore we are required to remove all defaults for ssl certificates.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

bundler
Gemfile
  • berkshelf '~> 8.0'
  • chef '~> 18.0'
  • chefspec '~> 9.3.0'
  • foodcritic '~> 16.0'
  • rubocop '~> 1.62.0'
  • simplecov '~> 0.10'
  • guard-foodcritic '~> 3.0'
  • test-kitchen '~> 3.0'
  • github_changelog_generator '~> 1.16.0'
github-actions
.github/workflows/codespell.yml

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.