Skip to content

philsnow/AWS-recipes

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS-recipes

Build Status

Installation

  1. Clone this repo
  2. cd to this folder
  3. git submodule init
  4. git submodule update

Update

  1. git pull
  2. git submodule foreach git pull origin master

Session management tools

Because MFA-protected API access is currently not convenient to use for CLI users, iSEC wrote several tools to help management of MFA-related credentials. These scripts leverage the "standardized" way to manage credentials described on the AWS Blog, and build on top of it to facilitate integration with the Security Token Service (STS) and MFA-protected API access.

aws_configure.py

This tool works similarly to the aws configure CLI tool, but saves values in a different file under .aws/credentials.no-mfa, instead of the standard .aws/credentials. It also allows users to configure their MFA serial token number, such that they will no longer have to enter it every time they call the Security Token Service (STS).

./aws_configure

Similar to the AWS CLI, it supports profiles:

./aws_configure --profile isec

aws_init_session.py

This tool reads credentials configured in the .aws/credentials.no-mfa file, prompts users for their MFA code, and retrieves STS credentials (AWS access key ID, AWS secret key, and session token).

./aws_init_session.py

The STS credentials are then saved under the "standardized" .aws/credentials file to be accessible to other tools such as the AWS CLI. After initializing their STS session, users of the AWS CLI may just work as if MFA-protected API access was not there:

aws iam list-users

aws_rotate_my_key.py

Because credentials rotation is important, and because it is almost always overlooked by AWS users, iSEC created a tool that does it for you. When you run this tool, a new access key will be generate and stored in your .credentials.no-mfa file. An STS session using these new credentials will be initialized and your old access key will be deleted.

./aws_rotate_my_key.py

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%