SlideShare a Scribd company logo
Application-Aware Security
for Microservices via BPF
Cynthia Thomas
Technology Evangelist
@_techcet_
Q1, 2018
Open Source Cloud Native Security
Application Architectures
Delivery Frequency
Operational Complexity
Single Server App
Yearly
Low
Evolution of Application Design & Delivery Frequency
Application Architectures
Delivery Frequency
Operational Complexity
Single Server App
Yearly
Low
3-Tier App
Monthly
Moderate
Evolution of Application Design & Delivery Frequency
Application Architectures
Delivery Frequency
Operational Complexity
Single Server App
Yearly
Low
Distributed
Microservices
10-100 x’s / day
Extreme
3-Tier App
Monthly
Moderate
Evolution of Application Design & Delivery Frequency
Network Security
has barely evolved
$ iptables -A INPUT -p tcp 
-s 15.15.15.3 --dport 80 
-m conntrack --ctstate NEW 
-j ACCEPT
The world still runs on iptables
matching IPs and ports:
Your HTTP ports be like …
Network Security
for Microservices
Gordon the intern has
a brilliant idea…
Gordon wants to build a service
to tweet out all job offerings.
We’re Hiring!
Tweet
Service
GET /healthz
GET /jobs/{id}
GET /applicants/{job-id}
POST /jobs
API
GET /jobs/{id}
Jobs API
Service
Tweet
Service
The Jobs API service has all the
data Gordon needs.
GET /healthz
GET /jobs/{id}
GET /applicants/{job-id}
POST /jobs
API
GET /jobs/331
GET /jobs/{id}
Jobs API
Service
Tweet
Service
Gordon uses the GET /jobs/ API call
GET /healthz
GET /jobs/{id}
GET /applicants/{job-id}
POST /jobs
API
GET /jobs/331
GET /jobs/{id}
TLS Jobs API
Service
Tweet
Service
Developer etiquette.
Super simple stuff.
Gordon uses mutual TLS Auth
Good thinking Gordon
L3/L4
GET /healthz
GET /jobs/{id}
GET /applicants/{job-id}
POST /jobs
API
GET /jobs/331
The security team has L3/L4 network security in
place for all services
GET /jobs/{id}
Jobs API
Service
Tweet
Service
TLS
iptables -s 10.1.1.1
-p tcp --dport 80
-j ACCEPT
Gordon could
POST /jobs or GET /applicants
(mistakenly or haphazardly).
POTUS job available!
Tweet
Service
Jobs API
Service
L3/L4
GET /healthz
GET /jobs/{id}
GET /applicants/{job-id}
POST /jobs
API
exposed
exposed
exposed
GET /jobs/331
Large parts of the API are still
exposed unnecessarily
Tweet
Service
GET /jobs/{id}
TLS
iptables -s 10.1.1.1
-p tcp --dport 80
-j ACCEPT
Not exactly
least privilege
Security
GET /healthz
GET /jobs/{id}
GET /applicants/{job-id}
POST /jobs
API
GET /jobs/331
Back to the drawing board…
GET /jobs/{id}
TLS Jobs API
Service
Tweet
Service
L3/L4
GET /healthz
GET /jobs/{id}
GET /applicants/{job-id}
POST /jobs
API
GET /jobs/331
Least privilege security for microservices
GET /jobs/{id}
FROM “TurtleTweets”
ALLOW “GET /jobs/”
TLS Jobs API
Service
Tweet
Service
We demand
a demo
BPF - The
Superpowers
inside Linux
Cilium:: Application-Aware Microservices via BPF
Kubernetes Integration
Kubernetes Integration
NetworkPolicy
Standard Resources
L3, L4 policy
Kubernetes Integration
NetworkPolicy
Services
Standard Resources
L3, L4 policy
ClusterIP, NodePort, LoadBalancer
Kubernetes Integration
NetworkPolicy
Services
Standard Resources
L3, L4 policy
Pods Pod Labels to specify policy on
ClusterIP, NodePort, LoadBalancer
Kubernetes Integration
NetworkPolicy
Services
Standard Resources
L3, L4 policy
Nodes
Pods Pod Labels to specify policy on
ClusterIP, NodePort, LoadBalancer
NodeIP to Node CIDR mapping
Kubernetes Integration
NetworkPolicy
CiliumNetworkPolicy
Services
Standard Resources
Custom Resource Definitions (CRD)
L3, L4 policy
L3 (Labels/CIDR), L4, L7 (ingress & egress)
Nodes
Pods Pod Labels to specify policy on
ClusterIP, NodePort, LoadBalancer
NodeIP to Node CIDR mapping
Should I encapsulate or not?
Node 1
Node 2
Node 3
Encap
Encap
Encap
Mode I: Overlay
Should I encapsulate or not?
Node 1
Node 2
Node 3
Encap
Encap
Encap
Mode I: Overlay
Name NodeIP Node CIDR
Node 1 192.168.10.1 10.0.1.0/24
Node 2 192.168.10.8 10.0.2.0/24
Node 3 192.168.10.9 10.0.3.0/24
Kubernetes Node resources table:
Installation
Run the kube-controller-manager with
the --allocate-node-cidrs
option
Should I encapsulate or not?
Mode I: Overlay Mode II: Native Routing
Node 1
Node 2
Node 3
L3
Network
Use case:
• Run your own routing daemon
• Use the cloud provider’s router
Use case:
• Simple
• “Just works” on Kubernetes
Node 1
Node 2
Node 3
Encap
Encap
Encap
L3 Policy (Labels Based)
Metadata
Allow from
pods
Pods the policy
applies to…
From Pod
To Pod
L3 Policy (CIDR)
Metadata
Allow to
IP 8.8.8.8/32
Pods the policy
applies to…
To CIDR
From Pod
L4 Policy
Metadata
Policy applies
to pods …
Allow incoming
on port 80
Pod
To Port
L4 Policy
Rule 2:
Allow PUT
If header is set
Rule 1:
Allow “GET /v/1”
L7 Policy – Only allow “GET /v1/”
Allowed
API
Calls
How are these policies enforced?
How are these policies enforced?
• L3 & L4: BPF in the kernel
How are these policies enforced?
• L3 & L4: BPF in the kernel
• L7: Sidecar proxy or KProxy / BPF
Node 2Node 1
ServiceService HTTP Request
What is a sidecar proxy?
Node 1
Service
Sidecar
Proxy
What is a sidecar proxy?
Node 2
Service
Sidecar
Proxy
Node 1
Service
Sidecar
Proxy
What is a sidecar proxy?
Node 2
Service
Sidecar
Proxy
Node 2Node 1
ServiceService
HTTP RequestSidecar
Proxy
Sidecar
Proxy
What is a sidecar proxy?
Node 2Node 1
ServiceService
HTTP RequestSidecar
Proxy
Sidecar
Proxy
What is a sidecar proxy?
Provides L7 functionality
• Routing / Load balancing
• Retries
• Circuit breaking
• Metrics
More info? Google is your friend “sidecar” / “service mesh”
Node 2Node 1
Service
Operating
System
Service
Network
Sidecar
Proxy
Sidecar
Proxy
Socket
TCP/IP
Socket
TCP/IP
Socket
TCP/IP
Socket
TCP/IP
Socket
TCP/IP
Socket
TCP/IP
• 3x Socket memory requirement
• 3x TCP/IP stack traversals
• 3x Context switches
• Complexity
Networking Path with a Sidecar
Network
Can we turn
the sidecar
into a racecar?
Node 2Node 1
Task
Operating
System
Kernel Proxy
Task
Network
Socket
KProxy
with
BPF
TCP/IP
Socket
TCP/IP
KProxy
with
BPF
kTLS kTLS
Sidecar
Proxy
Sidecar
Proxy
Network
Socket Redirect
Task
Socket Socket
Task
TCP/IP TCP/IP
Loopback
Socket Redirect
Task
Socket Socket
Task
TCP/IP TCP/IP
Loopback
Socket Redirect – Performance?
More info: https://www.cilium.io/blog/istio
Node 2Node 1
Service
Operating
System
Service
Network
Sidecar
Proxy
Sidecar
Proxy
Socket
TCP/IP
Socket
TCP/IP
Socket
TCP/IP
Socket
TCP/IP
Socket
TCP/IP
Socket
TCP/IP
The Before and After
Network
Node 1 Node 2
Service
Operating
System
Service
Network
Socket
TCP/IP
The Before and After
KProxy
Socket
TCP/IP
KProxy
Network
Socket Redirect
Cilium Summary
• Kubernetes, Mesos, Docker
• CNI / libnetwork
• Networking: Overlay or Native Routing
• Network Security (ingress/egress)
• L3 (Identity or CIDR), L4
• L7: HTTP (0.11), Kafka (0.12), gRPC (0.12)
• Load Balancing (XDP / BPF)
• Dependencies: kvstore (etcd / consul)
Application-Aware Security
for Microservices via BPF
Star Us on GitHub! github.com/cilium/cilium
Thank You! Questions?
Tutorial / Getting Started:
http://cilium.io/try
@ciliumproject
@_techcet_
Join Us on Slack: cilium.herokuapp.com

More Related Content

What's hot (20)

PDF
09 (IDNOG02) Services SDN & NFV Delivering more with less by Mochammad Irzan
Indonesia Network Operators Group
 
PPTX
Introduction to Tungsten Fabric and the vRouter
Liz Warner
 
PDF
Microservices and containers networking: Contiv, an industry leading open sou...
Codemotion
 
PDF
07 (IDNOG02) SDN Research activity in Institut Teknologi Bandung by Affan Bas...
Indonesia Network Operators Group
 
PDF
Why Automate the Network?
Hank Preston
 
PDF
Introduction to Istio on Kubernetes
Jonh Wendell
 
PDF
Orchestrating NFV Workloads in Multiple Clouds
Michelle Holley
 
PPT
Calico architecture
D.Rajesh Kumar
 
PDF
NetBox as the Source of Truth for Cisco NSO Configurations
Hank Preston
 
PPTX
ECI Risk Free Transition to Packet-UTC LATAM-April 2016
ECI – THE ELASTIC NETWORK™
 
PDF
NFV SDN Summit March 2014 D3 03 bruno_rijsman NFV with OpenContrail
ozkan01
 
PPTX
Cloud native microservices for systems and applications ieee rev2
Prem Sankar Gopannan
 
PDF
08 (IDNOG02) SP Transition to NG Infrastructure based on NFV Service Offering...
Indonesia Network Operators Group
 
PDF
Introducing Application Engineered Routing Powered by Segment Routing
Cisco Service Provider
 
PDF
DevNetCreate - ACI and Kubernetes Integration
Hank Preston
 
PPTX
Container world hybridnetworking_rev2
Prem Sankar Gopannan
 
PDF
Istio Service Mesh
Lew Tucker
 
PPTX
A Transport Layer and Socket API for (h)ICN: Design, Implementation and Perfo...
Luca Muscariello
 
PDF
Integration and Interoperation of existing Nexus networks into an ACI Archite...
Cisco Canada
 
PPT
Cairo Kubernetes Meetup - October event Talk #2
omehelba
 
09 (IDNOG02) Services SDN & NFV Delivering more with less by Mochammad Irzan
Indonesia Network Operators Group
 
Introduction to Tungsten Fabric and the vRouter
Liz Warner
 
Microservices and containers networking: Contiv, an industry leading open sou...
Codemotion
 
07 (IDNOG02) SDN Research activity in Institut Teknologi Bandung by Affan Bas...
Indonesia Network Operators Group
 
Why Automate the Network?
Hank Preston
 
Introduction to Istio on Kubernetes
Jonh Wendell
 
Orchestrating NFV Workloads in Multiple Clouds
Michelle Holley
 
Calico architecture
D.Rajesh Kumar
 
NetBox as the Source of Truth for Cisco NSO Configurations
Hank Preston
 
ECI Risk Free Transition to Packet-UTC LATAM-April 2016
ECI – THE ELASTIC NETWORK™
 
NFV SDN Summit March 2014 D3 03 bruno_rijsman NFV with OpenContrail
ozkan01
 
Cloud native microservices for systems and applications ieee rev2
Prem Sankar Gopannan
 
08 (IDNOG02) SP Transition to NG Infrastructure based on NFV Service Offering...
Indonesia Network Operators Group
 
Introducing Application Engineered Routing Powered by Segment Routing
Cisco Service Provider
 
DevNetCreate - ACI and Kubernetes Integration
Hank Preston
 
Container world hybridnetworking_rev2
Prem Sankar Gopannan
 
Istio Service Mesh
Lew Tucker
 
A Transport Layer and Socket API for (h)ICN: Design, Implementation and Perfo...
Luca Muscariello
 
Integration and Interoperation of existing Nexus networks into an ACI Archite...
Cisco Canada
 
Cairo Kubernetes Meetup - October event Talk #2
omehelba
 

Similar to Cilium:: Application-Aware Microservices via BPF (20)

PDF
Cilium - API-aware Networking and Security for Containers based on BPF
Thomas Graf
 
PDF
Cilium - Network security for microservices
Thomas Graf
 
PPTX
F5 Meetup presentation automation 2017
Guy Brown
 
PDF
Shedding Light on LINE Token Economy You Won't Find in Our White Paper
LINE Corporation
 
PDF
Linux Native, HTTP Aware Network Security
Thomas Graf
 
PDF
Managing microservices with istio on OpenShift - Meetup
José Román Martín Gil
 
PDF
ContainerDays Hamburg 2023 — Cilium Workshop.pdf
Raphaël PINSON
 
PDF
Explore the World of Cilium, Tetragon & eBPF
Raphaël PINSON
 
PDF
Big datadc skyfall_preso_v2
abramsm
 
PDF
Comparing Sidecar-less Service Mesh from Cilium and Istio
Christian Posta
 
PDF
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18
CodeOps Technologies LLP
 
PDF
Cisco Automation with Puppet and onePK - PuppetConf 2013
Puppet
 
PPTX
Microservices and containers networking: Contiv, an industry leading open sou...
Codemotion
 
PPTX
Gatekeeper: API gateway
ChengHui Weng
 
PDF
Netflix: From Zero to Production-Ready in Minutes (QCon 2017)
Tim Bozarth
 
PDF
21st Docker Switzerland Meetup - ISTIO
Niklaus Hirt
 
PDF
The Current And Future State Of Service Mesh
Ram Vennam
 
PDF
F5 Cloud Story
MarketingArrowECS_CZ
 
PPTX
onePK The Swiss Army Knife for Network Programming
Cisco DevNet
 
PDF
Communication Amongst Microservices: Kubernetes, Istio, and Spring Cloud with...
VMware Tanzu
 
Cilium - API-aware Networking and Security for Containers based on BPF
Thomas Graf
 
Cilium - Network security for microservices
Thomas Graf
 
F5 Meetup presentation automation 2017
Guy Brown
 
Shedding Light on LINE Token Economy You Won't Find in Our White Paper
LINE Corporation
 
Linux Native, HTTP Aware Network Security
Thomas Graf
 
Managing microservices with istio on OpenShift - Meetup
José Román Martín Gil
 
ContainerDays Hamburg 2023 — Cilium Workshop.pdf
Raphaël PINSON
 
Explore the World of Cilium, Tetragon & eBPF
Raphaël PINSON
 
Big datadc skyfall_preso_v2
abramsm
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Christian Posta
 
Make Java Microservices Resilient with Istio - Mangesh - IBM - CC18
CodeOps Technologies LLP
 
Cisco Automation with Puppet and onePK - PuppetConf 2013
Puppet
 
Microservices and containers networking: Contiv, an industry leading open sou...
Codemotion
 
Gatekeeper: API gateway
ChengHui Weng
 
Netflix: From Zero to Production-Ready in Minutes (QCon 2017)
Tim Bozarth
 
21st Docker Switzerland Meetup - ISTIO
Niklaus Hirt
 
The Current And Future State Of Service Mesh
Ram Vennam
 
F5 Cloud Story
MarketingArrowECS_CZ
 
onePK The Swiss Army Knife for Network Programming
Cisco DevNet
 
Communication Amongst Microservices: Kubernetes, Istio, and Spring Cloud with...
VMware Tanzu
 
Ad

More from Cynthia Thomas (9)

PDF
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
Cynthia Thomas
 
PDF
KubeCon NA'22 Lightning Talk: Where did all my IPs go?
Cynthia Thomas
 
PDF
Kernel advantages for Istio realized with Cilium
Cynthia Thomas
 
PDF
Cilium – Kernel Native Security & DDOS Mitigation for Microservices with BPF
Cynthia Thomas
 
PPTX
Secure Your Containers: What Network Admins Should Know When Moving Into Prod...
Cynthia Thomas
 
PDF
Midokura @ OpenStack Seattle
Cynthia Thomas
 
PDF
What's the deal with Neutron?
Cynthia Thomas
 
PDF
CloudKC: Evolution of Network Virtualization
Cynthia Thomas
 
PDF
From Nova-Network to Neutron and Beyond: A Look at OpenStack Networking
Cynthia Thomas
 
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
Cynthia Thomas
 
KubeCon NA'22 Lightning Talk: Where did all my IPs go?
Cynthia Thomas
 
Kernel advantages for Istio realized with Cilium
Cynthia Thomas
 
Cilium – Kernel Native Security & DDOS Mitigation for Microservices with BPF
Cynthia Thomas
 
Secure Your Containers: What Network Admins Should Know When Moving Into Prod...
Cynthia Thomas
 
Midokura @ OpenStack Seattle
Cynthia Thomas
 
What's the deal with Neutron?
Cynthia Thomas
 
CloudKC: Evolution of Network Virtualization
Cynthia Thomas
 
From Nova-Network to Neutron and Beyond: A Look at OpenStack Networking
Cynthia Thomas
 
Ad

Recently uploaded (20)

PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
PPTX
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PPTX
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 

Cilium:: Application-Aware Microservices via BPF