SlideShare a Scribd company logo
Securing your AWS Infrastructure with
Hashicorp Vault
@njsaunders
neil@beamly.com
Contents
• A review of AWS security concepts
• Leaks at Beamly
• An Introduction to Hashicorp Vault
• How we use use Vault at Beamly
AWS Credentials
Come in pairs:
AWS Access Key ID (20 characters, uppercase alphanumeric)
AWS Secret Key (Exactly 40 characters, mixed case alphanumeric with symbols)
access_key AKIAJ6QZIDJJPHWZ4STA
secret_key 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
Ultimately map to one or more “IAM policies” - JSON document that describes what AWS
services you can interact with and at what level
Sources of Keys
• AWS Root Key
– Delete Immediately!
• IAM Roles
– Assigned to machines on boot – Credentials dynamically generated and
automatically rotated (Managed by AWS Client Libraries). As secure as it
gets.
• IAM Users
– Assigned static keys – Used by entities outside of AWS (External services,
developers)
Leak 1
Australia
DC
Neil Saunders (Beamly) - Securing your AWS Infrastructure with Hashicorp Vault
Response
• Killed the AWS Root key permanently
• Created IAM Roles for services
• Everyone ran around redeploying old services to use IAM
• Created IAM groups with restricted access (platform, engineering, finance)
• Set up individual IAM account for every engineer
• Put each user in an IAM group
Leak 2
Neil Saunders (Beamly) - Securing your AWS Infrastructure with Hashicorp Vault
Hashicorp Vault: Introduction
• A tool to securely store secrets
– Passwords
– API Keys
– Anything you want to tightly control access to
• Secrets are encrypted at rest and in transit
• HTTP API
• Uses pluggable back ends for storage/authentication/auditing
Hashicorp Vault: Storage Backends
• Vault supports writing encrypted data to a variety of persistence tiers:
– etcd
– zookeeper
– dynamodb
– s3
– mysql
– PostgreSQL
– Memory
– Filesystem
– consul
• Beamly use Consul
Hashicorp Vault: Authentication Backends
• Before you can read data from Vault you need to authenticate
• Vault provides a variety of authentication backends:
– Username and password
– Github
– TLS Certificates
– LDAP
• Beamly use LDAP
Hashicorp Vault: Secrets Backends
• In addition to storing static secrets, supports dynamically generating
credentials on read
– AWS
– Cassandra
– PostgreSQL
– MySQL
– MSSQL
– PKI – X509 Certificates
• Currently Beamly only use the AWS backend
Hashicorp Vault: Policies
Control what secrets a vault authenticated user can access
path "aws/creds/engineering" {
policy = "read"
}
path "auth/token/lookup-self"
{
policy = "read"
}
vault write auth/ldap/groups/engineering policies=engineering
Success! Data written to: auth/ldap/groups/engineering
vault policy-write engineering
vault-acl-engineering.json
Hashicorp Vault: Beamly Setup
Authenticate me (Username, password)
Valid?
Yes, and member X & Y
Vault authentication token
Vault authentication token
Give me an AWS key & secret (Token)
Create IAM user with permissions for X & Y
IAM tokens for a new user with X & Y
AWS Key & Secret Key with permissions for X & Y
Delete user
Delete user
Token/IAM username
Making it usable for developers
• Beamly have a homebrew tap to distribute scripts
• brew install platform-tools
• Brew formula dependency on Vault
• “awsauth” shell script
– Reads the uid
– Prompts the user for their LDAP password
– Authenticates against vault using the uid:password combo
– Parses the output and reads the authentication token
– Calls Vault to read the AWS secrets backend for the “engineering” policy (By default) using the
authentication token previously generated
– Sets all combination of environment variables
– Writes all popular AWS client files (Boto, aws-cli)
– Valid for 1 hour
Neil Saunders (Beamly) - Securing your AWS Infrastructure with Hashicorp Vault
Neil Saunders (Beamly) - Securing your AWS Infrastructure with Hashicorp Vault
Summary
• Humans fail: Design for it
• Make that philosophy public
• Secrets should exist for the least amount of time possible
• Vault is a well thought out, well documented, flexible tool
Questions?
@njsaunders
neil@beamly.com
awsauth gist: http://bit.ly/1UAMYFG
LONDON
Drury House
34-43 Russell Street
London
WC2B 5HA
NEW YORK CITY
84 Wooster Street
Suite 703
New York
NY 10012
© Beamly 2014. All Rights Reserved.

More Related Content

PPTX
Hashicorp Vault ppt
PDF
Vault 101
PDF
HashiCorp's Vault - The Examples
PPTX
Vault - Secret and Key Management
PDF
Vault
PDF
Secret Management with Hashicorp’s Vault
PDF
Chickens & Eggs: Managing secrets in AWS with Hashicorp Vault
PPTX
Keeping a Secret with HashiCorp Vault
Hashicorp Vault ppt
Vault 101
HashiCorp's Vault - The Examples
Vault - Secret and Key Management
Vault
Secret Management with Hashicorp’s Vault
Chickens & Eggs: Managing secrets in AWS with Hashicorp Vault
Keeping a Secret with HashiCorp Vault

What's hot (20)

PDF
Introduction to Vault
PDF
Introducing Vault
PDF
Credential store using HashiCorp Vault
PDF
Adopting HashiCorp Vault
PDF
Hashicorp Vault: Open Source Secrets Management at #OPEN18
PDF
Overview of secret management solutions and architecture
ODP
Monitoring With Prometheus
PDF
DevSecOps: What Why and How : Blackhat 2019
PDF
Prometheus
PPTX
Docker Container Security
PPTX
Secret Management with Hashicorp Vault and Consul on Kubernetes
PPTX
Secure your app with keycloak
PPTX
Designing High Availability for HashiCorp Vault in AWS
PDF
Keycloak Single Sign-On
PDF
Hashicorp Vault - OPEN Public Sector
PDF
Managing secrets at scale
PDF
Kubernetes Security Best Practices - With tips for the CKS exam
PPTX
Kubernetes and container security
PDF
Kubernetes security
Introduction to Vault
Introducing Vault
Credential store using HashiCorp Vault
Adopting HashiCorp Vault
Hashicorp Vault: Open Source Secrets Management at #OPEN18
Overview of secret management solutions and architecture
Monitoring With Prometheus
DevSecOps: What Why and How : Blackhat 2019
Prometheus
Docker Container Security
Secret Management with Hashicorp Vault and Consul on Kubernetes
Secure your app with keycloak
Designing High Availability for HashiCorp Vault in AWS
Keycloak Single Sign-On
Hashicorp Vault - OPEN Public Sector
Managing secrets at scale
Kubernetes Security Best Practices - With tips for the CKS exam
Kubernetes and container security
Kubernetes security
Ad

Similar to Neil Saunders (Beamly) - Securing your AWS Infrastructure with Hashicorp Vault (20)

PPT
Secret Mgmt using vault DevSecOps sg Meetup
PDF
Vault 1.4 launch webinar
PDF
Vault 1.4 integrated storage overview
PPTX
Security Basics in AWS or How To Get Rid of Hardcoded Credential and Reduce D...
PDF
Can you keep a secret? (XP Days 2017)
PDF
HashiCorp Vault Workshop:幫 Credentials 找個窩
PDF
Eliminating Secret Sprawl in the Cloud with HashiCorp Vault - 07.11.2018
PDF
Issuing temporary credentials for my sql using hashicorp vault
PDF
HashiConf Digital 2020: HashiCorp Vault configuration as code via HashiCorp T...
PPTX
Secrets management in the cloud
PPTX
Securing AWS Accounts with Hashi Vault
PPTX
Big data security in AWS.pptx
PDF
2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...
PPTX
Vault Open Source vs Enterprise v2
PPTX
DevOops Redux Ken Johnson Chris Gates - AppSec USA 2016
PPTX
hashicorp-virtualdays-vaultkeeping-a-secret-200409143039.pptx
PDF
A tale of application development
PDF
Protect YugabyteDB with Hashicorp Vault.pdf
PPTX
Vault w/ config injection kubernetes canada
PDF
Zero trust in a multi tenant environment
Secret Mgmt using vault DevSecOps sg Meetup
Vault 1.4 launch webinar
Vault 1.4 integrated storage overview
Security Basics in AWS or How To Get Rid of Hardcoded Credential and Reduce D...
Can you keep a secret? (XP Days 2017)
HashiCorp Vault Workshop:幫 Credentials 找個窩
Eliminating Secret Sprawl in the Cloud with HashiCorp Vault - 07.11.2018
Issuing temporary credentials for my sql using hashicorp vault
HashiConf Digital 2020: HashiCorp Vault configuration as code via HashiCorp T...
Secrets management in the cloud
Securing AWS Accounts with Hashi Vault
Big data security in AWS.pptx
2020-02-20 - HashiTalks 2020 - HashiCorp Vault configuration as code via Hash...
Vault Open Source vs Enterprise v2
DevOops Redux Ken Johnson Chris Gates - AppSec USA 2016
hashicorp-virtualdays-vaultkeeping-a-secret-200409143039.pptx
A tale of application development
Protect YugabyteDB with Hashicorp Vault.pdf
Vault w/ config injection kubernetes canada
Zero trust in a multi tenant environment
Ad

More from Outlyer (20)

PPTX
Murat Karslioglu, VP Solutions @ OpenEBS - Containerized storage for containe...
PPTX
How & When to Feature Flag
PPTX
Why You Need to Stop Using "The" Staging Server
PPTX
How GitHub combined with CI empowers rapid product delivery at Credit Karma
PPTX
Packaging Services with Nix
PDF
Minimum Viable Docker: our journey towards orchestration
PDF
Ops is dead. long live ops.
PDF
The service mesh: resilient communication for microservice applications
PPTX
Microservices: Why We Did It (and should you?)
PPTX
Renan Dias: Using Alexa to deploy applications to Kubernetes
PDF
Alex Dias: how to build a docker monitoring solution
PPTX
How to build a container monitoring solution - David Gildeh, CEO and Co-Found...
PDF
Heresy in the church of - Corey Quinn, Principal at The Quinn Advisory Group
PDF
Anatomy of a real-life incident -Alex Solomon, CTO and Co-Founder of PagerDuty
PDF
A Holistic View of Operational Capabilities—Roy Rapoport, Insight Engineering...
PPTX
The Network Knows—Avi Freedman, CEO & Co-Founder of Kentik
PPTX
Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...
PDF
Zero Downtime Postgres Upgrades
PDF
DOXLON November 2016: Facebook Engineering on cgroupv2
PDF
DOXLON November 2016 - ELK Stack and Beats
Murat Karslioglu, VP Solutions @ OpenEBS - Containerized storage for containe...
How & When to Feature Flag
Why You Need to Stop Using "The" Staging Server
How GitHub combined with CI empowers rapid product delivery at Credit Karma
Packaging Services with Nix
Minimum Viable Docker: our journey towards orchestration
Ops is dead. long live ops.
The service mesh: resilient communication for microservice applications
Microservices: Why We Did It (and should you?)
Renan Dias: Using Alexa to deploy applications to Kubernetes
Alex Dias: how to build a docker monitoring solution
How to build a container monitoring solution - David Gildeh, CEO and Co-Found...
Heresy in the church of - Corey Quinn, Principal at The Quinn Advisory Group
Anatomy of a real-life incident -Alex Solomon, CTO and Co-Founder of PagerDuty
A Holistic View of Operational Capabilities—Roy Rapoport, Insight Engineering...
The Network Knows—Avi Freedman, CEO & Co-Founder of Kentik
Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...
Zero Downtime Postgres Upgrades
DOXLON November 2016: Facebook Engineering on cgroupv2
DOXLON November 2016 - ELK Stack and Beats

Recently uploaded (20)

PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
Well-logging-methods_new................
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPT
Mechanical Engineering MATERIALS Selection
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
OOP with Java - Java Introduction (Basics)
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
Structs to JSON How Go Powers REST APIs.pdf
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Well-logging-methods_new................
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Mechanical Engineering MATERIALS Selection
Internet of Things (IOT) - A guide to understanding
bas. eng. economics group 4 presentation 1.pptx
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
CH1 Production IntroductoryConcepts.pptx
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
OOP with Java - Java Introduction (Basics)
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Structs to JSON How Go Powers REST APIs.pdf
Operating System & Kernel Study Guide-1 - converted.pdf
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...

Neil Saunders (Beamly) - Securing your AWS Infrastructure with Hashicorp Vault

  • 1. Securing your AWS Infrastructure with Hashicorp Vault @njsaunders neil@beamly.com
  • 2. Contents • A review of AWS security concepts • Leaks at Beamly • An Introduction to Hashicorp Vault • How we use use Vault at Beamly
  • 3. AWS Credentials Come in pairs: AWS Access Key ID (20 characters, uppercase alphanumeric) AWS Secret Key (Exactly 40 characters, mixed case alphanumeric with symbols) access_key AKIAJ6QZIDJJPHWZ4STA secret_key 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 Ultimately map to one or more “IAM policies” - JSON document that describes what AWS services you can interact with and at what level
  • 4. Sources of Keys • AWS Root Key – Delete Immediately! • IAM Roles – Assigned to machines on boot – Credentials dynamically generated and automatically rotated (Managed by AWS Client Libraries). As secure as it gets. • IAM Users – Assigned static keys – Used by entities outside of AWS (External services, developers)
  • 7. Response • Killed the AWS Root key permanently • Created IAM Roles for services • Everyone ran around redeploying old services to use IAM • Created IAM groups with restricted access (platform, engineering, finance) • Set up individual IAM account for every engineer • Put each user in an IAM group
  • 10. Hashicorp Vault: Introduction • A tool to securely store secrets – Passwords – API Keys – Anything you want to tightly control access to • Secrets are encrypted at rest and in transit • HTTP API • Uses pluggable back ends for storage/authentication/auditing
  • 11. Hashicorp Vault: Storage Backends • Vault supports writing encrypted data to a variety of persistence tiers: – etcd – zookeeper – dynamodb – s3 – mysql – PostgreSQL – Memory – Filesystem – consul • Beamly use Consul
  • 12. Hashicorp Vault: Authentication Backends • Before you can read data from Vault you need to authenticate • Vault provides a variety of authentication backends: – Username and password – Github – TLS Certificates – LDAP • Beamly use LDAP
  • 13. Hashicorp Vault: Secrets Backends • In addition to storing static secrets, supports dynamically generating credentials on read – AWS – Cassandra – PostgreSQL – MySQL – MSSQL – PKI – X509 Certificates • Currently Beamly only use the AWS backend
  • 14. Hashicorp Vault: Policies Control what secrets a vault authenticated user can access path "aws/creds/engineering" { policy = "read" } path "auth/token/lookup-self" { policy = "read" } vault write auth/ldap/groups/engineering policies=engineering Success! Data written to: auth/ldap/groups/engineering vault policy-write engineering vault-acl-engineering.json
  • 16. Authenticate me (Username, password) Valid? Yes, and member X & Y Vault authentication token Vault authentication token Give me an AWS key & secret (Token) Create IAM user with permissions for X & Y IAM tokens for a new user with X & Y AWS Key & Secret Key with permissions for X & Y Delete user Delete user Token/IAM username
  • 17. Making it usable for developers • Beamly have a homebrew tap to distribute scripts • brew install platform-tools • Brew formula dependency on Vault • “awsauth” shell script – Reads the uid – Prompts the user for their LDAP password – Authenticates against vault using the uid:password combo – Parses the output and reads the authentication token – Calls Vault to read the AWS secrets backend for the “engineering” policy (By default) using the authentication token previously generated – Sets all combination of environment variables – Writes all popular AWS client files (Boto, aws-cli) – Valid for 1 hour
  • 20. Summary • Humans fail: Design for it • Make that philosophy public • Secrets should exist for the least amount of time possible • Vault is a well thought out, well documented, flexible tool
  • 22. LONDON Drury House 34-43 Russell Street London WC2B 5HA NEW YORK CITY 84 Wooster Street Suite 703 New York NY 10012 © Beamly 2014. All Rights Reserved.