SlideShare a Scribd company logo
1 of 24
Copyright © 2020 HashiCorp
Keeping a Secret
Retrofitting applications to use Vault
Harm:
Unauthorized data access,
identity spoofing, private data
egress, fines
Secret:
Something that would increase
your risk if someone else got it
Secret vs.
sensitive data:
▪ Secret: used for auth
▪ Sensitive: confidential
What’s a secret?
Vault secures, stores, and tightly controls access to tokens,
passwords, certificates, API keys, and other secrets in modern
computing. Vault handles leasing, key revocation, key rolling,
and auditing. Through aunified API, users can accessan
encrypted Key/Value store and network encryption-as-a-
service, or generate AWS IAM/STS credentials, SQL/NoSQL
databases,X.509 certificates, SSH credentials, and more.
Vault software engineer at HashiCorp
W
h
y do
secrets
matter?
▪ Data breaches are a routine occurrence these
days.
▪ These can result in lawsuits and fines (GDPR) for
the breachee.
▪ Victims whose personal information was stolen
face privacy loss & identity theft.
▪ Securing your secrets can prevent or limit scope of
breaches.
Howdo you
keep a
secret?
Forget about computers for now.
What best practices should a person follow
to keep a secret?
Keep track of who
you told
Tell as few people
as possible
Try not to have long-
term secrets
What’s a secret?
Howdoes Vault help you keep a secret?
▪ Centralized secrets
▪ Identity-based authentication
▪ Automated secret rotation
▪ Audit Logs
All consumers of Vault secrets must solve
two problems:
1. TypeofAuthentication to Vault
2. Authentication to Vault
3. Retrieval of secrets
Onboarding
applications
Vault Authentication
How can app prove to Vault who it is without
storing a secret outside of Vault?
Secure
Introduction
1. Don't let authentication secrets live forever
2. Distribute auth secrets securely
3. Limit exposure if auth secrets disclosed
4. Have a break-glass procedure if auth secret stolen
5. Detect unauthorized access to auth secrets
Secure
Introduction
Best practices
Secure Introduction
Best practices
1. Don't let secrets live forever
2. Distribute secrets securely
3. Limit exposure:
your roles
4. Break-glass procedure:
5. Detect unauthorized access:
Limited uses, short ttl
Use principle of least privilege in
Use audit log and revoke API
App should alert if secret absent/no good
Options:
1. Deploy Vault token alongside app
2. Deploy approle roleid/secretid alongside app
3. Deploy TLS client certificates and use cert auth method
Secure
Introduction
On premise,
no scheduler
Option 1:Distributing tokens
One reason you might want to do this instead of using approle: it makes it easy
to use envconsul or consul-template
Ifdistributing tokens directly:
▪ use a token role, similar to what we do with approle roles
▪ distribute single-use token with a short TTL
▪ use response wrapping to embed another longer-lived token
Option 2:Approle Authentication
Setup
vault auth enable approle
vault write auth/approle/role/myrole token_policies="myapp" token_ttl=1h
vault read -field=role_id auth/approle/role/myrole/role-id >role-id
vault write -f -field=secret_id auth/approle/role/myrole/secret-id >secret-id
Administrator
Deployer
Approle Authentication
Application Login
$ grep . role-id secret-id
role-id:4bdd6e8e-47e5-5d6f-c698-397a373c9c56
secret-id:6490149e-aa11-2cb1-f4ae-b2f9da824a62
$ vault write auth/approle/login role_id=$(cat role-id) secret_id=$(cat secret-id)
Key
---
token
token_duration
policies
Value
-----
s.pstokYLHuv3rBGrb7zHVCF6l
1h
["default" "myapp"]
Approle vs Userpass Authentication
Isn't role_id just a username and secret_id a password?
Differences between approle and userpass:
▪ approle can have multiple secret_ids for each role
– give each app a role, each app instance a secret_id
▪ secret_ids can be bound to specific CIDRs
▪ secret_ids can have TTLs and limited uses
Approle workflow example
Getting Vault Secrets into
Application Memory
▪ Define an approle role with appropriate privileges,
restrictions
▪ Bundle Vault Agent and role_id along with your app
▪ Deliver single-use secret_id with short TTL to your
app/Agent
▪ Agent authenticates with role_id, secret_id
▪ Agent renders secrets via template, signals your app
▪ App reads rendered template, alerts if secrets
missing/unuseable
Review
Approle
Demo
Thank You!

More Related Content

Similar to hashicorp-virtualdays-vaultkeeping-a-secret-200409143039.pptx

iOS Application Security.pdf
iOS Application Security.pdfiOS Application Security.pdf
iOS Application Security.pdfRavi Aggarwal
 
Certificate Pinning in Mobile Applications
Certificate Pinning in Mobile ApplicationsCertificate Pinning in Mobile Applications
Certificate Pinning in Mobile ApplicationsLuca Bongiorni
 
Security Checklist: how iOS can help protecting your data.
Security Checklist: how iOS can help protecting your data.Security Checklist: how iOS can help protecting your data.
Security Checklist: how iOS can help protecting your data.Tomek Cejner
 
Shifting security left simplifying security for k8s open shift environments
Shifting security left simplifying security for k8s open shift environmentsShifting security left simplifying security for k8s open shift environments
Shifting security left simplifying security for k8s open shift environmentsLibbySchulze
 
Secure Your Mobile Apps
Secure Your Mobile AppsSecure Your Mobile Apps
Secure Your Mobile Appsprimomh
 
Survey Presentation About Application Security
Survey Presentation About Application SecuritySurvey Presentation About Application Security
Survey Presentation About Application SecurityNicholas Davis
 
Strong Authentication in Web Application #SCS III
Strong Authentication in Web Application #SCS IIIStrong Authentication in Web Application #SCS III
Strong Authentication in Web Application #SCS IIISylvain Maret
 
Frost & Sullivan: Moving Forward with Distributed Cryptography
Frost & Sullivan: Moving Forward with Distributed CryptographyFrost & Sullivan: Moving Forward with Distributed Cryptography
Frost & Sullivan: Moving Forward with Distributed CryptographyEMC
 
Chapter 2 System Security.pptx
Chapter 2 System Security.pptxChapter 2 System Security.pptx
Chapter 2 System Security.pptxRushikeshChikane2
 
Secure your web app presentation
Secure your web app presentationSecure your web app presentation
Secure your web app presentationFrans Lytzen
 
Enterprise Cloud Security - Concepts Mash-up
Enterprise Cloud Security - Concepts Mash-upEnterprise Cloud Security - Concepts Mash-up
Enterprise Cloud Security - Concepts Mash-upDileep Kalidindi
 
FIDO UAF 1.0 Specs: Overview and Insights
FIDO UAF 1.0 Specs: Overview and InsightsFIDO UAF 1.0 Specs: Overview and Insights
FIDO UAF 1.0 Specs: Overview and InsightsFIDO Alliance
 
Managing your secrets in a cloud environment
Managing your secrets in a cloud environmentManaging your secrets in a cloud environment
Managing your secrets in a cloud environmentTaswar Bhatti
 
Apache Milagro Presentation at ApacheCon Europe 2016
Apache Milagro Presentation at ApacheCon Europe 2016Apache Milagro Presentation at ApacheCon Europe 2016
Apache Milagro Presentation at ApacheCon Europe 2016Brian Spector
 

Similar to hashicorp-virtualdays-vaultkeeping-a-secret-200409143039.pptx (20)

Public Vs. Private Keys
Public Vs. Private KeysPublic Vs. Private Keys
Public Vs. Private Keys
 
iOS Application Security.pdf
iOS Application Security.pdfiOS Application Security.pdf
iOS Application Security.pdf
 
Encryption by fastech
Encryption by fastechEncryption by fastech
Encryption by fastech
 
Certificate Pinning in Mobile Applications
Certificate Pinning in Mobile ApplicationsCertificate Pinning in Mobile Applications
Certificate Pinning in Mobile Applications
 
Security Checklist: how iOS can help protecting your data.
Security Checklist: how iOS can help protecting your data.Security Checklist: how iOS can help protecting your data.
Security Checklist: how iOS can help protecting your data.
 
assign3.docx
assign3.docxassign3.docx
assign3.docx
 
Securing RESTful API
Securing RESTful APISecuring RESTful API
Securing RESTful API
 
Shifting security left simplifying security for k8s open shift environments
Shifting security left simplifying security for k8s open shift environmentsShifting security left simplifying security for k8s open shift environments
Shifting security left simplifying security for k8s open shift environments
 
Secure Your Mobile Apps
Secure Your Mobile AppsSecure Your Mobile Apps
Secure Your Mobile Apps
 
Survey Presentation About Application Security
Survey Presentation About Application SecuritySurvey Presentation About Application Security
Survey Presentation About Application Security
 
Strong Authentication in Web Application #SCS III
Strong Authentication in Web Application #SCS IIIStrong Authentication in Web Application #SCS III
Strong Authentication in Web Application #SCS III
 
Web security uploadv1
Web security uploadv1Web security uploadv1
Web security uploadv1
 
Frost & Sullivan: Moving Forward with Distributed Cryptography
Frost & Sullivan: Moving Forward with Distributed CryptographyFrost & Sullivan: Moving Forward with Distributed Cryptography
Frost & Sullivan: Moving Forward with Distributed Cryptography
 
Chapter 2 System Security.pptx
Chapter 2 System Security.pptxChapter 2 System Security.pptx
Chapter 2 System Security.pptx
 
Secure your web app presentation
Secure your web app presentationSecure your web app presentation
Secure your web app presentation
 
Jenkins Terraform Vault
Jenkins Terraform VaultJenkins Terraform Vault
Jenkins Terraform Vault
 
Enterprise Cloud Security - Concepts Mash-up
Enterprise Cloud Security - Concepts Mash-upEnterprise Cloud Security - Concepts Mash-up
Enterprise Cloud Security - Concepts Mash-up
 
FIDO UAF 1.0 Specs: Overview and Insights
FIDO UAF 1.0 Specs: Overview and InsightsFIDO UAF 1.0 Specs: Overview and Insights
FIDO UAF 1.0 Specs: Overview and Insights
 
Managing your secrets in a cloud environment
Managing your secrets in a cloud environmentManaging your secrets in a cloud environment
Managing your secrets in a cloud environment
 
Apache Milagro Presentation at ApacheCon Europe 2016
Apache Milagro Presentation at ApacheCon Europe 2016Apache Milagro Presentation at ApacheCon Europe 2016
Apache Milagro Presentation at ApacheCon Europe 2016
 

Recently uploaded

Electronic Vehicle (EV) Industry Challenges
Electronic Vehicle (EV) Industry ChallengesElectronic Vehicle (EV) Industry Challenges
Electronic Vehicle (EV) Industry Challengesmarketingmangosemi
 
Vip Hot🥵 Call Girls Delhi Delhi {9711199012} Avni Thakur 🧡😘 High Profile Girls
Vip Hot🥵 Call Girls Delhi Delhi {9711199012} Avni Thakur 🧡😘 High Profile GirlsVip Hot🥵 Call Girls Delhi Delhi {9711199012} Avni Thakur 🧡😘 High Profile Girls
Vip Hot🥵 Call Girls Delhi Delhi {9711199012} Avni Thakur 🧡😘 High Profile Girlsshivangimorya083
 
Delhi Call Girls East Of Kailash 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls East Of Kailash 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls East Of Kailash 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls East Of Kailash 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Dubai Call Girls Size E6 (O525547819) Call Girls In Dubai
Dubai Call Girls  Size E6 (O525547819) Call Girls In DubaiDubai Call Girls  Size E6 (O525547819) Call Girls In Dubai
Dubai Call Girls Size E6 (O525547819) Call Girls In Dubaikojalkojal131
 
John Deere 300 3029 4039 4045 6059 6068 Engine Operation and Service Manual
John Deere 300 3029 4039 4045 6059 6068 Engine Operation and Service ManualJohn Deere 300 3029 4039 4045 6059 6068 Engine Operation and Service Manual
John Deere 300 3029 4039 4045 6059 6068 Engine Operation and Service ManualExcavator
 
UNIT-IV-STEERING, BRAKES AND SUSPENSION SYSTEMS.pptx
UNIT-IV-STEERING, BRAKES AND SUSPENSION SYSTEMS.pptxUNIT-IV-STEERING, BRAKES AND SUSPENSION SYSTEMS.pptx
UNIT-IV-STEERING, BRAKES AND SUSPENSION SYSTEMS.pptxDineshKumar4165
 
Rockwell Automation 2711R PanelView 800 HMI
Rockwell Automation 2711R PanelView 800 HMIRockwell Automation 2711R PanelView 800 HMI
Rockwell Automation 2711R PanelView 800 HMIAsteam Techno
 
UNIT-II-ENGINE AUXILIARY SYSTEMS &TURBOCHARGER
UNIT-II-ENGINE AUXILIARY SYSTEMS &TURBOCHARGERUNIT-II-ENGINE AUXILIARY SYSTEMS &TURBOCHARGER
UNIT-II-ENGINE AUXILIARY SYSTEMS &TURBOCHARGERDineshKumar4165
 
Russian Call Girls Delhi Indirapuram {9711199171} Aarvi Gupta ✌️Independent ...
Russian  Call Girls Delhi Indirapuram {9711199171} Aarvi Gupta ✌️Independent ...Russian  Call Girls Delhi Indirapuram {9711199171} Aarvi Gupta ✌️Independent ...
Russian Call Girls Delhi Indirapuram {9711199171} Aarvi Gupta ✌️Independent ...shivangimorya083
 
Call me @ 9892124323 Call Girl in Andheri East With Free Home Delivery
Call me @ 9892124323 Call Girl in Andheri East With Free Home DeliveryCall me @ 9892124323 Call Girl in Andheri East With Free Home Delivery
Call me @ 9892124323 Call Girl in Andheri East With Free Home DeliveryPooja Nehwal
 
83778-77756 ( HER.SELF ) Brings Call Girls In Laxmi Nagar
83778-77756 ( HER.SELF ) Brings Call Girls In Laxmi Nagar83778-77756 ( HER.SELF ) Brings Call Girls In Laxmi Nagar
83778-77756 ( HER.SELF ) Brings Call Girls In Laxmi Nagardollysharma2066
 
Transformative journey for Automotive Components Manufacturers- D&V Business ...
Transformative journey for Automotive Components Manufacturers- D&V Business ...Transformative journey for Automotive Components Manufacturers- D&V Business ...
Transformative journey for Automotive Components Manufacturers- D&V Business ...D&V Business Consulting
 
John Deere Tractors 5515 Diagnostic Repair Manual
John Deere Tractors 5515 Diagnostic Repair ManualJohn Deere Tractors 5515 Diagnostic Repair Manual
John Deere Tractors 5515 Diagnostic Repair ManualExcavator
 
Hauz Khas Call Girls ☎ 7042364481 independent Escorts Service in delhi
Hauz Khas Call Girls ☎ 7042364481 independent Escorts Service in delhiHauz Khas Call Girls ☎ 7042364481 independent Escorts Service in delhi
Hauz Khas Call Girls ☎ 7042364481 independent Escorts Service in delhiHot Call Girls In Sector 58 (Noida)
 
꧁༒☬ 7042364481 (Call Girl) In Dwarka Delhi Escort Service In Delhi Ncr☬༒꧂
꧁༒☬ 7042364481 (Call Girl) In Dwarka Delhi Escort Service In Delhi Ncr☬༒꧂꧁༒☬ 7042364481 (Call Girl) In Dwarka Delhi Escort Service In Delhi Ncr☬༒꧂
꧁༒☬ 7042364481 (Call Girl) In Dwarka Delhi Escort Service In Delhi Ncr☬༒꧂Hot Call Girls In Sector 58 (Noida)
 
VIP Mumbai Call Girls Thakur village Just Call 9920874524 with A/C Room Cash ...
VIP Mumbai Call Girls Thakur village Just Call 9920874524 with A/C Room Cash ...VIP Mumbai Call Girls Thakur village Just Call 9920874524 with A/C Room Cash ...
VIP Mumbai Call Girls Thakur village Just Call 9920874524 with A/C Room Cash ...Garima Khatri
 
Alia +91-9537192988-Experience the Unmatchable Pleasure with Model Ahmedabad ...
Alia +91-9537192988-Experience the Unmatchable Pleasure with Model Ahmedabad ...Alia +91-9537192988-Experience the Unmatchable Pleasure with Model Ahmedabad ...
Alia +91-9537192988-Experience the Unmatchable Pleasure with Model Ahmedabad ...Niya Khan
 
VIP Kolkata Call Girl Kasba 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kasba 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kasba 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kasba 👉 8250192130 Available With Roomdivyansh0kumar0
 
UNIT-V-ELECTRIC AND HYBRID VEHICLES.pptx
UNIT-V-ELECTRIC AND HYBRID VEHICLES.pptxUNIT-V-ELECTRIC AND HYBRID VEHICLES.pptx
UNIT-V-ELECTRIC AND HYBRID VEHICLES.pptxDineshKumar4165
 

Recently uploaded (20)

Electronic Vehicle (EV) Industry Challenges
Electronic Vehicle (EV) Industry ChallengesElectronic Vehicle (EV) Industry Challenges
Electronic Vehicle (EV) Industry Challenges
 
Vip Hot🥵 Call Girls Delhi Delhi {9711199012} Avni Thakur 🧡😘 High Profile Girls
Vip Hot🥵 Call Girls Delhi Delhi {9711199012} Avni Thakur 🧡😘 High Profile GirlsVip Hot🥵 Call Girls Delhi Delhi {9711199012} Avni Thakur 🧡😘 High Profile Girls
Vip Hot🥵 Call Girls Delhi Delhi {9711199012} Avni Thakur 🧡😘 High Profile Girls
 
Delhi Call Girls East Of Kailash 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls East Of Kailash 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls East Of Kailash 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls East Of Kailash 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Dubai Call Girls Size E6 (O525547819) Call Girls In Dubai
Dubai Call Girls  Size E6 (O525547819) Call Girls In DubaiDubai Call Girls  Size E6 (O525547819) Call Girls In Dubai
Dubai Call Girls Size E6 (O525547819) Call Girls In Dubai
 
John Deere 300 3029 4039 4045 6059 6068 Engine Operation and Service Manual
John Deere 300 3029 4039 4045 6059 6068 Engine Operation and Service ManualJohn Deere 300 3029 4039 4045 6059 6068 Engine Operation and Service Manual
John Deere 300 3029 4039 4045 6059 6068 Engine Operation and Service Manual
 
UNIT-IV-STEERING, BRAKES AND SUSPENSION SYSTEMS.pptx
UNIT-IV-STEERING, BRAKES AND SUSPENSION SYSTEMS.pptxUNIT-IV-STEERING, BRAKES AND SUSPENSION SYSTEMS.pptx
UNIT-IV-STEERING, BRAKES AND SUSPENSION SYSTEMS.pptx
 
Rockwell Automation 2711R PanelView 800 HMI
Rockwell Automation 2711R PanelView 800 HMIRockwell Automation 2711R PanelView 800 HMI
Rockwell Automation 2711R PanelView 800 HMI
 
UNIT-II-ENGINE AUXILIARY SYSTEMS &TURBOCHARGER
UNIT-II-ENGINE AUXILIARY SYSTEMS &TURBOCHARGERUNIT-II-ENGINE AUXILIARY SYSTEMS &TURBOCHARGER
UNIT-II-ENGINE AUXILIARY SYSTEMS &TURBOCHARGER
 
Russian Call Girls Delhi Indirapuram {9711199171} Aarvi Gupta ✌️Independent ...
Russian  Call Girls Delhi Indirapuram {9711199171} Aarvi Gupta ✌️Independent ...Russian  Call Girls Delhi Indirapuram {9711199171} Aarvi Gupta ✌️Independent ...
Russian Call Girls Delhi Indirapuram {9711199171} Aarvi Gupta ✌️Independent ...
 
Call me @ 9892124323 Call Girl in Andheri East With Free Home Delivery
Call me @ 9892124323 Call Girl in Andheri East With Free Home DeliveryCall me @ 9892124323 Call Girl in Andheri East With Free Home Delivery
Call me @ 9892124323 Call Girl in Andheri East With Free Home Delivery
 
83778-77756 ( HER.SELF ) Brings Call Girls In Laxmi Nagar
83778-77756 ( HER.SELF ) Brings Call Girls In Laxmi Nagar83778-77756 ( HER.SELF ) Brings Call Girls In Laxmi Nagar
83778-77756 ( HER.SELF ) Brings Call Girls In Laxmi Nagar
 
Hotel Escorts Sushant Golf City - 9548273370 Call Girls Service in Lucknow, c...
Hotel Escorts Sushant Golf City - 9548273370 Call Girls Service in Lucknow, c...Hotel Escorts Sushant Golf City - 9548273370 Call Girls Service in Lucknow, c...
Hotel Escorts Sushant Golf City - 9548273370 Call Girls Service in Lucknow, c...
 
Transformative journey for Automotive Components Manufacturers- D&V Business ...
Transformative journey for Automotive Components Manufacturers- D&V Business ...Transformative journey for Automotive Components Manufacturers- D&V Business ...
Transformative journey for Automotive Components Manufacturers- D&V Business ...
 
John Deere Tractors 5515 Diagnostic Repair Manual
John Deere Tractors 5515 Diagnostic Repair ManualJohn Deere Tractors 5515 Diagnostic Repair Manual
John Deere Tractors 5515 Diagnostic Repair Manual
 
Hauz Khas Call Girls ☎ 7042364481 independent Escorts Service in delhi
Hauz Khas Call Girls ☎ 7042364481 independent Escorts Service in delhiHauz Khas Call Girls ☎ 7042364481 independent Escorts Service in delhi
Hauz Khas Call Girls ☎ 7042364481 independent Escorts Service in delhi
 
꧁༒☬ 7042364481 (Call Girl) In Dwarka Delhi Escort Service In Delhi Ncr☬༒꧂
꧁༒☬ 7042364481 (Call Girl) In Dwarka Delhi Escort Service In Delhi Ncr☬༒꧂꧁༒☬ 7042364481 (Call Girl) In Dwarka Delhi Escort Service In Delhi Ncr☬༒꧂
꧁༒☬ 7042364481 (Call Girl) In Dwarka Delhi Escort Service In Delhi Ncr☬༒꧂
 
VIP Mumbai Call Girls Thakur village Just Call 9920874524 with A/C Room Cash ...
VIP Mumbai Call Girls Thakur village Just Call 9920874524 with A/C Room Cash ...VIP Mumbai Call Girls Thakur village Just Call 9920874524 with A/C Room Cash ...
VIP Mumbai Call Girls Thakur village Just Call 9920874524 with A/C Room Cash ...
 
Alia +91-9537192988-Experience the Unmatchable Pleasure with Model Ahmedabad ...
Alia +91-9537192988-Experience the Unmatchable Pleasure with Model Ahmedabad ...Alia +91-9537192988-Experience the Unmatchable Pleasure with Model Ahmedabad ...
Alia +91-9537192988-Experience the Unmatchable Pleasure with Model Ahmedabad ...
 
VIP Kolkata Call Girl Kasba 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kasba 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kasba 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kasba 👉 8250192130 Available With Room
 
UNIT-V-ELECTRIC AND HYBRID VEHICLES.pptx
UNIT-V-ELECTRIC AND HYBRID VEHICLES.pptxUNIT-V-ELECTRIC AND HYBRID VEHICLES.pptx
UNIT-V-ELECTRIC AND HYBRID VEHICLES.pptx
 

hashicorp-virtualdays-vaultkeeping-a-secret-200409143039.pptx

  • 1.
  • 2. Copyright © 2020 HashiCorp Keeping a Secret Retrofitting applications to use Vault
  • 3. Harm: Unauthorized data access, identity spoofing, private data egress, fines Secret: Something that would increase your risk if someone else got it Secret vs. sensitive data: ▪ Secret: used for auth ▪ Sensitive: confidential What’s a secret?
  • 4. Vault secures, stores, and tightly controls access to tokens, passwords, certificates, API keys, and other secrets in modern computing. Vault handles leasing, key revocation, key rolling, and auditing. Through aunified API, users can accessan encrypted Key/Value store and network encryption-as-a- service, or generate AWS IAM/STS credentials, SQL/NoSQL databases,X.509 certificates, SSH credentials, and more. Vault software engineer at HashiCorp
  • 5. W h y do secrets matter? ▪ Data breaches are a routine occurrence these days. ▪ These can result in lawsuits and fines (GDPR) for the breachee. ▪ Victims whose personal information was stolen face privacy loss & identity theft. ▪ Securing your secrets can prevent or limit scope of breaches.
  • 6. Howdo you keep a secret? Forget about computers for now. What best practices should a person follow to keep a secret?
  • 7. Keep track of who you told Tell as few people as possible Try not to have long- term secrets What’s a secret?
  • 8. Howdoes Vault help you keep a secret? ▪ Centralized secrets ▪ Identity-based authentication ▪ Automated secret rotation ▪ Audit Logs
  • 9.
  • 10. All consumers of Vault secrets must solve two problems: 1. TypeofAuthentication to Vault 2. Authentication to Vault 3. Retrieval of secrets Onboarding applications
  • 12. How can app prove to Vault who it is without storing a secret outside of Vault? Secure Introduction
  • 13. 1. Don't let authentication secrets live forever 2. Distribute auth secrets securely 3. Limit exposure if auth secrets disclosed 4. Have a break-glass procedure if auth secret stolen 5. Detect unauthorized access to auth secrets Secure Introduction Best practices
  • 14. Secure Introduction Best practices 1. Don't let secrets live forever 2. Distribute secrets securely 3. Limit exposure: your roles 4. Break-glass procedure: 5. Detect unauthorized access: Limited uses, short ttl Use principle of least privilege in Use audit log and revoke API App should alert if secret absent/no good
  • 15. Options: 1. Deploy Vault token alongside app 2. Deploy approle roleid/secretid alongside app 3. Deploy TLS client certificates and use cert auth method Secure Introduction On premise, no scheduler
  • 16. Option 1:Distributing tokens One reason you might want to do this instead of using approle: it makes it easy to use envconsul or consul-template Ifdistributing tokens directly: ▪ use a token role, similar to what we do with approle roles ▪ distribute single-use token with a short TTL ▪ use response wrapping to embed another longer-lived token
  • 17. Option 2:Approle Authentication Setup vault auth enable approle vault write auth/approle/role/myrole token_policies="myapp" token_ttl=1h vault read -field=role_id auth/approle/role/myrole/role-id >role-id vault write -f -field=secret_id auth/approle/role/myrole/secret-id >secret-id Administrator Deployer
  • 18. Approle Authentication Application Login $ grep . role-id secret-id role-id:4bdd6e8e-47e5-5d6f-c698-397a373c9c56 secret-id:6490149e-aa11-2cb1-f4ae-b2f9da824a62 $ vault write auth/approle/login role_id=$(cat role-id) secret_id=$(cat secret-id) Key --- token token_duration policies Value ----- s.pstokYLHuv3rBGrb7zHVCF6l 1h ["default" "myapp"]
  • 19. Approle vs Userpass Authentication Isn't role_id just a username and secret_id a password? Differences between approle and userpass: ▪ approle can have multiple secret_ids for each role – give each app a role, each app instance a secret_id ▪ secret_ids can be bound to specific CIDRs ▪ secret_ids can have TTLs and limited uses
  • 21. Getting Vault Secrets into Application Memory
  • 22. ▪ Define an approle role with appropriate privileges, restrictions ▪ Bundle Vault Agent and role_id along with your app ▪ Deliver single-use secret_id with short TTL to your app/Agent ▪ Agent authenticates with role_id, secret_id ▪ Agent renders secrets via template, signals your app ▪ App reads rendered template, alerts if secrets missing/unuseable Review Approle
  • 23. Demo