SlideShare a Scribd company logo
Join the conversation #DevSecCon
Your (container)
secret’s safe with me
Liz Rice, Aqua Security
@lizrice
2
Secrets
@LizRice | @AquaSecTeam
3
Secrets
@LizRice | @AquaSecTeam
Secret
store
Cluster
Desirable attributes for secrets management
5
Secrets
@LizRice | @AquaSecTeam
Secrets
photo: Katie Tegtmeyer
■ Encrypted
■ At rest and in transit
■ Only decrypted in
memory
6
Secrets
@LizRice | @AquaSecTeam
Secrets
photo: James Case
■ Access control
■ Only accessible by containers
that need them
■ And users
■ Write-only access
7
Secrets
@LizRice | @AquaSecTeam
Secrets
photo: Irena Jackson
■ Life-cycle
■ Risk of leak increases over time
■ Rotation, revocation, audit logging
Passing secrets to containers
9
Bad places for secrets
@LizRice | @AquaSecTeam
■ Source code
■ Dockerfiles / images
10
docker run -e VARNAME=secret ...
Environment variables
@LizRice | @AquaSecTeam
11
■ docker inspect
■ docker exec
■ /proc directory
■ Leaky logs
Environment variables
@LizRice | @AquaSecTeam
12
docker run -v /hostsecrets:/secrets ...
Mounted volume
@LizRice | @AquaSecTeam
13
■ docker inspect
■ docker exec
■ /proc directory
■ Leaky logs
Mounted volume
@LizRice | @AquaSecTeam
Orchestrator support for secrets
15
Docker
@LizRice | @AquaSecTeam
■ Secrets support built in for Docker Swarm services
■ Not standalone containers
■ Encrypted transmission with mutual
authentication
■ Secret accessible when exposed to service
■ Mounted to a temporary fs (not env vars)
■ RBAC in Enterprise Edition
16
Docker
@LizRice | @AquaSecTeam
■ Encrypted in Raft log
■ Lock your Swarm!!
■ Shared to Swarm managers
■ Audit log with events
■ Rotation requires container restart
& secret dance
Encrypted ✓ Access control ✓ Life-cycle ?
17
Kubernetes secrets
@LizRice | @AquaSecTeam
■ Secret configured in pod YAML
■ Namespaced
■ RBAC can be turned on
--authorization-mode=RBAC
■ Files and env vars
■ Files support updating secret values
■ Need to restart pod to get new env var value
18
Kubernetes secrets
@LizRice | @AquaSecTeam
■ Stored in etcd
■ Make sure secrets are encrypted!
■ --experimental-encryption-provider-config on API Server
Encrypted ? Access control ✓ Life-cycle ✓
19
Kubernetes secrets
@LizRice | @AquaSecTeam
kind: EncryptionConfig
apiVersion: v1
resources:
- resources:
- secrets
providers:
- aescbc:
keys:
- name: key1
secret: bXlWZXJ5U2VjcmV0RW5jcnlwdGlvbktleQo=
- identity: {}
20
Secrets all the way down
@LizRice | @AquaSecTeam
■ EncryptionConfig holds a secret key...
xkcd.com/1416
21
DC/OS
@LizRice | @AquaSecTeam
■ Enterprise DC/OS
■ Plug-ins for Mesos/Marathon
■ Encrypted in ZooKeeper
■ Env vars
■ Access control by service path
■ Restart service to update value
Encrypted ✓ Access control ✓ Life-cycle ?
22
Nomad
@LizRice | @AquaSecTeam
■ Integrated with Vault
■ Use production mode
■ Encryption & security primitives
23
Nomad
@LizRice | @AquaSecTeam
■ Secrets passed as files
■ Nomad takes care of interactions with Vault
■ Tasks get tokens so they can retrieve values
■ Poll for changed values
■ Access control
■ Audit logging
Encrypted ✓ Access control ✓ Life-cycle ✓
24
Aqua secrets & external store
@LizRice | @AquaSecTeam
■ Any orchestrator
■ Secret storage in 3rd party backend
■ Hashicorp Vault, Amazon KMS, Azure Key Vault, CyberArk Vault...
25
Aqua secrets & external store
@LizRice | @AquaSecTeam
■ File system & env var support
■ Update secrets without container restart
■ No env var leak through inspect or /proc
■ Auditing of secret usage
■ User & container access control
Encrypted ✓ Access control ✓ Life-cycle ✓
Summary
27
Secrets
@LizRice | @AquaSecTeam
Secrets
photo: Iain Merchant
■ Access secrets at runtime
■ Not built in
■ Rotate secrets
■ Your best option depends on
■ Orchestrator
■ Acceptable level of risk
Join the conversation #DevSecCon
The Ultimate Guide to Secrets Management
in Containers
tiny.cc/secrets
@LizRice | @AquaSecTeam
29
Kubernetes secrets access
@LizRice | @AquaSecTeam
■ RBAC can be turned on --authorization-mode=RBAC
# This role binding allows "dave" to read secrets in the "development" namespace.
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: read-secrets
namespace: development # This only grants permissions within the "development" namespace.
subjects:
- kind: User
name: dave
apiGroup: rbac.authorization.k8s.io
roleRef:
kind: ClusterRole
name: secret-reader
apiGroup: rbac.authorization.k8s.io

More Related Content

PDF
Your (container) secret's safe with me
PDF
Your secret's safe with me
PPTX
Hug #9 who's keeping your secrets
PDF
London HUG 19/5 - Kubernetes and vault
PPTX
London Hug 20/6 - Vault production
PDF
Kubernetes Security
PDF
Kubernetes - security you need to know about it
PDF
Control Plane: Continuous Kubernetes Security (DevSecOps - London Gathering, ...
Your (container) secret's safe with me
Your secret's safe with me
Hug #9 who's keeping your secrets
London HUG 19/5 - Kubernetes and vault
London Hug 20/6 - Vault production
Kubernetes Security
Kubernetes - security you need to know about it
Control Plane: Continuous Kubernetes Security (DevSecOps - London Gathering, ...

What's hot (20)

PDF
London Hug 20/6 - Clustering RabbitMQ using Consul
PDF
Zombies in Kubernetes
PDF
DevOpsDaysRiga 2018: Andrew Martin - Continuous Kubernetes Security
PDF
Control Plane: Security Rationale for Istio (DevSecOps - London Gathering, Ja...
PDF
Alex Dias: how to build a docker monitoring solution
PDF
Container Security Deep Dive & Kubernetes
PDF
Security threats with Kubernetes - Igor Khoroshchenko
PDF
CI / CD / CS - Continuous Security in Kubernetes
PDF
Kubernetes - Security Journey
PDF
Mastering kubernetes ingress nginx
PDF
Lessons learned and challenges faced while running Kubernetes at Scale
PDF
How abusing the Docker API led to remote code execution same origin bypass an...
PDF
Chris Rutter: Avoiding The Security Brick
PPTX
Bandit and Gosec - Security Linters
PDF
JEE on DC/OS
ODP
OpenShift & SELinux with Dan Walsh @rhatdan
PDF
BRISK_Network_Pentest_
PPTX
Security best practices for kubernetes deployment
PPTX
Lessons Learned in Automating Compliance for Containers
PDF
Container Security
London Hug 20/6 - Clustering RabbitMQ using Consul
Zombies in Kubernetes
DevOpsDaysRiga 2018: Andrew Martin - Continuous Kubernetes Security
Control Plane: Security Rationale for Istio (DevSecOps - London Gathering, Ja...
Alex Dias: how to build a docker monitoring solution
Container Security Deep Dive & Kubernetes
Security threats with Kubernetes - Igor Khoroshchenko
CI / CD / CS - Continuous Security in Kubernetes
Kubernetes - Security Journey
Mastering kubernetes ingress nginx
Lessons learned and challenges faced while running Kubernetes at Scale
How abusing the Docker API led to remote code execution same origin bypass an...
Chris Rutter: Avoiding The Security Brick
Bandit and Gosec - Security Linters
JEE on DC/OS
OpenShift & SELinux with Dan Walsh @rhatdan
BRISK_Network_Pentest_
Security best practices for kubernetes deployment
Lessons Learned in Automating Compliance for Containers
Container Security
Ad

Similar to Container secrets talk from DevSecCon (20)

PDF
Your secret's safe with me
PPTX
Containers: Give Me The Facts, Not The Hype - AppD Summit Europe
PDF
Docker Security: Are Your Containers Tightly Secured to the Ship?
PPTX
Secure development on Kubernetes by Andreas Falk
PDF
DerbyCon 2019: Prepare to be Boarded! A Tale of Kubernetes, Plunder, and Cryp...
PPTX
Container Monitoring with Sysdig
PDF
Caching reboot: javax.cache & Ehcache 3
PPTX
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
PDF
Dockertaipei 20150528-dockerswarm
PPTX
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
PDF
Discover some "Big Data" architectural concepts with Redis
PDF
Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale
PDF
Batten Down the Hatches: A Practical Guide to Securing Kubernetes - RMISC 2019
PDF
Digital Forensics and Incident Response in The Cloud Part 3
PPTX
Secret Management with Hashicorp Vault and Consul on Kubernetes
PDF
The Concierge Paradigm
PPTX
Devoxx France 2015 - The Docker Orchestration Ecosystem on Azure
PDF
Commit 2024 Secrets Management Made Easy
PDF
Lions, Tigers and Deers: What building zoos can teach us about securing micro...
PDF
DCSF19 Container Security: Theory & Practice at Netflix
Your secret's safe with me
Containers: Give Me The Facts, Not The Hype - AppD Summit Europe
Docker Security: Are Your Containers Tightly Secured to the Ship?
Secure development on Kubernetes by Andreas Falk
DerbyCon 2019: Prepare to be Boarded! A Tale of Kubernetes, Plunder, and Cryp...
Container Monitoring with Sysdig
Caching reboot: javax.cache & Ehcache 3
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
Dockertaipei 20150528-dockerswarm
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
Discover some "Big Data" architectural concepts with Redis
Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale
Batten Down the Hatches: A Practical Guide to Securing Kubernetes - RMISC 2019
Digital Forensics and Incident Response in The Cloud Part 3
Secret Management with Hashicorp Vault and Consul on Kubernetes
The Concierge Paradigm
Devoxx France 2015 - The Docker Orchestration Ecosystem on Azure
Commit 2024 Secrets Management Made Easy
Lions, Tigers and Deers: What building zoos can teach us about securing micro...
DCSF19 Container Security: Theory & Practice at Netflix
Ad

More from Liz Rice (7)

PDF
The maths behind microscaling
PPTX
Game of Hosts - Containers, VMs and Microscaling
PPTX
How to build a personalized interface for VOD
PPTX
Tank Top TV - Netflix viewing data
PPTX
Killing the TV time grid
PPTX
Cadbury
PPTX
Beatz
The maths behind microscaling
Game of Hosts - Containers, VMs and Microscaling
How to build a personalized interface for VOD
Tank Top TV - Netflix viewing data
Killing the TV time grid
Cadbury
Beatz

Recently uploaded (20)

PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Nekopoi APK 2025 free lastest update
PDF
System and Network Administraation Chapter 3
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
ai tools demonstartion for schools and inter college
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
Softaken Excel to vCard Converter Software.pdf
Understanding Forklifts - TECH EHS Solution
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Nekopoi APK 2025 free lastest update
System and Network Administraation Chapter 3
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Odoo Companies in India – Driving Business Transformation.pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Which alternative to Crystal Reports is best for small or large businesses.pdf
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
ai tools demonstartion for schools and inter college
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Reimagine Home Health with the Power of Agentic AI​
2025 Textile ERP Trends: SAP, Odoo & Oracle

Container secrets talk from DevSecCon

  • 1. Join the conversation #DevSecCon Your (container) secret’s safe with me Liz Rice, Aqua Security @lizrice
  • 4. Desirable attributes for secrets management
  • 5. 5 Secrets @LizRice | @AquaSecTeam Secrets photo: Katie Tegtmeyer ■ Encrypted ■ At rest and in transit ■ Only decrypted in memory
  • 6. 6 Secrets @LizRice | @AquaSecTeam Secrets photo: James Case ■ Access control ■ Only accessible by containers that need them ■ And users ■ Write-only access
  • 7. 7 Secrets @LizRice | @AquaSecTeam Secrets photo: Irena Jackson ■ Life-cycle ■ Risk of leak increases over time ■ Rotation, revocation, audit logging
  • 8. Passing secrets to containers
  • 9. 9 Bad places for secrets @LizRice | @AquaSecTeam ■ Source code ■ Dockerfiles / images
  • 10. 10 docker run -e VARNAME=secret ... Environment variables @LizRice | @AquaSecTeam
  • 11. 11 ■ docker inspect ■ docker exec ■ /proc directory ■ Leaky logs Environment variables @LizRice | @AquaSecTeam
  • 12. 12 docker run -v /hostsecrets:/secrets ... Mounted volume @LizRice | @AquaSecTeam
  • 13. 13 ■ docker inspect ■ docker exec ■ /proc directory ■ Leaky logs Mounted volume @LizRice | @AquaSecTeam
  • 15. 15 Docker @LizRice | @AquaSecTeam ■ Secrets support built in for Docker Swarm services ■ Not standalone containers ■ Encrypted transmission with mutual authentication ■ Secret accessible when exposed to service ■ Mounted to a temporary fs (not env vars) ■ RBAC in Enterprise Edition
  • 16. 16 Docker @LizRice | @AquaSecTeam ■ Encrypted in Raft log ■ Lock your Swarm!! ■ Shared to Swarm managers ■ Audit log with events ■ Rotation requires container restart & secret dance Encrypted ✓ Access control ✓ Life-cycle ?
  • 17. 17 Kubernetes secrets @LizRice | @AquaSecTeam ■ Secret configured in pod YAML ■ Namespaced ■ RBAC can be turned on --authorization-mode=RBAC ■ Files and env vars ■ Files support updating secret values ■ Need to restart pod to get new env var value
  • 18. 18 Kubernetes secrets @LizRice | @AquaSecTeam ■ Stored in etcd ■ Make sure secrets are encrypted! ■ --experimental-encryption-provider-config on API Server Encrypted ? Access control ✓ Life-cycle ✓
  • 19. 19 Kubernetes secrets @LizRice | @AquaSecTeam kind: EncryptionConfig apiVersion: v1 resources: - resources: - secrets providers: - aescbc: keys: - name: key1 secret: bXlWZXJ5U2VjcmV0RW5jcnlwdGlvbktleQo= - identity: {}
  • 20. 20 Secrets all the way down @LizRice | @AquaSecTeam ■ EncryptionConfig holds a secret key... xkcd.com/1416
  • 21. 21 DC/OS @LizRice | @AquaSecTeam ■ Enterprise DC/OS ■ Plug-ins for Mesos/Marathon ■ Encrypted in ZooKeeper ■ Env vars ■ Access control by service path ■ Restart service to update value Encrypted ✓ Access control ✓ Life-cycle ?
  • 22. 22 Nomad @LizRice | @AquaSecTeam ■ Integrated with Vault ■ Use production mode ■ Encryption & security primitives
  • 23. 23 Nomad @LizRice | @AquaSecTeam ■ Secrets passed as files ■ Nomad takes care of interactions with Vault ■ Tasks get tokens so they can retrieve values ■ Poll for changed values ■ Access control ■ Audit logging Encrypted ✓ Access control ✓ Life-cycle ✓
  • 24. 24 Aqua secrets & external store @LizRice | @AquaSecTeam ■ Any orchestrator ■ Secret storage in 3rd party backend ■ Hashicorp Vault, Amazon KMS, Azure Key Vault, CyberArk Vault...
  • 25. 25 Aqua secrets & external store @LizRice | @AquaSecTeam ■ File system & env var support ■ Update secrets without container restart ■ No env var leak through inspect or /proc ■ Auditing of secret usage ■ User & container access control Encrypted ✓ Access control ✓ Life-cycle ✓
  • 27. 27 Secrets @LizRice | @AquaSecTeam Secrets photo: Iain Merchant ■ Access secrets at runtime ■ Not built in ■ Rotate secrets ■ Your best option depends on ■ Orchestrator ■ Acceptable level of risk
  • 28. Join the conversation #DevSecCon The Ultimate Guide to Secrets Management in Containers tiny.cc/secrets @LizRice | @AquaSecTeam
  • 29. 29 Kubernetes secrets access @LizRice | @AquaSecTeam ■ RBAC can be turned on --authorization-mode=RBAC # This role binding allows "dave" to read secrets in the "development" namespace. kind: RoleBinding apiVersion: rbac.authorization.k8s.io/v1beta1 metadata: name: read-secrets namespace: development # This only grants permissions within the "development" namespace. subjects: - kind: User name: dave apiGroup: rbac.authorization.k8s.io roleRef: kind: ClusterRole name: secret-reader apiGroup: rbac.authorization.k8s.io