Skip to main content

Cloud Custodian - Automated Policy Documentation

Project description

Automated Cloud Custodian Policy Documentation

What is c7n-autodoc?

Automated Cloud Custodian policy documentation for your business partners.

Why use c7n-autodoc?

Administrators of cloud platforms need provide their business partners with clear and accurate documentation regarding the security, governance and cost control policies. The easiest way to stay on top of your documentation is to automate it. This utility will create an HTML file with easy to read information regarding your existing Cloud Custodian policies.

Features include:

  • Automatically writes to S3 bucket
  • Groups policies by resource type
  • Groups policies by category (i.e 'Security & Governance' vs 'Cost Controls')
  • Provide links to underlying file in GitLab/GitHub
  • Uses policy tags to determine applicable environments

Assumptions

  • You have added any necessary security controls to the destination S3 bucket
  • Local credentials exist for the boto3 module to push the file to S3

Installation

NOTE: Requires python3

pip3 install pyyaml boto3 jinja2 jsonschema

Configuration

The only item you should need to customize is the configuration YAML file which is required by the script. Look at the example file provided to determine which fields are required and which are optional. You can also customize the jinja2 template to further modify the HTML documentation which is created.

The S3 bucket which will house the HTML file needs to have Static website hosting enabled. The default (index.html, error.html) are fine because you will be directly targeting the c7n-autodoc.html file.

Run

For the best results this script should be run as a part of a CI/CD pipeline.

python3 c7n-autodoc.py -c my_config_file.yml

Assuming there aren't any issues you should see the HTML file in the S3 bucket.

Example

alt text

TODO

  • Account for different policies for proper rendering
  • Improved UI layout
  • Easier user setup

Project details


Release history Release notifications | RSS feed

This version

0.3

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

c7n_autodoc-0.3.tar.gz (2.5 kB view details)

Uploaded Source

File details

Details for the file c7n_autodoc-0.3.tar.gz.

File metadata

  • Download URL: c7n_autodoc-0.3.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for c7n_autodoc-0.3.tar.gz
Algorithm Hash digest
SHA256 9abd335627f24b5a1289ec549671e384952a472cd0273f2e9aaa620d4227e0f5
MD5 1406768b3aabe18555cb71178f3f46e0
BLAKE2b-256 d6aaa45a1b42fa11fb6244cfab811ee7c5f99b30a88dcd4d8e4fd71b39cb998b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page