Giter Site home page Giter Site logo

update-iam-human's Introduction

update-iam-human

A script to rotate IAM credentials of human beings.

  1. using a list of human beings,

Usage:

1. Generate a CSV file of human beings:

$ ./generate-csv.sh

This will generate a set of CSV files using the results of the AWS credentials report.

The one we need is called humans.csv and has just three columns: name, iam-username and email.

This file is used to send emails to those users.

The name and email columns must be filled.

Copying the humans.csv file from it-admin into private will save some time filling in missing names and emails.

See example.csv.

2. Generate a plan of action

$ ./update-iam.sh csv-file

This generates a list of actions to be performed and writes the plan to $csvfile-report-$datestamp.json.

For example, humans-report-2019-01-01.json

Review the actions to be taken.

Do not modify the file, it will be regenerated on execution. Instead, modify AWS IAM and humans.csv if necessary and re-run update-iam.sh.

When credentials must be rotated earlier than the default rotation age (180 days), specify a --max-key-age.

For example, to rotate all credentials now, do:

$ ./update-iam.sh csv-file --max-key-age=0

To force the rotation of credentials that are mid-transition (the grace period hasn't expired yet and two sets of credentials exist), a shorter grace period can be set:

$ ./update-iam.sh csv-file --grace-period=0

3. Execute the plan of action.

$ ./update-iam.sh csv-file --execute

After execution a report will be written in the form of $csvfile-results-$datestamp.json.

For example, humans-results-2019-01-01.json

missing features

update-iam-human does not:

  • notify a user when credentials are disabled
  • delete the generated Github Gists as users update their credentials

Requirements

  • Github credentials to create a secret gist
  • AWS credentials to list and update IAM users and send SES emails

Github credentials live in the file private.json in the root of the project and look like:

{"key": "<your api token>"}

AWS Credentials are referenced from the usual places.

Install

$ ./install.sh

Test

$ ./test.sh

update-iam-human's People

Contributors

lsh-0 avatar nuclearredeye avatar

Watchers

Nathan Lisgo avatar Paul Shannon avatar James Cloos avatar Graham Nott avatar  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.