All Projects → 99designs → Aws Vault

99designs / Aws Vault

Licence: mit
A vault for securely storing and accessing AWS credentials in development environments

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to Aws Vault

Iamy
A cli tool for importing and exporting AWS IAM configuration to YAML files
Stars: ✭ 200 (-96.45%)
Mutual labels:  aws, cli, iam
Aegea
Amazon Web Services Operator Interface
Stars: ✭ 51 (-99.09%)
Mutual labels:  aws, cli, iam
Aws Gate
Better AWS SSM Session manager CLI client
Stars: ✭ 294 (-94.77%)
Mutual labels:  aws, cli
Lambdaguard
AWS Serverless Security
Stars: ✭ 300 (-94.67%)
Mutual labels:  aws, iam
Trailscraper
A command-line tool to get valuable information out of AWS CloudTrail
Stars: ✭ 352 (-93.74%)
Mutual labels:  aws, iam
Sagify
MLOps for AWS SageMaker. www.sagifyml.com
Stars: ✭ 277 (-95.08%)
Mutual labels:  aws, cli
Maxkey
MaxKey is Single Sign On(SSO) System,Leading-Edge Enterprise-Class open source IAM(Identity and Access management) product.
Stars: ✭ 274 (-95.13%)
Mutual labels:  iam, mfa
Terraform Aws Iam
Terraform module which creates IAM resources on AWS
Stars: ✭ 314 (-94.42%)
Mutual labels:  aws, iam
terraform-aws-iam-assumed-roles
Terraform Module for Assumed Roles on AWS with IAM Groups Requiring MFA
Stars: ✭ 33 (-99.41%)
Mutual labels:  iam, mfa
Serverlessui
A command-line utility for deploying serverless applications to AWS. Complete with custom domains, deploy previews, TypeScript support, and more.
Stars: ✭ 434 (-92.29%)
Mutual labels:  aws, cli
Aws Google Auth
Provides AWS STS credentials based on Google Apps SAML SSO auth (what a jumble!)
Stars: ✭ 428 (-92.39%)
Mutual labels:  aws, cli
Org Formation Cli
Better than landingzones!
Stars: ✭ 471 (-91.63%)
Mutual labels:  aws, cli
pyark
CyberArk Enterprise Password Vault API CLI tool
Stars: ✭ 25 (-99.56%)
Mutual labels:  credentials, iam
alks-cli
CLI for working with the ALKS service.
Stars: ✭ 40 (-99.29%)
Mutual labels:  keychain, iam
Iam Policy Json To Terraform
Small tool to convert an IAM Policy in JSON format into a Terraform aws_iam_policy_document
Stars: ✭ 282 (-94.99%)
Mutual labels:  aws, iam
vault-token-helper
@hashicorp Vault Token Helper for macOS, Linux and Windows with support for secure token storage and multiple Vault servers 🔐
Stars: ✭ 74 (-98.68%)
Mutual labels:  credentials, keychain
Airiam
Least privilege AWS IAM Terraformer
Stars: ✭ 304 (-94.6%)
Mutual labels:  aws, iam
Pmapper
A tool for quickly evaluating IAM permissions in AWS.
Stars: ✭ 494 (-91.22%)
Mutual labels:  aws, iam
Aaia
AWS Identity and Access Management Visualizer and Anomaly Finder
Stars: ✭ 218 (-96.13%)
Mutual labels:  aws, iam
Complete Aws Iam Reference
Complete AWS IAM Reference
Stars: ✭ 236 (-95.81%)
Mutual labels:  aws, iam

AWS Vault

Downloads Go Report Card Continuous Integration

AWS Vault is a tool to securely store and access AWS credentials in a development environment.

AWS Vault stores IAM credentials in your operating system's secure keystore and then generates temporary credentials from those to expose to your shell and applications. It's designed to be complementary to the AWS CLI tools, and is aware of your profiles and configuration in ~/.aws/config.

Check out the announcement blog post for more details.

Installing

You can install AWS Vault:

  • by downloading the latest release
  • on macOS with Homebrew Cask: brew install --cask aws-vault
  • on macOS with MacPorts: port install aws-vault
  • on Windows with Chocolatey: choco install aws-vault
  • on Windows with Scoop: scoop install aws-vault
  • on Linux with Homebrew on Linux: brew install aws-vault
  • on Arch Linux: pacman -S aws-vault
  • on FreeBSD: pkg install aws-vault
  • on OpenSUSE: enable devel:languages:go repo then zypper install aws-vault
  • with Nix: nix-env -i aws-vault
  • with asdf-vm: asdf plugin-add aws-vault https://github.com/karancode/asdf-aws-vault.git && asdf install aws-vault <version>

Documentation

Config, usage, tips and tricks are available in the USAGE.md file.

Vaulting Backends

The supported vaulting backends are:

Use the --backend flag or AWS_VAULT_BACKEND environment variable to specify.

Quick start

# Store AWS credentials for the "jonsmith" profile
$ aws-vault add jonsmith
Enter Access Key Id: ABDCDEFDASDASF
Enter Secret Key: %%%

# Execute a command (using temporary credentials)
$ aws-vault exec jonsmith -- aws s3 ls
bucket_1
bucket_2

# open a browser window and login to the AWS Console
$ aws-vault login jonsmith

# List credentials
$ aws-vault list
Profile                  Credentials              Sessions
=======                  ===========              ========
jonsmith                 jonsmith                 -

How it works

aws-vault uses Amazon's STS service to generate temporary credentials via the GetSessionToken or AssumeRole API calls. These expire in a short period of time, so the risk of leaking credentials is reduced.

AWS Vault then exposes the temporary credentials to the sub-process in one of two ways

  1. Environment variables are written to the sub-process. Notice in the below example how the AWS credentials get written out
    $ aws-vault exec jonsmith -- env | grep AWS
    AWS_VAULT=jonsmith
    AWS_DEFAULT_REGION=us-east-1
    AWS_REGION=us-east-1
    AWS_ACCESS_KEY_ID=%%%
    AWS_SECRET_ACCESS_KEY=%%%
    AWS_SESSION_TOKEN=%%%
    AWS_SECURITY_TOKEN=%%%
    AWS_SESSION_EXPIRATION=2020-04-16T11:16:27Z
  2. Local EC2 Instance Metadata server is started. This approach has the advantage that anything that uses Amazon's SDKs will automatically refresh credentials as needed, so session times can be as short as possible. The downside is that only one can run per host and because it binds to 169.254.169.254:80, your sudo password is required.

The default is to use environment variables, but you can opt-in to the local instance metadata server with the --server flag on the exec command.

Roles and MFA

Best-practice is to create Roles to delegate permissions. For security, you should also require that users provide a one-time key generated from a multi-factor authentication (MFA) device.

First you'll need to create the users and roles in IAM, as well as setup an MFA device. You can then set up IAM roles to enforce MFA.

Here's an example configuration using roles and MFA:

[default]
region = us-east-1

[profile jonsmith]
mfa_serial = arn:aws:iam::111111111111:mfa/jonsmith

[profile foo-readonly]
source_profile = jonsmith
role_arn = arn:aws:iam::22222222222:role/ReadOnly

[profile foo-admin]
source_profile = jonsmith
role_arn = arn:aws:iam::22222222222:role/Administrator
mfa_serial = arn:aws:iam::111111111111:mfa/jonsmith

[profile bar-role1]
source_profile = jonsmith
role_arn = arn:aws:iam::333333333333:role/Role1
mfa_serial = arn:aws:iam::111111111111:mfa/jonsmith

[profile bar-role2]
source_profile = bar-role1
role_arn = arn:aws:iam::333333333333:role/Role2
mfa_serial = arn:aws:iam::111111111111:mfa/jonsmith

Here's what you can expect from aws-vault

Command Credentials Cached MFA
aws-vault exec jonsmith --no-session Long-term credentials No No
aws-vault exec jonsmith session-token session-token Yes
aws-vault exec foo-readonly role No No
aws-vault exec foo-admin session-token + role session-token Yes
aws-vault exec foo-admin --duration=2h role role Yes
aws-vault exec bar-role2 session-token + role + role session-token Yes
aws-vault exec bar-role2 --no-session role + role role Yes

Development

The macOS release builds are code-signed to avoid extra prompts in Keychain. You can verify this with:

$ codesign --verify --verbose $(which aws-vault)

If you are developing or compiling the aws-vault binary yourself, you can generate a self-signed certificate by accessing Keychain Access > Certificate Assistant > Create Certificate -> Certificate Type: Code Signing. You can then sign your binary with:

$ go build .
$ codesign --sign <Name of certificate created above> ./aws-vault

References and Inspiration

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].