~openstack-charmers-next/charms/xenial/nova-compute/trunk

« back to all changes in this revision

Viewing changes to hooks/charmhelpers/contrib/hardening/README.hardening.md

  • Committer: Edward Hope-Morley
  • Date: 2016-03-24 11:18:41 UTC
  • mto: This revision was merged to the branch mainline in revision 211.
  • Revision ID: edward.hope-morley@canonical.com-20160324111841-99ruo5hjzrpqktlx
Add hardening support

Add charmhelpers.contrib.hardening and calls to install,
config-changed, upgrade-charm and update-status hooks.
Also add new config option to allow one or more hardening
modules to be applied at runtime.

Change-Id: I525c15a14662175f2a68cdcd25a3ab2c92237850

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Juju charm-helpers hardening library
 
2
 
 
3
## Description
 
4
 
 
5
This library provides multiple implementations of system and application
 
6
hardening that conform to the standards of http://hardening.io/.
 
7
 
 
8
Current implementations include:
 
9
 
 
10
 * OS
 
11
 * SSH
 
12
 * MySQL
 
13
 * Apache
 
14
 
 
15
## Requirements
 
16
 
 
17
* Juju Charms
 
18
 
 
19
## Usage
 
20
 
 
21
1. Synchronise this library into your charm and add the harden() decorator
 
22
   (from contrib.hardening.harden) to any functions or methods you want to use
 
23
   to trigger hardening of your application/system.
 
24
 
 
25
2. Add a config option called 'harden' to your charm config.yaml and set it to
 
26
   a space-delimited list of hardening modules you want to run e.g. "os ssh"
 
27
 
 
28
3. Override any config defaults (contrib.hardening.defaults) by adding a file
 
29
   called hardening.yaml to your charm root containing the name(s) of the
 
30
   modules whose settings you want override at root level and then any settings
 
31
   with overrides e.g.
 
32
   
 
33
   os:
 
34
       general:
 
35
            desktop_enable: True
 
36
 
 
37
4. Now just run your charm as usual and hardening will be applied each time the
 
38
   hook runs.