Access control
ACCESS
CONTROL
AGENDA
! IP-based
! Basic auth
! Cookie access control
! Optimal solution
IP-based
# Who is allowed to purge
acl local {
“localhost”;
“192.168.1.0”/24; /* and everyone on the local network */
! “192.168.1.23”; /* except for the dialin router */
}
sub vcl_recv {
if (req.method == “PURGE”) {
if (client.ip ~ local) {
return(purge);
} else {
return(synth(403, “Access denied”));
}
}
}
BASIC
AUTH
! Not really used
! There is a VMOD for that
Cookie
Access
Control
! Generate random cookie
! Issue a cookie to a client
! Authenticate the user that has that cookie
! The cookie can be signed
sub vcl_recv {
unset req.http.authstatus;
if (req.http.signature) {
set req.http.sig-verf = digest.hmac_sha256("key", "The quick brown fox
jumps over the lazy dog");
if (req.http.sig-verf == req.http.signature) {
set req.http.authstatus = "ok";
}
}
if (req.http.authstatus == "ok") {
return(synth(200, "ok"));
} else {
return(synth(401, "not ok"));
}
}
DEMO
“Sharing cookie
formats across
services is bad”
BEST OF BOTH WORLDS
! Login-service does auth and issues cookie
! Varnish verifies cookie against API
! Varnish issues its own cookies to track state
ARCHITECTURE
Varnish auth tool kit
Aka
VARNISH PAYWALL
KEY DESIGN DECISIONS
! Access control is either metered or subscription based
! Products IDs - different subscription offerings
! Article IDs - unique article ID for metering
! Auth through cookie and API
HOW IS IT BUILT?
! Digest VMOD - Crypto
! Header VMOD - Managing multiple header w/same name
! Variable VMOD - configuration and state
! Paywall VMOD - misc
! Opt. Memcached VMOD - store quota data in Memcached
BACKEND HEADER
! X-Access-Control: subscription, metered
! X-Aid: 1234
! X-Auth-Failed: /login.html
! X-Pids: 23, 55
AUTH SERVER INTERFACE
! Input: vpw_id (cookie from SSO)
! VPW-Allowed-Pids: 75, 23
! VPW-TTL: 30
LOGGED-IN USER
LOGGED-IN USER
STEP 1
STEP 2
STEP 2
STEP 3
STEP 3
STEP 4
ANONYMOUS USER REQUESTS METERED PAGE
STEP 1-2
2
STEP 1-2
STEP 3
STEP 3
STEP 4
4
STEP 4
STEP 5
4
STEP 5
STEP 6
STEP 6
Q&A
Thanks :)

More Related Content

TXT
Nan meno c2
PDF
Unidade3 roteiro proxy
PPTX
如何利用 Docker 強化網站安全
PDF
SSH: Seguranca no Acesso Remoto
PDF
窺探職場上所需之資安專業技術與能力 Tdohconf
PDF
PFIセミナー資料 H27.10.22
PDF
What's up, RabbitMQ?
PDF
NEO Smartcontract Programing with Python
Nan meno c2
Unidade3 roteiro proxy
如何利用 Docker 強化網站安全
SSH: Seguranca no Acesso Remoto
窺探職場上所需之資安專業技術與能力 Tdohconf
PFIセミナー資料 H27.10.22
What's up, RabbitMQ?
NEO Smartcontract Programing with Python

What's hot (15)

PPTX
Город никогда не спит / The City Never Sleeps
PDF
Fail2ban - the system security for green hand -on linux os
PDF
Ищем уязвимости нулевого дня в ядре Linux
PDF
Nginx+tomcat https 配置
PDF
Linux 系統管理與安全:系統防駭與資訊安全
PPTX
Cryptography 101 for Java developers
PDF
Killing any security product … using a Mimikatz undocumented feature
PDF
Honeypots: Visão Geral
ODP
Mule ESB : ssh connector
PDF
Relayd: a load balancer for OpenBSD
PDF
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
PDF
Reverse engineering Swisscom's Centro Grande Modem
PPTX
Configuring ssh on switch
PDF
Vm ware fuzzing - defcon russia 20
PDF
Linux 系統管理與安全:基本 Linux 系統知識
Город никогда не спит / The City Never Sleeps
Fail2ban - the system security for green hand -on linux os
Ищем уязвимости нулевого дня в ядре Linux
Nginx+tomcat https 配置
Linux 系統管理與安全:系統防駭與資訊安全
Cryptography 101 for Java developers
Killing any security product … using a Mimikatz undocumented feature
Honeypots: Visão Geral
Mule ESB : ssh connector
Relayd: a load balancer for OpenBSD
Linux 系統管理與安全:進階系統管理系統防駭與資訊安全
Reverse engineering Swisscom's Centro Grande Modem
Configuring ssh on switch
Vm ware fuzzing - defcon russia 20
Linux 系統管理與安全:基本 Linux 系統知識
Ad

Viewers also liked (20)

DOCX
Secretarias, la mano derecha del poder.
PPTX
Debugging varnish
PPTX
Varnish TLS
PDF
VCL - the logic and logistics
PDF
A Novel Algorithm for Acoustic and Visual Classifiers Decision Fusion in Audi...
PDF
SCOPE Certificate
PDF
Lightning fast with Varnish
PDF
E-commerce use case
PDF
Varnish cache en ocho pasos
PDF
3582_0001
PDF
De idea a implementación con Varnish Plus
PPTX
PDF
انظمه التحكم ف الابواب
PPTX
Նոր Տարին և Սուրբ Ծնունդը Ընտանիքով
PDF
De idea a implementación con Varnish Plus
PDF
VCL - the logic and logistics
PDF
Multi skilling Electriacl
PDF
Using PatSeer to search and analyze patents in Switchgear Technology
PDF
Secure content caching
Secretarias, la mano derecha del poder.
Debugging varnish
Varnish TLS
VCL - the logic and logistics
A Novel Algorithm for Acoustic and Visual Classifiers Decision Fusion in Audi...
SCOPE Certificate
Lightning fast with Varnish
E-commerce use case
Varnish cache en ocho pasos
3582_0001
De idea a implementación con Varnish Plus
انظمه التحكم ف الابواب
Նոր Տարին և Սուրբ Ծնունդը Ընտանիքով
De idea a implementación con Varnish Plus
VCL - the logic and logistics
Multi skilling Electriacl
Using PatSeer to search and analyze patents in Switchgear Technology
Secure content caching
Ad

Similar to Access control (11)

PDF
Varnish access control
PDF
Growing HashiCorp Vault at Hootsuite
PDF
One Port to Serve Them All - Google GCP Cloud Shell Abuse
PDF
FIWARE Wednesday Webinars - How to Secure IoT Devices
PPTX
Drive chrome(headless) with puppeteer
PDF
Przemysław Iwanek - ABC AWS, budowanie infrastruktury przy pomocy Terraform
PDF
Azure VM base images with Packer, Ansble and Vagrant
PDF
DrupalCamp London 2017 - Web site insecurity
PDF
They Ought to Know Better: Exploiting Security Gateways via Their Web Interfaces
PDF
Mobile Programming - Network Universitas Budi Luhur
PDF
PHP Backdoor: The rise of the vuln
Varnish access control
Growing HashiCorp Vault at Hootsuite
One Port to Serve Them All - Google GCP Cloud Shell Abuse
FIWARE Wednesday Webinars - How to Secure IoT Devices
Drive chrome(headless) with puppeteer
Przemysław Iwanek - ABC AWS, budowanie infrastruktury przy pomocy Terraform
Azure VM base images with Packer, Ansble and Vagrant
DrupalCamp London 2017 - Web site insecurity
They Ought to Know Better: Exploiting Security Gateways via Their Web Interfaces
Mobile Programming - Network Universitas Budi Luhur
PHP Backdoor: The rise of the vuln

More from Varnish Software (20)

PDF
Ask Me Anything on authentication & authorisation in Varnish
PDF
Boozt.com Use Case
PPTX
Akamai connector for varnish
PPTX
Varnish High Availability
PDF
PostNord: Copy On Write
PPTX
Varnish extend
PDF
Streaming with Varnish
PPTX
Edgestash
PPTX
What is new in varnish plus
PDF
Varnish Extend demo
PDF
Varnish extend introduction
PDF
Cedexis introduction
PDF
Microservices
PDF
Varnishtest
PDF
Varnish plus con paywall avanzado en la voz de galicia
PDF
Detalles técnicos e impacto de negocio de varnish plus
PDF
Debugging forensics
PDF
SFR use case
PDF
Kering use case
PDF
Handelsbanken use case
Ask Me Anything on authentication & authorisation in Varnish
Boozt.com Use Case
Akamai connector for varnish
Varnish High Availability
PostNord: Copy On Write
Varnish extend
Streaming with Varnish
Edgestash
What is new in varnish plus
Varnish Extend demo
Varnish extend introduction
Cedexis introduction
Microservices
Varnishtest
Varnish plus con paywall avanzado en la voz de galicia
Detalles técnicos e impacto de negocio de varnish plus
Debugging forensics
SFR use case
Kering use case
Handelsbanken use case

Recently uploaded (20)

PPTX
Tartificialntelligence_presentation.pptx
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
Hybrid model detection and classification of lung cancer
PDF
STKI Israel Market Study 2025 version august
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PDF
Getting Started with Data Integration: FME Form 101
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PDF
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
WOOl fibre morphology and structure.pdf for textiles
PPTX
Chapter 5: Probability Theory and Statistics
PDF
CloudStack 4.21: First Look Webinar slides
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
Architecture types and enterprise applications.pdf
PDF
1 - Historical Antecedents, Social Consideration.pdf
Tartificialntelligence_presentation.pptx
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
Enhancing emotion recognition model for a student engagement use case through...
Hybrid model detection and classification of lung cancer
STKI Israel Market Study 2025 version august
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
Getting Started with Data Integration: FME Form 101
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
A Late Bloomer's Guide to GenAI: Ethics, Bias, and Effective Prompting - Boha...
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
observCloud-Native Containerability and monitoring.pptx
Zenith AI: Advanced Artificial Intelligence
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
WOOl fibre morphology and structure.pdf for textiles
Chapter 5: Probability Theory and Statistics
CloudStack 4.21: First Look Webinar slides
NewMind AI Weekly Chronicles – August ’25 Week III
Architecture types and enterprise applications.pdf
1 - Historical Antecedents, Social Consideration.pdf

Access control