GithubHelp home page GithubHelp logo

g-sam / aws-access Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jamiemccrindle/aws-access

0.0 0.0 0.0 48 KB

Update an AWS security group with your current IP

License: Apache License 2.0

JavaScript 100.00%

aws-access's Introduction

AWS Access

aws-access is a command line utility to update an AWS security group with your current IP across one or more regions.

This is a relatively cheap way to lock down access to AWS resources to whitelisted ips. Defaults to whitelisting port 22. Configure ports using the --ports|-P argument.

To use:

  • Step 1: Create security group for whitelisted ips e.g. 'remote-working'
  • Step 2: Assign security group to appropriate resources
  • Step 3: Install aws-access npm install -g aws-access
  • Step 4: Set up aws credentials
  • Step 5: Run aws-access to whitelist your current ip e.g. aws-access -g remote-working

Example

# enable access to SSH and Postgres from the current IP
aws-access -p myprofile -g mysecuritygroup -r us-east-1 eu-west-1 -P 22 5432

Installing

npm install -g aws-access

Prerequisites

  • nodejs 7.6+

Command Line

aws-access

Options:
  -h             Show help                                             [boolean]
  -p, --profile                                                       [optional]
  -g, --group                                                         [required]
  -r, --region                                            [default: "us-east-1"]
  -P, --ports                                          [array] [default: ["22"]]

Security Considerations

  • It's likely that a users IP will be stale over time, potentially allowing access to the AWS resources from unexpected IPs. This is still better than allowing access from the whole internet (i.e. 0.0.0.0/0) but this should be part of a defense in depth i.e. resources that are made accessible via aws-access should also be properly secured.
  • Removing old users from the security group managed by aws-access should be part of any offboarding process
  • If a user is renamed, their old username should be cleaned from the security group managed by aws-access
  • If this is used for multiple users, any of the users have the ability to modify rules set up by other users

aws-access's People

Contributors

jamiemccrindle avatar

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.