Skip to main content

roadhouse

Library for sanely managing AWS security settings

Why does this exist?

Managing your AWS security settings through the AWS console is problematic for several reasons. Aside from using the console, your options are to use a library like boto. This is fine, but really more work than I care to do for my environments.

Roadhouse is an attempt to apply configuration management to AWS’s settings. Think of it as Puppet/Chef/Salt for AWS.

Within roadhouse, a config can be applied to a VPC. This allows the same configuration to be used across multiple VPCs. It’s useful in cases where you want to run multiple VPCs with the same configuration. For instance, this is useful when running across multiple datacenters for fault tolerance.

Config File Syntax

The config file is YAML based. Groups are the top level object. Within a group are options and rules. Rules are specified using a syntax similar to tcpdump (at a very, very trivial level). For ICMP protocol we use ICMP Type Numbers for port. More information is available at: https://www.iana.org/assignments/icmp-parameters/icmp-parameters.xhtml

  • <protocol:optional, tcp by default> <port> <group_or_ip_mask_optional>

It should be easier to understand a valid configuration based on example:

test_database_group:
options:

description: cassandra and redis prune: true # remove rules not listed here

rules:
  • tcp port 22 166.1.1.1/32 # mysterious office IP

  • tcp port 9160, 6379 test_web_group # refer to a group by name

  • port 55 192.168.1.1 # /32 by default

  • tcp port 22-50, 55-60 192.168.1.1

  • icmp port 0 192.168.1.1 # ICMP Type 0; Echo Reply

test_web_group:
options:

description: web servers prune: false # false by default

rules:
  • tcp port 80 0.0.0.0/0

  • icmp port 8 192.168.1.1/32 # ICMP Type 8; Timestamp

Usage

from roadhouse.group import SecurityGroupsConfig v = vpc.connect_to_region(‘us-west-1’) e = ec2.connect_to_region(‘us-west-1’)

# assuming you only have 1 vpc already created # otherwise you’ll need to pick the right VPC you want # to apply your changes to vpc = v.get_all_vpcs()[0]

config = SecurityGroupsConfig.load(“roadhouse.yaml”) config.configure(ec2_conn) config.apply(vpc)

Development

In a virtualenv, pip install -r requirements

Metadata

Release files for roadhouse 0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for roadhouse 0.6
File Size Uploaded Provenance Actions
roadhouse-0.6.tar.gz 5.6 kB Without provenance Details for roadhouse-0.6.tar.gz

Release files / roadhouse-0.6.tar.gz

Download URL roadhouse-0.6.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
942fa1affb5935df8b8b9c6d011330e040330e24c12758845bc3fcf7918268b0
BLAKE2b-256 checksum
How to use checksums
411e95c46d9f2b178a0c4f6cd38e79e61164891cd9add0f808a3a96435c00e7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for roadhouse 0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page