SlideShare a Scribd company logo
Join the conversation #devseccon
By Jakob Holderbaum / @hldrbm
Managing Shared
Secrets using Basic
Unix Tools
What are shared Secrets?
var PASSWORD = 'sn4k3oil'
var PASSWORD = yaml
.load(fs.readFileSync('secrets.yml'))
.password
var PASSWORD = process.env.PASSWORD
syncable secure flexible
constant in code ++ − −
config file − + +
environment − + ++
GPG
GPG
“GNU Privacy Guard”
pass
pass
“the standard unix password manager”
brew install pass
sudo apt-get install pass
sudo pacman -S pass
...
An example application
var express = require('express')
var app = express()
var user = process.env.GITHUB_USER
var apiToken = process.env.GITHUB_API_TOKEN
var port = process.env.PORT || 5000
app.get('/', function (req, res) {
// Implement GitHub API call
})
app.listen(port, function () {
console.log('App listening on port ' + port)
})
var express = require('express')
var app = express()
var user = process.env.GITHUB_USER
var apiToken = process.env.GITHUB_API_TOKEN
var port = process.env.PORT || 5000
app.get('/', function (req, res) {
// Implement GitHub API call
})
app.listen(port, function () {
console.log('App listening on port ' + port)
})
$ git push heroku master:master
$ heroku config:set GITHUB_USER="holderbaum" 
GITHUB_API_TOKEN="sn4k3oil"
Let’s build a secret store!
$ export PASSWORD_STORE_DIR=~/code/app/secrets
$ export MY_ID=5244D411CD7CBA95
$ pass init $MY_ID
$ export PASSWORD_STORE_DIR=~/code/app/secrets
$ export MY_ID=5244D411CD7CBA95
$ pass init $MY_ID
$ export PASSWORD_STORE_DIR=~/code/app/secrets
$ export MY_ID=5244D411CD7CBA95
$ pass init $MY_ID
$ export PASSWORD_STORE_DIR=~/code/app/secrets
$ pass add production/user
$ pass add production/api_token
$ export PASSWORD_STORE_DIR=~/code/app/secrets
$ pass show production/api_token
"sn4k3oil"
$ find ~/code/app/secrets
~/code/app/secrets/.gpg_id
~/code/app/secrets/production/user.gpg
~/code/app/secrets/production/api_token.gpg
$ find ~/code/app/secrets
~/code/app/secrets/.gpg_id
~/code/app/secrets/production/user.gpg
~/code/app/secrets/production/api_token.gpg
$ cat ~/code/app/secrets/.gpg_id
5244D411CD7CBA95
$ export PASSWORD_STORE_DIR=~/code/app/secrets
$ pass ls
+-- production
|-- api_token
+-- user
$ export PASSWORD_STORE_DIR=~/code/app/secrets
$ export USER=`pass show production/user`
$ export TOKEN=`pass show production/api_token`
$ heroku config:set GITHUB_USER=$USER 
GITHUB_API_TOKEN=$TOKEN
$ export PASSWORD_STORE_DIR=~/code/app/secrets
$ export USER=`pass show production/user`
$ export TOKEN=`pass show production/api_token`
$ heroku config:set GITHUB_USER=$USER 
GITHUB_API_TOKEN=$TOKEN
Working with a Team
Roll On
$ export PASSWORD_STORE_DIR=~/code/app/secrets
$ export MY_ID=5244D411CD7CBA95
$ export ADAS_ID=44A7B1E354AF81E2
$ export ALANS_ID=BA29EE533AF39B21
$ pass init $MY_ID $ADAS_ID $ALANS_ID
$ export PASSWORD_STORE_DIR=~/code/app/secrets
$ export MY_ID=5244D411CD7CBA95
$ export ADAS_ID=44A7B1E354AF81E2
$ export ALANS_ID=BA29EE533AF39B21
$ pass init $MY_ID $ADAS_ID $ALANS_ID
$ cat ~/code/app/secrets/.gpg_id
5244D411CD7CBA95
44A7B1E354AF81E2
BA29EE533AF39B21
$ cat ~/code/app/secrets/.gpg_id
5244D411CD7CBA95
44A7B1E354AF81E2
BA29EE533AF39B21
Roll Off
$ export PASSWORD_STORE_DIR=~/code/app/secrets
$ export MY_ID=5244D411CD7CBA95
$ export ADAS_ID=44A7B1E354AF81E2
$ pass init $MY_ID $ADAS_ID
$ export PASSWORD_STORE_DIR=~/code/app/secrets
$ export MY_ID=5244D411CD7CBA95
$ export ADAS_ID=44A7B1E354AF81E2
$ pass init $MY_ID $ADAS_ID
$ cat ~/code/app/secrets/.gpg_id
5244D411CD7CBA95
44A7B1E354AF81E2
$ cat ~/code/app/secrets/.gpg_id
5244D411CD7CBA95
44A7B1E354AF81E2
What have we achieved?
Join the conversation #devseccon
Find an online version of this talk:
https://jakob.io/devseccon16

More Related Content

What's hot (20)

PDF
Open Canary - novahackers
Chris Gates
 
PDF
The journey of asyncio adoption in instagram
Jimmy Lai
 
PDF
Экспресс-анализ вредоносов / Crowdsourced Malware Triage
Positive Hack Days
 
PPTX
Monitoring patterns for mitigating technical risk
Itai Frenkel
 
ODP
2014 ZAP Workshop 2: Contexts and Fuzzing
Simon Bennetts
 
PPTX
Malware Detection with OSSEC HIDS - OSSECCON 2014
Santiago Bassett
 
PDF
Статический анализ кода в контексте SSDL
Positive Hack Days
 
PDF
Snake bites : Python for Pentesters
Anant Shrivastava
 
PPTX
Advanced Weapons Training for the Empire
Jeremy Johnson
 
PDF
N Different Strategies to Automate OWASP ZAP - Cybersecurity WithTheBest - Oc...
gmaran23
 
ODP
2014 ZAP Workshop 1: Getting Started
Simon Bennetts
 
PDF
Faraday Blackhat 2011 Arsenal
Francisco Müller Amato
 
PDF
SWAT Style – Live Network Crypto Hacking and Exploitation by Kevin Cardwell a...
EC-Council
 
PPTX
Иван Новиков «Elastic search»
Mail.ru Group
 
ODP
OWASP 2013 APPSEC USA ZAP Hackathon
Simon Bennetts
 
PPTX
Syntribos API Security Test Automation
Matthew Valdes
 
ODP
OWASP Zed Attack Proxy Demonstration - OWASP Bangalore Nov 22 2014
gmaran23
 
ODP
BSides Manchester 2014 ZAP Advanced Features
Simon Bennetts
 
PPTX
Security in PHP - 那些在滲透測試的小技巧
Orange Tsai
 
ODP
OWASP 2013 APPSEC USA Talk - OWASP ZAP
Simon Bennetts
 
Open Canary - novahackers
Chris Gates
 
The journey of asyncio adoption in instagram
Jimmy Lai
 
Экспресс-анализ вредоносов / Crowdsourced Malware Triage
Positive Hack Days
 
Monitoring patterns for mitigating technical risk
Itai Frenkel
 
2014 ZAP Workshop 2: Contexts and Fuzzing
Simon Bennetts
 
Malware Detection with OSSEC HIDS - OSSECCON 2014
Santiago Bassett
 
Статический анализ кода в контексте SSDL
Positive Hack Days
 
Snake bites : Python for Pentesters
Anant Shrivastava
 
Advanced Weapons Training for the Empire
Jeremy Johnson
 
N Different Strategies to Automate OWASP ZAP - Cybersecurity WithTheBest - Oc...
gmaran23
 
2014 ZAP Workshop 1: Getting Started
Simon Bennetts
 
Faraday Blackhat 2011 Arsenal
Francisco Müller Amato
 
SWAT Style – Live Network Crypto Hacking and Exploitation by Kevin Cardwell a...
EC-Council
 
Иван Новиков «Elastic search»
Mail.ru Group
 
OWASP 2013 APPSEC USA ZAP Hackathon
Simon Bennetts
 
Syntribos API Security Test Automation
Matthew Valdes
 
OWASP Zed Attack Proxy Demonstration - OWASP Bangalore Nov 22 2014
gmaran23
 
BSides Manchester 2014 ZAP Advanced Features
Simon Bennetts
 
Security in PHP - 那些在滲透測試的小技巧
Orange Tsai
 
OWASP 2013 APPSEC USA Talk - OWASP ZAP
Simon Bennetts
 

Viewers also liked (20)

PDF
Dev seccon london 2016 intelliment security
DevSecCon
 
PPT
DevSecOps Singapore introduction
Stefan Streichsbier
 
PDF
RoboCop: Bringing Law and Order to CI/CD
Franklin Mosley
 
PPT
DevSecOps SG Introduction - August Meetup
DevSecOpsSg
 
PDF
CLOUD SECURITY ESSENTIALS 2.0 Full Stack Hacking & Recovery
Priyanka Aash
 
PDF
Vulnerability Advisor Deep Dive (Dec 2016)
Canturk Isci
 
PPTX
The End of Security as We Know It - Shannon Lietz
SeniorStoryteller
 
PPTX
Safely Removing the Last Roadblock to Continuous Delivery
SeniorStoryteller
 
PPTX
Rugged DevOps: Aligning Your Team and Your Powers for Success
SeniorStoryteller
 
PDF
Dom & Tom NYC Healthcare Cloud Meetup Case Study (5/4)
Dominic Tancredi
 
PDF
The Art of Identifying Vulnerabilities - CascadiaFest 2015
Adam Baldwin
 
PDF
Continuous Security - Thunderplains 2016
Adam Baldwin
 
PDF
Evident io Continuous Compliance - Mar 2017
Sebastian Taphanel CISSP-ISSEP
 
PDF
How can i find my security blind spots ulf mattsson - aug 2016
Ulf Mattsson
 
PPTX
Null application security in an agile world
Stefan Streichsbier
 
PPTX
Myths and realities of data security and compliance - Isaca Alanta - ulf matt...
Ulf Mattsson
 
PPTX
Cloudsolutionday 2016: Compliance and cost controlling on AWS
AWS Vietnam Community
 
PPTX
Unit testing : what are you missing for security
Suman Sourav
 
PDF
The Changing Landscape of Information Security
DevSecOpsSg
 
PDF
Surrogate dependencies (in node js) v1.0
Dinis Cruz
 
Dev seccon london 2016 intelliment security
DevSecCon
 
DevSecOps Singapore introduction
Stefan Streichsbier
 
RoboCop: Bringing Law and Order to CI/CD
Franklin Mosley
 
DevSecOps SG Introduction - August Meetup
DevSecOpsSg
 
CLOUD SECURITY ESSENTIALS 2.0 Full Stack Hacking & Recovery
Priyanka Aash
 
Vulnerability Advisor Deep Dive (Dec 2016)
Canturk Isci
 
The End of Security as We Know It - Shannon Lietz
SeniorStoryteller
 
Safely Removing the Last Roadblock to Continuous Delivery
SeniorStoryteller
 
Rugged DevOps: Aligning Your Team and Your Powers for Success
SeniorStoryteller
 
Dom & Tom NYC Healthcare Cloud Meetup Case Study (5/4)
Dominic Tancredi
 
The Art of Identifying Vulnerabilities - CascadiaFest 2015
Adam Baldwin
 
Continuous Security - Thunderplains 2016
Adam Baldwin
 
Evident io Continuous Compliance - Mar 2017
Sebastian Taphanel CISSP-ISSEP
 
How can i find my security blind spots ulf mattsson - aug 2016
Ulf Mattsson
 
Null application security in an agile world
Stefan Streichsbier
 
Myths and realities of data security and compliance - Isaca Alanta - ulf matt...
Ulf Mattsson
 
Cloudsolutionday 2016: Compliance and cost controlling on AWS
AWS Vietnam Community
 
Unit testing : what are you missing for security
Suman Sourav
 
The Changing Landscape of Information Security
DevSecOpsSg
 
Surrogate dependencies (in node js) v1.0
Dinis Cruz
 
Ad

Similar to Jakob Holderbaum - Managing Shared secrets using basic Unix tools (14)

PDF
Boxen: How to Manage an Army of Laptops
Puppet
 
PPT
Setting up github and ssh keys.ppt
Lovely Professional University
 
PDF
KCDC- Keeping Secrets Out of Your Pipeline
Gene Gotimer
 
PDF
Secrets Management and Delivery to Kubernetes Pods
Satish Devarapalli
 
PDF
Securing APIs
WSO2
 
PPTX
Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015
Chris Gates
 
PDF
No more (unsecure) secrets, Marty
Mathias Herberts
 
PPTX
Nodejsvault austin2019
Taswar Bhatti
 
PPTX
GIT, RVM, FIRST HEROKU APP
Pavel Tyk
 
PDF
Can we stop saving docker credentials in plain text now?
David Yeung
 
PDF
Centralise legacy auth at the ingress gateway, SREday
Andrew Kirkpatrick
 
PDF
Centralise legacy auth at the ingress gateway
Andrew Kirkpatrick
 
PDF
José Selvi - Historia de un CryptoFAIL [rootedvlc4]
RootedCON
 
KEY
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
SV Ruby on Rails Meetup
 
Boxen: How to Manage an Army of Laptops
Puppet
 
Setting up github and ssh keys.ppt
Lovely Professional University
 
KCDC- Keeping Secrets Out of Your Pipeline
Gene Gotimer
 
Secrets Management and Delivery to Kubernetes Pods
Satish Devarapalli
 
Securing APIs
WSO2
 
Devoops: DoJ Annual Cybersecurity Training Symposium Edition 2015
Chris Gates
 
No more (unsecure) secrets, Marty
Mathias Herberts
 
Nodejsvault austin2019
Taswar Bhatti
 
GIT, RVM, FIRST HEROKU APP
Pavel Tyk
 
Can we stop saving docker credentials in plain text now?
David Yeung
 
Centralise legacy auth at the ingress gateway, SREday
Andrew Kirkpatrick
 
Centralise legacy auth at the ingress gateway
Andrew Kirkpatrick
 
José Selvi - Historia de un CryptoFAIL [rootedvlc4]
RootedCON
 
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine Yard
SV Ruby on Rails Meetup
 
Ad

More from DevSecCon (20)

PDF
DevSecCon London 2019: Workshop: Cloud Agnostic Security Testing with Scout S...
DevSecCon
 
PDF
DevSecCon London 2019: Are Open Source Developers Security’s New Front Line?
DevSecCon
 
PDF
DevSecCon London 2019: How to Secure OpenShift Environments and What Happens ...
DevSecCon
 
PDF
DevSecCon London 2019: A Kernel of Truth: Intrusion Detection and Attestation...
DevSecCon
 
PPTX
DevSecCon Seattle 2019: Containerizing IT Security Knowledge
DevSecCon
 
PPTX
DevSecCon Seattle 2019: Decentralized Authorization - Implementing Fine Grain...
DevSecCon
 
PPTX
DevSecCon Seattle 2019: Liquid Software as the real solution for the Sec in D...
DevSecCon
 
PPTX
DevSecCon Seattle 2019: Fully Automated production deployments with HIPAA/HIT...
DevSecCon
 
PDF
DevSecCon Singapore 2019: Four years of reflection: How (not) to secure Web A...
DevSecCon
 
PPTX
DevSecCon Singapore 2019: crypto jacking: An evolving threat for cloud contai...
DevSecCon
 
PDF
DevSecCon Singapore 2019: Can "dev", "sec" and "ops" really coexist in the wi...
DevSecCon
 
PDF
DevSecCon Singapore 2019: Workshop - Burp extension writing workshop
DevSecCon
 
PDF
DevSecCon Singapore 2019: Embracing Security - A changing DevOps landscape
DevSecCon
 
PDF
DevSecCon Singapore 2019: Web Services aren’t as secure as we think
DevSecCon
 
PDF
DevSecCon Singapore 2019: An attacker's view of Serverless and GraphQL apps S...
DevSecCon
 
PDF
DevSecCon Singapore 2019: The journey of digital transformation through DevSe...
DevSecCon
 
PDF
DevSecCon Singapore 2019: Preventative Security for Kubernetes
DevSecCon
 
PPTX
DevSecCon London 2018: Is your supply chain your achille's heel
DevSecCon
 
PPTX
DevSecCon London 2018: Get rid of these TLS certificates
DevSecCon
 
PDF
DevSecCon London 2018: Open DevSecOps
DevSecCon
 
DevSecCon London 2019: Workshop: Cloud Agnostic Security Testing with Scout S...
DevSecCon
 
DevSecCon London 2019: Are Open Source Developers Security’s New Front Line?
DevSecCon
 
DevSecCon London 2019: How to Secure OpenShift Environments and What Happens ...
DevSecCon
 
DevSecCon London 2019: A Kernel of Truth: Intrusion Detection and Attestation...
DevSecCon
 
DevSecCon Seattle 2019: Containerizing IT Security Knowledge
DevSecCon
 
DevSecCon Seattle 2019: Decentralized Authorization - Implementing Fine Grain...
DevSecCon
 
DevSecCon Seattle 2019: Liquid Software as the real solution for the Sec in D...
DevSecCon
 
DevSecCon Seattle 2019: Fully Automated production deployments with HIPAA/HIT...
DevSecCon
 
DevSecCon Singapore 2019: Four years of reflection: How (not) to secure Web A...
DevSecCon
 
DevSecCon Singapore 2019: crypto jacking: An evolving threat for cloud contai...
DevSecCon
 
DevSecCon Singapore 2019: Can "dev", "sec" and "ops" really coexist in the wi...
DevSecCon
 
DevSecCon Singapore 2019: Workshop - Burp extension writing workshop
DevSecCon
 
DevSecCon Singapore 2019: Embracing Security - A changing DevOps landscape
DevSecCon
 
DevSecCon Singapore 2019: Web Services aren’t as secure as we think
DevSecCon
 
DevSecCon Singapore 2019: An attacker's view of Serverless and GraphQL apps S...
DevSecCon
 
DevSecCon Singapore 2019: The journey of digital transformation through DevSe...
DevSecCon
 
DevSecCon Singapore 2019: Preventative Security for Kubernetes
DevSecCon
 
DevSecCon London 2018: Is your supply chain your achille's heel
DevSecCon
 
DevSecCon London 2018: Get rid of these TLS certificates
DevSecCon
 
DevSecCon London 2018: Open DevSecOps
DevSecCon
 

Recently uploaded (20)

PPTX
A Mother's Love - Helen Steiner Rice.pptx
AlbertoTierra
 
PDF
Generalization predition MOOCs - Conference presentation - eMOOCs 2025
pmmorenom01
 
PPTX
A brief History of counseling in Social Work.pptx
Josaya Injesi
 
PDF
FINAL ZAKROS - UNESCO SITE CANDICACY - PRESENTATION - September 2024
StavrosKefalas1
 
PPTX
Food_and_Drink_Bahasa_Inggris_Kelas_5.pptx
debbystevani36
 
PPTX
English_Book_1 part 1 LET Reviewers NEw-
2022mimiacadserver
 
PPTX
BARRIERS TO EFFECTIVE COMMUNICATION.pptx
shraddham25
 
PDF
481771880-Fundamentals-of-Public-Speaking.pdf
crisjseit1211
 
PDF
From 0 to Gemini: a Workshop created by GDG Firenze
gdgflorence
 
PDF
Mining RACE Newsletter 10 - first half of 2025
Mining RACE
 
PPTX
AI presentation for everyone in every fields
dodinhkhai1
 
PDF
Leveraging the Power of Jira Dashboard.pdf
siddharthshukla742740
 
PPTX
677697609-States-Research-Questions-Final.pptx
francistiin8
 
PPT
Wireless Communications Course lecture1.ppt
abdullahyaqot2015
 
PPTX
Presentation for a short film .pptx.pptx
madisoncosta17
 
PPTX
English_Book_2 part 2 let reviewers news
2022mimiacadserver
 
PDF
Cloud Computing Service Availability.pdf
chakrirocky1
 
PPTX
Presentationexpressions You are student leader and have just come from a stud...
BENSTARBEATZ
 
PDF
Buy Old GitHub Accounts -Trusted Sellers
GitHub Account
 
PPTX
Creative perspective presentation copy.pptx
dreamsteel
 
A Mother's Love - Helen Steiner Rice.pptx
AlbertoTierra
 
Generalization predition MOOCs - Conference presentation - eMOOCs 2025
pmmorenom01
 
A brief History of counseling in Social Work.pptx
Josaya Injesi
 
FINAL ZAKROS - UNESCO SITE CANDICACY - PRESENTATION - September 2024
StavrosKefalas1
 
Food_and_Drink_Bahasa_Inggris_Kelas_5.pptx
debbystevani36
 
English_Book_1 part 1 LET Reviewers NEw-
2022mimiacadserver
 
BARRIERS TO EFFECTIVE COMMUNICATION.pptx
shraddham25
 
481771880-Fundamentals-of-Public-Speaking.pdf
crisjseit1211
 
From 0 to Gemini: a Workshop created by GDG Firenze
gdgflorence
 
Mining RACE Newsletter 10 - first half of 2025
Mining RACE
 
AI presentation for everyone in every fields
dodinhkhai1
 
Leveraging the Power of Jira Dashboard.pdf
siddharthshukla742740
 
677697609-States-Research-Questions-Final.pptx
francistiin8
 
Wireless Communications Course lecture1.ppt
abdullahyaqot2015
 
Presentation for a short film .pptx.pptx
madisoncosta17
 
English_Book_2 part 2 let reviewers news
2022mimiacadserver
 
Cloud Computing Service Availability.pdf
chakrirocky1
 
Presentationexpressions You are student leader and have just come from a stud...
BENSTARBEATZ
 
Buy Old GitHub Accounts -Trusted Sellers
GitHub Account
 
Creative perspective presentation copy.pptx
dreamsteel
 

Jakob Holderbaum - Managing Shared secrets using basic Unix tools