SlideShare a Scribd company logo
1 of 34
Download to read offline
Copyright @ 2017 Aqua Security Software Ltd. All Rights Reserved.
Securing Applications in
Kubernetes
Tsvi Korren, CISSP
April 2017
2
CONTAINERS HAVE SECURITY IMPLICATIONS
Risk posture of the images is not understood
Where should security fit in the process
Containers are not visible with current security tools
Open source and other external components used
3
WHAT SECURITY PEOPLE WANT?
 Safe images, from trusted sources, tamper-proof
 Common security practices in the container environment
 Networking segmentation
 Safeguard sensitive data
 Accountability and audit data of container usage
 Data for demonstrating compliance
4
SECURE EACH STEP IN THE CONTAINER LIFECYCLE
Image Quality,
Exposure Risk
Trust, Integrity
Assurance
Resource and
Access Controls
Process,
Network, Secrets
Visibility
Build DeployShip
 
Run
5
SECURITY STARTS IN THE BUILD PHASE
• Make sure base images are secure
• Scan for vulnerabilities on the finished product
• Maintain configuration standards
• Share information between Dev, Ops and Sec

Build DeployShip
 
Run
6
ADD ENFORCEMENT OF IMAGE USAGE
• Deny unknown images or registries
• Accept images based on risk
• Maintain integrity of images

Build DeployShip
 
Run
7
CONTROL THE INFLOW OF IMAGES
All the images in the world
Official, Signed or
custom images
Registered

Public Registries
Private Registry
Approved for Use
Passed Image Policy
General Policy
Organizational
Policy
8
LIMIT ACCESS TO CONTAINER ENGINE

• Separate automation from human actions
• Control parameters that elevate privilege
• Permissions on volumes, networks, etc.
• Audit trail with accountable user
Build DeployShip
 
Run
9
SSH
PROTECT NODES DOCKER ENGINE
 Limit terminal access to Kubernetes nodes
 Keep the Docker API secure
 Use kubectl with proper authorization
 To manage containers via pods, deployments…
 To exec into a running container, if needed…
 To query status via describe…
10
KUBERNETES AUTHORIZATION
 Enables define fine-grained-access controls on
 Namespaces
 Pods, Services, Containers
 Operations
 Authorization plugins based on
 ABAC model (attribute-based)
 RBAC mode (role-based)
11
ADMINISTRATIVE BOUNDARIES
 Example: allow ‘alice’ to read pods from namespace ‘fronto’
{
"apiVersion": "abac.authorization.kubernetes.io/v1beta1",
"kind": "Policy",
"spec": {
"user": "alice",
"namespace": "fronto",
"resource": "pods",
"readonly": true
}
}
12
WHY AUTHORIZATION?
 Limits the damage of mistake or malicious intent
 Manage resources access by logical groups
 Resource segregation for multi-tenancy
 Compliance with regulations
13
GRANULAR CONTROLS OF RUNNING CONTAINERS
• Resource Management
• Protect sensitive data
• Network segmentation
• Fine-grain application controls

Build DeployShip
 
Run
14
DEFINE RESOURCE QUOTA
 Avoid Resource-unbound containers in shared cluster
 Create resource quota policies
 Pods
 CPUs
 Memory ...
 Assigned to namespace
15
RESOURCE QUOTA EXAMPLE
 compute-resources.yaml
 kubectl create -f ./compute-resources.yaml --namespace=myspace
apiVersion: v1
kind: ResourceQuota
metadata:
name: compute-resources
spec:
hard:
pods: "4"
requests.cpu: "1"
requests.memory: 1Gi
limits.cpu: "2"
limits.memory: 2Gi
16
WHY RESOURCE QUOTAS?
 Unbound resources add risk of DoS by runaway container
 By default, all resources are created unbound
 Predictable performance of clusters
 Required for capacity planning and disaster recovery
17
PROTECT SENSITIVE INFORMATION
 Storing sensitive data inside images or deployment definition
is not safe
 Basic requirements for secret management
 Put them in a vault while at rest, encrypted with key management
 Restrict access to authorized users on authorized resources
 Protect in transit and never commit to storage
 Facilitate secrets expiry and rotation
18
KUBERNETES SECRETS
 Defined as objects consistent with the deployments
 Can be distributed as files or environment variables
 Cautions
 Simple base64 encoding
 Values accessible while at rest in etcd
 No separation of duties: operator can see secret value
 Secrets might persist on the node regardless of actual usage by
containers
19
KUBERNETES SECRETS - EXAMPLE
$ echo -n "admin" | base64
YWRtaW4=
$ echo -n "1f2d1e2e67df" | base64
MWYyZDFlMmU2N2Rm
apiVersion: v1
kind: Secret
metadata:
name: mysecret
type: Opaque
data:
username: YWRtaW4=
password: MWYyZDFlMmU2N2Rm
echo "MWYyZDFlMmU2N2Rm" | base64 --decode
1f2d1e2e67df
20
NETWORK SEGMENTATION
 Integration with external network enforcement points
 Kubernetes Network Policies work on pod-to-pod isolation
(with only incoming traffic rules)
 Dynamic nature of container network identities makes
container network segmentation a true challenge
21
IMPLEMENT NETWORK SEGMENTATION: EXAMPLE
apiVersion: extensions/v1beta1
kind: NetworkPolicy
metadata:
name: test-network-policy
namespace: default
spec:
ingress:
-
from:
-
namespaceSelector:
matchLabels:
project: myproject
-
podSelector:
matchLabels:
role: frontend
ports:
-
port: 6379
protocol: tcp
podSelector:
matchLabels:
role: db
22
WHY NETWORK SEGMENTATION
 One compromised application is an door open into the cluster
 Ensures containers communicate based on required function
 Enables more co-locating of applications in the cluster
 Network segmentation is required for compliance
23
BEYOND KUBERNETES NATIVE CONTROLS
 Image Assurance
 User Access controls
 Application granular controls
 Secrets distribution
 Network segmentation
24
For
Developers
For Ops and
Security
DETAILED IMAGE RISK INFORMATION
25
PREVENT UNAUTHORIZED IMAGES FROM RUNNING
Prevention
Image Policy
Registration
26
LIMIT HUMAN INTERACTION WITH AUTOMATION
27
APPLICATION GRANULAR CONTROLS
28
HOST NETWORK ZONES ARE NOT ENOUGH
Host Network Zone Host Network Zone
CPU CPU
29
NEED FOR CONTAINER-SPECIFIC NETWORK ZONES
Host Network Zone Host Network Zone
CPU CPU
30
LEARN AND APPLY FIREWALL RULES
31
SECRETS MANAGEMENT
Define
Secret
True
Encryption
32
ADDED VISIBILITY
Inventory
Audit trail
Splunk
Syslog
OMS
(others)
GRC
33
OPPORTUNITY FOR BETTER SECURITY
 Prevent unknown images
 Stop image by CVEs and score
 Stop user privilege escalation
 Stop suspicious processes
 Control capabilities
 Enforce network isolation
 Protect the host resources
 Encrypt sensitive variables
 Enforce use of automation tools
 Visibility across the environment
Container Engine
Production Host
CPU
WWW.AQUASEC.COM

More Related Content

What's hot

Secret Management with Hashicorp’s Vault
Secret Management with Hashicorp’s VaultSecret Management with Hashicorp’s Vault
Secret Management with Hashicorp’s VaultAWS Germany
 
Cloud-Native Security
Cloud-Native SecurityCloud-Native Security
Cloud-Native SecurityVMware Tanzu
 
Kubernetes
KubernetesKubernetes
Kuberneteserialc_w
 
Kubernetes Networking with Cilium - Deep Dive
Kubernetes Networking with Cilium - Deep DiveKubernetes Networking with Cilium - Deep Dive
Kubernetes Networking with Cilium - Deep DiveMichal Rostecki
 
Kubernetes and container security
Kubernetes and container securityKubernetes and container security
Kubernetes and container securityVolodymyr Shynkar
 
Kubernetes dealing with storage and persistence
Kubernetes  dealing with storage and persistenceKubernetes  dealing with storage and persistence
Kubernetes dealing with storage and persistenceJanakiram MSV
 
Kubernetes
KubernetesKubernetes
KubernetesHenry He
 
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...Simplilearn
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetesRishabh Indoria
 
The Sysdig Secure DevOps Platform
The Sysdig Secure DevOps PlatformThe Sysdig Secure DevOps Platform
The Sysdig Secure DevOps PlatformAshnikbiz
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes NetworkingCJ Cullen
 
DevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesDevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesRonny Trommer
 
Getting Started with Kubernetes
Getting Started with Kubernetes Getting Started with Kubernetes
Getting Started with Kubernetes VMware Tanzu
 
Kubernetes architecture
Kubernetes architectureKubernetes architecture
Kubernetes architectureJanakiram MSV
 
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Edureka!
 
Persistent Storage with Containers with Kubernetes & OpenShift
Persistent Storage with Containers with Kubernetes & OpenShiftPersistent Storage with Containers with Kubernetes & OpenShift
Persistent Storage with Containers with Kubernetes & OpenShiftRed Hat Events
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshoploodse
 

What's hot (20)

Secret Management with Hashicorp’s Vault
Secret Management with Hashicorp’s VaultSecret Management with Hashicorp’s Vault
Secret Management with Hashicorp’s Vault
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Cloud-Native Security
Cloud-Native SecurityCloud-Native Security
Cloud-Native Security
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Kubernetes Networking with Cilium - Deep Dive
Kubernetes Networking with Cilium - Deep DiveKubernetes Networking with Cilium - Deep Dive
Kubernetes Networking with Cilium - Deep Dive
 
Kubernetes and container security
Kubernetes and container securityKubernetes and container security
Kubernetes and container security
 
Kubernetes dealing with storage and persistence
Kubernetes  dealing with storage and persistenceKubernetes  dealing with storage and persistence
Kubernetes dealing with storage and persistence
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
What Is A Docker Container? | Docker Container Tutorial For Beginners| Docker...
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
The Sysdig Secure DevOps Platform
The Sysdig Secure DevOps PlatformThe Sysdig Secure DevOps Platform
The Sysdig Secure DevOps Platform
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes Networking
 
DevOps with Kubernetes
DevOps with KubernetesDevOps with Kubernetes
DevOps with Kubernetes
 
DevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesDevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to Kubernetes
 
Getting Started with Kubernetes
Getting Started with Kubernetes Getting Started with Kubernetes
Getting Started with Kubernetes
 
Kubernetes architecture
Kubernetes architectureKubernetes architecture
Kubernetes architecture
 
Kubernetes networking & Security
Kubernetes networking & SecurityKubernetes networking & Security
Kubernetes networking & Security
 
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
 
Persistent Storage with Containers with Kubernetes & OpenShift
Persistent Storage with Containers with Kubernetes & OpenShiftPersistent Storage with Containers with Kubernetes & OpenShift
Persistent Storage with Containers with Kubernetes & OpenShift
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshop
 

Similar to Container Security Deep Dive & Kubernetes

Security for cloud native workloads
Security for cloud native workloadsSecurity for cloud native workloads
Security for cloud native workloadsRuncy Oommen
 
Security best practices for kubernetes deployment
Security best practices for kubernetes deployment  Security best practices for kubernetes deployment
Security best practices for kubernetes deployment Aqua Security
 
Security best practices for kubernetes deployment
Security best practices for kubernetes deploymentSecurity best practices for kubernetes deployment
Security best practices for kubernetes deploymentMichael Cherny
 
Evolution of security strategies in K8s environments- All day devops
Evolution of security strategies in K8s environments- All day devops Evolution of security strategies in K8s environments- All day devops
Evolution of security strategies in K8s environments- All day devops Jose Manuel Ortega Candel
 
12 Ways Not to get 'Hacked' your Kubernetes Cluster
12 Ways Not to get 'Hacked' your Kubernetes Cluster12 Ways Not to get 'Hacked' your Kubernetes Cluster
12 Ways Not to get 'Hacked' your Kubernetes ClusterSuman Chakraborty
 
Evolution of security strategies in K8s environments.pdf
Evolution of security strategies in K8s environments.pdfEvolution of security strategies in K8s environments.pdf
Evolution of security strategies in K8s environments.pdfJose Manuel Ortega Candel
 
K8s security best practices
K8s security best practicesK8s security best practices
K8s security best practicesSharon Vendrov
 
Unified Protection for Multi-Cloud Infrastructure
Unified Protection for Multi-Cloud InfrastructureUnified Protection for Multi-Cloud Infrastructure
Unified Protection for Multi-Cloud InfrastructureMarketingArrowECS_CZ
 
K8s security best practices
K8s security best practicesK8s security best practices
K8s security best practicesSharon Vendrov
 
Networking in Docker EE 2.0 with Kubernetes and Swarm
Networking in Docker EE 2.0 with Kubernetes and SwarmNetworking in Docker EE 2.0 with Kubernetes and Swarm
Networking in Docker EE 2.0 with Kubernetes and SwarmAbhinandan P.b
 
Networking in docker ee with kubernetes and swarm
Networking in docker ee with kubernetes and swarmNetworking in docker ee with kubernetes and swarm
Networking in docker ee with kubernetes and swarmDocker, Inc.
 
Continuous Security: From tins to containers - now what!
Continuous Security: From tins to containers - now what!Continuous Security: From tins to containers - now what!
Continuous Security: From tins to containers - now what!Michael Man
 
VSphere Integrated Containers v3.0
VSphere Integrated Containers v3.0VSphere Integrated Containers v3.0
VSphere Integrated Containers v3.0The World Bank
 
The State of Kubernetes Security
The State of Kubernetes Security The State of Kubernetes Security
The State of Kubernetes Security Jimmy Mesta
 
Consolidating Infrastructure with Azure Kubernetes Service - MS Online Tech F...
Consolidating Infrastructure with Azure Kubernetes Service - MS Online Tech F...Consolidating Infrastructure with Azure Kubernetes Service - MS Online Tech F...
Consolidating Infrastructure with Azure Kubernetes Service - MS Online Tech F...Davide Benvegnù
 
DBA Tasks in Oracle Autonomous Database
DBA Tasks in Oracle Autonomous DatabaseDBA Tasks in Oracle Autonomous Database
DBA Tasks in Oracle Autonomous DatabaseSinanPetrusToma
 
Cloud Native Security: New Approach for a New Reality
Cloud Native Security: New Approach for a New RealityCloud Native Security: New Approach for a New Reality
Cloud Native Security: New Approach for a New RealityCarlos Andrés García
 
Securing Prometheus. Lessons Learned from OpenShift.pdf
Securing Prometheus. Lessons Learned from OpenShift.pdfSecuring Prometheus. Lessons Learned from OpenShift.pdf
Securing Prometheus. Lessons Learned from OpenShift.pdfJesús Ángel Samitier
 

Similar to Container Security Deep Dive & Kubernetes (20)

Security for cloud native workloads
Security for cloud native workloadsSecurity for cloud native workloads
Security for cloud native workloads
 
Security best practices for kubernetes deployment
Security best practices for kubernetes deployment  Security best practices for kubernetes deployment
Security best practices for kubernetes deployment
 
Security best practices for kubernetes deployment
Security best practices for kubernetes deploymentSecurity best practices for kubernetes deployment
Security best practices for kubernetes deployment
 
Evolution of security strategies in K8s environments- All day devops
Evolution of security strategies in K8s environments- All day devops Evolution of security strategies in K8s environments- All day devops
Evolution of security strategies in K8s environments- All day devops
 
12 Ways Not to get 'Hacked' your Kubernetes Cluster
12 Ways Not to get 'Hacked' your Kubernetes Cluster12 Ways Not to get 'Hacked' your Kubernetes Cluster
12 Ways Not to get 'Hacked' your Kubernetes Cluster
 
Evolution of security strategies in K8s environments.pdf
Evolution of security strategies in K8s environments.pdfEvolution of security strategies in K8s environments.pdf
Evolution of security strategies in K8s environments.pdf
 
K8s security best practices
K8s security best practicesK8s security best practices
K8s security best practices
 
Unified Protection for Multi-Cloud Infrastructure
Unified Protection for Multi-Cloud InfrastructureUnified Protection for Multi-Cloud Infrastructure
Unified Protection for Multi-Cloud Infrastructure
 
K8s security best practices
K8s security best practicesK8s security best practices
K8s security best practices
 
Networking in Docker EE 2.0 with Kubernetes and Swarm
Networking in Docker EE 2.0 with Kubernetes and SwarmNetworking in Docker EE 2.0 with Kubernetes and Swarm
Networking in Docker EE 2.0 with Kubernetes and Swarm
 
Networking in docker ee with kubernetes and swarm
Networking in docker ee with kubernetes and swarmNetworking in docker ee with kubernetes and swarm
Networking in docker ee with kubernetes and swarm
 
Continuous Security: From tins to containers - now what!
Continuous Security: From tins to containers - now what!Continuous Security: From tins to containers - now what!
Continuous Security: From tins to containers - now what!
 
Advanced Container Security
Advanced Container Security Advanced Container Security
Advanced Container Security
 
VSphere Integrated Containers v3.0
VSphere Integrated Containers v3.0VSphere Integrated Containers v3.0
VSphere Integrated Containers v3.0
 
The State of Kubernetes Security
The State of Kubernetes Security The State of Kubernetes Security
The State of Kubernetes Security
 
Breaking The Cloud Kill Chain
Breaking The Cloud Kill ChainBreaking The Cloud Kill Chain
Breaking The Cloud Kill Chain
 
Consolidating Infrastructure with Azure Kubernetes Service - MS Online Tech F...
Consolidating Infrastructure with Azure Kubernetes Service - MS Online Tech F...Consolidating Infrastructure with Azure Kubernetes Service - MS Online Tech F...
Consolidating Infrastructure with Azure Kubernetes Service - MS Online Tech F...
 
DBA Tasks in Oracle Autonomous Database
DBA Tasks in Oracle Autonomous DatabaseDBA Tasks in Oracle Autonomous Database
DBA Tasks in Oracle Autonomous Database
 
Cloud Native Security: New Approach for a New Reality
Cloud Native Security: New Approach for a New RealityCloud Native Security: New Approach for a New Reality
Cloud Native Security: New Approach for a New Reality
 
Securing Prometheus. Lessons Learned from OpenShift.pdf
Securing Prometheus. Lessons Learned from OpenShift.pdfSecuring Prometheus. Lessons Learned from OpenShift.pdf
Securing Prometheus. Lessons Learned from OpenShift.pdf
 

Recently uploaded

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 

Recently uploaded (20)

Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 

Container Security Deep Dive & Kubernetes

  • 1. Copyright @ 2017 Aqua Security Software Ltd. All Rights Reserved. Securing Applications in Kubernetes Tsvi Korren, CISSP April 2017
  • 2. 2 CONTAINERS HAVE SECURITY IMPLICATIONS Risk posture of the images is not understood Where should security fit in the process Containers are not visible with current security tools Open source and other external components used
  • 3. 3 WHAT SECURITY PEOPLE WANT?  Safe images, from trusted sources, tamper-proof  Common security practices in the container environment  Networking segmentation  Safeguard sensitive data  Accountability and audit data of container usage  Data for demonstrating compliance
  • 4. 4 SECURE EACH STEP IN THE CONTAINER LIFECYCLE Image Quality, Exposure Risk Trust, Integrity Assurance Resource and Access Controls Process, Network, Secrets Visibility Build DeployShip   Run
  • 5. 5 SECURITY STARTS IN THE BUILD PHASE • Make sure base images are secure • Scan for vulnerabilities on the finished product • Maintain configuration standards • Share information between Dev, Ops and Sec  Build DeployShip   Run
  • 6. 6 ADD ENFORCEMENT OF IMAGE USAGE • Deny unknown images or registries • Accept images based on risk • Maintain integrity of images  Build DeployShip   Run
  • 7. 7 CONTROL THE INFLOW OF IMAGES All the images in the world Official, Signed or custom images Registered  Public Registries Private Registry Approved for Use Passed Image Policy General Policy Organizational Policy
  • 8. 8 LIMIT ACCESS TO CONTAINER ENGINE  • Separate automation from human actions • Control parameters that elevate privilege • Permissions on volumes, networks, etc. • Audit trail with accountable user Build DeployShip   Run
  • 9. 9 SSH PROTECT NODES DOCKER ENGINE  Limit terminal access to Kubernetes nodes  Keep the Docker API secure  Use kubectl with proper authorization  To manage containers via pods, deployments…  To exec into a running container, if needed…  To query status via describe…
  • 10. 10 KUBERNETES AUTHORIZATION  Enables define fine-grained-access controls on  Namespaces  Pods, Services, Containers  Operations  Authorization plugins based on  ABAC model (attribute-based)  RBAC mode (role-based)
  • 11. 11 ADMINISTRATIVE BOUNDARIES  Example: allow ‘alice’ to read pods from namespace ‘fronto’ { "apiVersion": "abac.authorization.kubernetes.io/v1beta1", "kind": "Policy", "spec": { "user": "alice", "namespace": "fronto", "resource": "pods", "readonly": true } }
  • 12. 12 WHY AUTHORIZATION?  Limits the damage of mistake or malicious intent  Manage resources access by logical groups  Resource segregation for multi-tenancy  Compliance with regulations
  • 13. 13 GRANULAR CONTROLS OF RUNNING CONTAINERS • Resource Management • Protect sensitive data • Network segmentation • Fine-grain application controls  Build DeployShip   Run
  • 14. 14 DEFINE RESOURCE QUOTA  Avoid Resource-unbound containers in shared cluster  Create resource quota policies  Pods  CPUs  Memory ...  Assigned to namespace
  • 15. 15 RESOURCE QUOTA EXAMPLE  compute-resources.yaml  kubectl create -f ./compute-resources.yaml --namespace=myspace apiVersion: v1 kind: ResourceQuota metadata: name: compute-resources spec: hard: pods: "4" requests.cpu: "1" requests.memory: 1Gi limits.cpu: "2" limits.memory: 2Gi
  • 16. 16 WHY RESOURCE QUOTAS?  Unbound resources add risk of DoS by runaway container  By default, all resources are created unbound  Predictable performance of clusters  Required for capacity planning and disaster recovery
  • 17. 17 PROTECT SENSITIVE INFORMATION  Storing sensitive data inside images or deployment definition is not safe  Basic requirements for secret management  Put them in a vault while at rest, encrypted with key management  Restrict access to authorized users on authorized resources  Protect in transit and never commit to storage  Facilitate secrets expiry and rotation
  • 18. 18 KUBERNETES SECRETS  Defined as objects consistent with the deployments  Can be distributed as files or environment variables  Cautions  Simple base64 encoding  Values accessible while at rest in etcd  No separation of duties: operator can see secret value  Secrets might persist on the node regardless of actual usage by containers
  • 19. 19 KUBERNETES SECRETS - EXAMPLE $ echo -n "admin" | base64 YWRtaW4= $ echo -n "1f2d1e2e67df" | base64 MWYyZDFlMmU2N2Rm apiVersion: v1 kind: Secret metadata: name: mysecret type: Opaque data: username: YWRtaW4= password: MWYyZDFlMmU2N2Rm echo "MWYyZDFlMmU2N2Rm" | base64 --decode 1f2d1e2e67df
  • 20. 20 NETWORK SEGMENTATION  Integration with external network enforcement points  Kubernetes Network Policies work on pod-to-pod isolation (with only incoming traffic rules)  Dynamic nature of container network identities makes container network segmentation a true challenge
  • 21. 21 IMPLEMENT NETWORK SEGMENTATION: EXAMPLE apiVersion: extensions/v1beta1 kind: NetworkPolicy metadata: name: test-network-policy namespace: default spec: ingress: - from: - namespaceSelector: matchLabels: project: myproject - podSelector: matchLabels: role: frontend ports: - port: 6379 protocol: tcp podSelector: matchLabels: role: db
  • 22. 22 WHY NETWORK SEGMENTATION  One compromised application is an door open into the cluster  Ensures containers communicate based on required function  Enables more co-locating of applications in the cluster  Network segmentation is required for compliance
  • 23. 23 BEYOND KUBERNETES NATIVE CONTROLS  Image Assurance  User Access controls  Application granular controls  Secrets distribution  Network segmentation
  • 25. 25 PREVENT UNAUTHORIZED IMAGES FROM RUNNING Prevention Image Policy Registration
  • 26. 26 LIMIT HUMAN INTERACTION WITH AUTOMATION
  • 28. 28 HOST NETWORK ZONES ARE NOT ENOUGH Host Network Zone Host Network Zone CPU CPU
  • 29. 29 NEED FOR CONTAINER-SPECIFIC NETWORK ZONES Host Network Zone Host Network Zone CPU CPU
  • 30. 30 LEARN AND APPLY FIREWALL RULES
  • 33. 33 OPPORTUNITY FOR BETTER SECURITY  Prevent unknown images  Stop image by CVEs and score  Stop user privilege escalation  Stop suspicious processes  Control capabilities  Enforce network isolation  Protect the host resources  Encrypt sensitive variables  Enforce use of automation tools  Visibility across the environment Container Engine Production Host CPU