Giter Site home page Giter Site logo

hotcidr's People

Contributors

justinbass avatar skemper avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

hotcidr's Issues

Add VPC-level filtering

Currently HotCIDR can filter groups down to a specific region; we should add a filter down to particular VPCs

boxes.yaml: use regexes to define Security Group set templates

It's a bit tedious laying out every single instance in boxes.yaml. We might change it up to match on hostname (either through tag:Name or reverse DNS), and apply rules based on that. Something like

.*:
  groups:
    - default
dc-.*\.example\.com:
  groups:
    - LdapServer
    - DnsServer

Switch to 'logging'

We use print or .write a lot, and should switch to Python's logging framework where appropriate.

Apply: delete unused security groups

As it is, unused security groups are not deleted in EC2 by apply, as they do not affect the behavior of the network. Still, it would be nice to delete them anyways to clean the VPC up a bit.

Use tempfile

Use python's tempfile library rather than creating hard-coded directories wherever AWS_out and /tmp/hotcidr are mentioned. This is a good coding practice because the temporary files are always deleted, and it enhances cross-platform portability.

Iso date format for expirations

Rather than just allowing seconds-until to be input, a set date (in iso date format) should be allowed for expirations of both kinds (in expirations.yaml and in the rules yaml).

Audit time range should look at all actions

As it is, the time range only looks at the created-date, not the approved date. It should look at the approved date, but more accurately it should look at both actions and include all rules with any action (created or approved) within the time range.

Exception thrown trying to apply rules to terminated instances.

If you have terminated an instance but it has not yet been removed from AWS' system, hotCidr will throw the exception below when trying to apply rules to it.

Unexpected exception raised. Aborting.
Traceback (most recent call last):
  File "/home/jkwan/hotcidr/venv/bin/hc-apply", line 26, in <module>
    args['expected']
  File "/home/jkwan/hotcidr/venv/local/lib/python2.7/site-packages/hotcidr/apply.py", line 230, in main
    action(conn)
  File "/home/jkwan/hotcidr/venv/local/lib/python2.7/site-packages/hotcidr/apply.py", line 13, in __call__
    self.run(conn)
  File "/home/jkwan/hotcidr/venv/local/lib/python2.7/site-packages/hotcidr/apply.py", line 44, in run
    conn.modify_instance_attribute(self.inst_id, self.attr, self.value)
  File "/usr/local/lib/python2.7/dist-packages/boto/ec2/connection.py", line 1262, in modify_instance_attribute
    return self.get_status('ModifyInstanceAttribute', params, verb='POST')
  File "/usr/local/lib/python2.7/dist-packages/boto/connection.py", line 1197, in get_status
    raise self.ResponseError(response.status, response.reason, body)
boto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>InvalidParameterCombination</Code><Message>You may only modify the groupSet attribute for VPC instances</Message></Error></Errors><RequestID>9bde642f-a747-43ba-99b4-3d5b03d35065</RequestID></Response>

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.