GithubHelp home page GithubHelp logo

mirri.js's Introduction

Mirri.js

Javascript based toolkit for automatically rotating aws IAM access keys in the AWS Credentials File. Mirri attempts to swap out AWS IAM Keys. It does this by:

  • Determining the current user and profile being used.
  • Creating a new IAM access key for this user.
  • Downloading the access key.
  • Updating the profile's credentials by overwriting the existing access key in the credentials file.
  • Marking the original access key as invalid in aws IAM.

npm version Build Status

Usage

Rotate

Rotate the access key associated with the profile. Forcing a rotation, will automatically detect and delete extra unused keys. If force is not specified rotate will fail if there are two keys in use.

    mirri rotate [--force] [profile name]

Schedule auto rotate

Rotate the access key associated with the profile on a schedule. The default is weekly rotate. Frequency is a crontab frequency. You must have mirri and node on your path for default scheduling to work. If using cron this means having something like this PATH=/home/USER/.nvm/versions/node/v8.4.0/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin specified. Cron uses a reduced path. If you don't wish to specify a path in your crontab instead pass -p as an option. Options:

  • -p --path: register mirri with the full path to the executable. This is important if your scheduling system does not contain your node modules in the path.
    mirri schedule [options] [profile name] [frequency]

Cleanup

AWS only allows two access key per IAM user. If there are already two, only one of them is being used. Cleanup will delete the other key, so that a new one can be created.

    mirri cleanup [profile name]

Caveats

Since most OS sandbox script execution environment variables cannot be changed with mirri. (For further information see #1)

mirri.js's People

Contributors

wparad avatar dependabot[bot] avatar

Stargazers

Markus Thurner avatar Ivaylo Novakov avatar Igor Sowinski avatar Rafal Nowosielski avatar  avatar

Watchers

 avatar Rafal Nowosielski avatar  avatar

mirri.js's Issues

Schedule requires crontab PATH update

Scheduled mirri won't work without a PATH update to include the npm bin location. You'll have to add it manually to crontab. It would be nice for the scheduled command to work automatically.

Rotate Environment Variables

If the credentials which are rotated are also stored in the environment variables, it should be updated as well.

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.