Forge Home

harden_docker

Applies hardening rules to a Docker install.

10,276 downloads

6,536 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 1.0.11 (latest)
  • 1.0.9
  • 1.0.8
  • 1.0.7
  • 1.0.6
  • 1.0.5
  • 1.0.4
  • 1.0.3
  • 1.0.2
  • 1.0.1
  • 1.0.0
  • 0.0.14
  • 0.0.13
  • 0.0.12
  • 0.0.11
  • 0.0.10
released Apr 18th 2018
This version is compatible with:
  • Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.7.0 < 6.0.0
  • ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'autostructure-harden_docker', '1.0.11'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add autostructure-harden_docker
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install autostructure-harden_docker --version 1.0.11

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

autostructure/harden_docker — version 1.0.11 Apr 18th 2018

Build Status Puppet Forge Puppet Forge

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with harden_docker
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

Overview

Hardens a Docker installation. Please note: this does NOT install Docker. It does not harden images or containers

Module Description

One of Puppet biggest strength's is securing and enforcing your environment. If you decide to run Docker it's very important you secure its configuration files and daemon.

Docker is a great product, but it open to exploitation by savvy hackers. This module will help ensure:

  • Common sense hardening rules are enforced
  • Basic rules to help network performance between containers

Setup

What harden_docker affects

  • Configuration files and directories
  • Docker daemon Configuration
    • Warning A daemon change will restart dockerd. But, only if the service is managed elsewhere.
  • Auditing rules for configuration files and directories

Setup Requirements

This module requires that Docker already be installed.

Beginning with harden_docker

To have Puppet harden docker with the default parameters, declare the [harden_docker][] class:

class { 'harden_docker': }

Usage

You can choose to turn off management of the files and configurations harden_docker manages.

If you are using Swarm you will want to turn off management of live-restore.

class { 'harden_docker':
  enable_live_restore => false,
}

Reference

Public Classes

Class: harden_docker

Hardens a Docker installation. Please note: this does NOT install Docker. It also does not harden images or containers.

restrict_network_traffic_between_containers

Disables inter-container communication.

Values: true, false

Default: true

set_the_logging_level

Set the logging level ("debug", "info", "warn", "error", "fatal") or false to turn off management (default "info")

Values: false, "debug", "info", "warn", "error", "fatal"

Default: info

allow_docker_to_make_changes_to_iptables

Enable addition of iptables rules.

Values: true, false

Default: true

disable_operations_on_legacy_registry

Disables contacting legacy registries.

Values: true, false

Default: true

enable_live_restore

Enables live restore of docker when containers are still running. Do not use with Swarm.

Values: true, false

Default: true

disable_userland_proxy

Disables use of userland proxy for loopback traffic.

Values: true, false

Default: true

Limitations

Currently only supports Linux OS's.

Development

Feel free to pull and contribute.