SlideShare a Scribd company logo
Content Access Control with 
Varnish Cache 
A quick look at some challenges & considerations 
Carlos Abalde, Roberto Moreda 
{cabalde,moreda}@allenta.com 
Stockholm, Varnish Summit 2014
Agenda 
๏ Our particular journey designing & deploying 
access control solutions based on Varnish Plus 
๏ Contents 
‣ Varnish Paywall 
‣ Challenges & considerations 
‣ Conclusions
Who are we? 
๏ Allenta Consulting 
‣ http://www.allenta.com 
๏ Varnish Software integration partner 
๏ Specialized in Varnish Paywall 
‣ Paywall projects running in Italy, Ireland & 
Argentina at the moment
Johann meets Varnish 
Paywall
Hello, I’m Johann!
Who’s Johann? 
๏ According to Wikipedia, Johann Carolus is the 
name of the publisher of the first newspaper 
๏ He’s also the hero of this presentation 
๏ Johann is yet another publisher worried for the 
decline of advertising revenue in on-line media 
‣ Evolution of traditional ad-based models? 
‣ Alternative tool for monetizing on-line contents?
Johann has a wish list 
๏ Transition to a subscription-based model 
‣ Flexible / extensible subscription model 
- Metered subscriptions 
- Partial subscriptions 
๏ Freemium model 
๏ Owned contents
… a huge wish list! 
๏ Separate Plug & Play component 
‣ Minimal changes to existing backend 
๏ Scalable & high performance solution 
‣ Do not degrade current UX 
๏ On-premises solution 
‣ Full control of the product
What’s VPW? 
๏ Part of Varnish Plus 
‣ Access control logic moved to the caching edge 
‣ Fast & flexible paid content delivery 
๏ Win-win toolkit solution 
‣ Powerful access control layer 
‣ Advanced caching technology
What’s really VPW? 
๏ Some VCL subroutines, a few general purpose 
OSS VMODs, and one access control specific 
VMOD 
๏ Optionally, 
‣ Some high performance storage 
‣ Some Varnish Custom Statistics counters 
‣ Some JavaScript assets
Beyond newspapers 
๏ VPW is not a traditional media specific product 
๏ VPW is about moving access control logic to the 
caching edge 
‣ Execute access control logic at Varnish speed 
‣ Improve hit ratio 
‣ Simplify backend logic
VPW is also for… 
๏ Alice, who’s running a trading site willing to 
distribute certain reports only to premium users 
๏ Bob, who has been asked to speed up a paid music 
streaming service 
๏ Emma, who’s running a slow site of stock images 
limited to 5 downloads per day per authenticated 
user 
๏ …
Johann meets Cosme
Who’s Cosme? 
๏ Cosme is an engineer working at Allenta 
๏ He has been working on access control solutions 
based on Varnish Plus for a few years 
๏ Cosme discusses with Johann some usual 
challenges & considerations when adding a 
paywall layer to an existing website 
‣ Anonymous metering, storage options, SEO…
Anonymous metering 
“Let’s do this NYT style” 
๏ “I don’t want the paywall to bother casual 
readers. Let’s do this NYT style. Only require 
authentication after 10 articles have been 
accessed during the current month” 
๏ “I’ve read the NYT paywall is breakable using a 
simple bookmarklet. Seriously?” 
๏ “What about using browser fingerprinting 
to identify anonymous users?”
Anonymous metering 
Metering cookies 
๏ Metering based on cookies is breakable 
‣ Is this a real issue from a business perspective? 
‣ Restrict contents eligible for anonymous access 
- Focus on user engaging 
๏ Cookie backups in local storage, DOM… 
- https://github.com/samyk/evercookie
Anonymous metering 
Browser fingerprinting 
๏ Server side metering 
‣ https://github.com/Valve/fingerprintjs 
๏ Not a real solution 
‣ Also easily breakable 
‣ Collisions 
- Mobile devices, cloned desktops…
Paywall state 
“Where is metering data stored?” 
๏ “Where is metering data stored?” 
๏ “Systems guys are asking about scalability of 
the storage layer keeping track of the state of 
the paywall. What about this?” 
๏ “And what about HA? What are the options 
here?”
Paywall state 
Memcached vs. Redis 
๏ Memcached 
‣ https://github.com/varnish/libvmod-memcached 
๏ Redis 
‣ https://github.com/carlosabalde/libvmod-redis 
‣ Persistence 
‣ Richer API & Power of LUA scripting
Paywall state 
Current scalability & HA options 
๏ Twemproxy 
‣ https://github.com/twitter/twemproxy 
‣ Light-weight sharding proxy for MC & Redis 
๏ Redis Sentinel 
‣ http://redis.io/topics/sentinel 
‣ Monitoring, notification & automatic failover
Paywall state 
Future scalability & HA options 
๏ Redis Cluster 
‣ http://redis.io/topics/cluster-tutorial 
‣ Automatic sharding & replication for Redis 
๏ Dynomite 
‣ https://github.com/Netflix/dynomite 
‣ Dynamo implementation for MC & Redis
SEO 
“Let Google bot access to all paywalled contents” 
๏ “Google bot should be able to index all contents 
in my site, both paywalled and not paywalled 
ones” 
๏ “Simply detect the bot checking the User Agent 
HTTP header, check the source IP address using 
the DNS VMOD, and let it access to all 
paywalled contents”
SEO 
Google’s First Click Free Policy for Web Search 
๏ Google penalices content cloaking 
๏ FCF requires that all users who click a Google 
search result should be allowed to see the full 
text of the content they are trying to access 
‣ That text must be identical to the content that was 
shown to Google bot on indexing time 
‣ Publishers are allowed to limit the number of 
accesses under the FCF policy to 5 accesses per 
user each day
SEO 
FCF implications 
๏ Users may get access even when their quotas are 
exhausted or they are even not authenticated 
๏ Breakable exclusion based on Referrer header 
‣ Well known issue of FT and other newspapers 
‣ What about teasers? 
- Same URL internally rewritten by Varnish 
- Not useful for freemium contents
And much more… 
๏ Access control exclusions 
๏ Fraud detection 
๏ Testing strategy 
๏ Paywall API & Agent 
๏ Usage statistics 
๏ …
Conclusions
Conclusions 
๏ VPW is a powerful paywalling toolkit 
‣ Flexibility 
‣ Access control logic running at Varnish speed 
๏ Win-win solution 
‣ Advanced caching technology 
‣ Powerful access control layer
Thanks!
Bonus slides
How does VPW work? 
๏ Custom HTTP headers 
‣ X-Pw-Access-Control… 
๏ API services 
‣ Authorization service… 
๏ Securely signed cookies 
๏ High performance storage
Exclusions 
“And now some exceptions” 
๏ “The IP ranges of these companies should 
completely bypass the paywall. We have some 
B2B agreements with them” 
๏ “The web views used by our official mobile apps 
should also bypass the paywall” 
๏ “Any click on paywalled contents linked in 
Facebook or Twitter should also bypass 
the paywall”
Exclusions 
Beware of fake HTTP headers 
๏ It’s completely reasonable to bypass the paywall 
logic based on: 
‣ A Varnish ACL 
‣ Some ad-hoc HTTP headers including a HMAC 
signature generated using a secret shared 
between Varnish and the mobile apps 
๏ Bypassing the paywall logic based on the HTTP 
referrer header is weak and should be carefully 
analyzed
Fraud detection 
“Sharing unmetered subscriptions” 
๏ “What if some user purchases an unmetered 
subscription and then shares his/her credentials 
with all his/her Facebook friends?” 
๏ “What if an office using a NAT proxy buy a single 
unmetered subscription to all the 
employees in the building?”
Fraud detection 
Rate limiting 
๏ You may be able to detect fraud in your user 
management component 
‣ Limit number / rate of sessions per user 
‣ Force extra validations / block users when a 
suspicious behavior is detected 
๏ Paywall may help if you are not able to do that 
‣ Redis sorted set restricting number of SIDs & IPs 
per user during some short time window

More Related Content

What's hot

Realtime with websockets
Realtime with websocketsRealtime with websockets
Realtime with websockets
ColdFusionConference
 
Herding cats managing ColdFusion servers with commandbox
Herding cats managing ColdFusion servers with commandboxHerding cats managing ColdFusion servers with commandbox
Herding cats managing ColdFusion servers with commandbox
ColdFusionConference
 
Altitude SF 2017: Logging at the edge
Altitude SF 2017: Logging at the edgeAltitude SF 2017: Logging at the edge
Altitude SF 2017: Logging at the edge
Fastly
 
Realtime with-websockets-2015
Realtime with-websockets-2015Realtime with-websockets-2015
Realtime with-websockets-2015
ColdFusionConference
 
Maximizing Performance with SPDY and SSL
Maximizing Performance with SPDY and SSLMaximizing Performance with SPDY and SSL
Maximizing Performance with SPDY and SSL
Zoompf
 
About Caching
About CachingAbout Caching
About Caching
Weng Wei
 
Introduction to WebSockets
Introduction to WebSocketsIntroduction to WebSockets
Introduction to WebSockets
Gunnar Hillert
 
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
PHP Conference Argentina
 
Optimizing website performance
Optimizing website performanceOptimizing website performance
Optimizing website performance
Publisto Ltd.
 
HTML5 WebSocket Introduction
HTML5 WebSocket IntroductionHTML5 WebSocket Introduction
HTML5 WebSocket Introduction
Marcelo Jabali
 
Steam Learn : Varnish or How to reduce the load of your web server
Steam Learn : Varnish or How to reduce the load of your web serverSteam Learn : Varnish or How to reduce the load of your web server
Steam Learn : Varnish or How to reduce the load of your web server
inovia
 
Securing your web infrastructure
Securing your web infrastructureSecuring your web infrastructure
Securing your web infrastructure
WP Engine
 
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)
Grant Norwood
 
vlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets Presentationvlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets Presentation
Volodymyr Lavrynovych
 
Automated Web App Performance Testing Using WebDriver
Automated Web App Performance Testing Using WebDriverAutomated Web App Performance Testing Using WebDriver
Automated Web App Performance Testing Using WebDriver
seleniumconf
 
Maximizing SPDY and SSL Performance (June 2014)
Maximizing SPDY and SSL Performance (June 2014)Maximizing SPDY and SSL Performance (June 2014)
Maximizing SPDY and SSL Performance (June 2014)
Zoompf
 
Microservices: Yes or not?
Microservices: Yes or not?Microservices: Yes or not?
Microservices: Yes or not?
Eduard Tomàs
 
Create scalable and failure safe cluster MagentoCommerce using cloud hosting ...
Create scalable and failure safe cluster MagentoCommerce using cloud hosting ...Create scalable and failure safe cluster MagentoCommerce using cloud hosting ...
Create scalable and failure safe cluster MagentoCommerce using cloud hosting ...
Neklo
 
Revisiting HTTP/2
Revisiting HTTP/2Revisiting HTTP/2
Revisiting HTTP/2
Fastly
 
Web performance testing with web driver
Web performance testing with web driverWeb performance testing with web driver
Web performance testing with web driver
Michael Klepikov
 

What's hot (20)

Realtime with websockets
Realtime with websocketsRealtime with websockets
Realtime with websockets
 
Herding cats managing ColdFusion servers with commandbox
Herding cats managing ColdFusion servers with commandboxHerding cats managing ColdFusion servers with commandbox
Herding cats managing ColdFusion servers with commandbox
 
Altitude SF 2017: Logging at the edge
Altitude SF 2017: Logging at the edgeAltitude SF 2017: Logging at the edge
Altitude SF 2017: Logging at the edge
 
Realtime with-websockets-2015
Realtime with-websockets-2015Realtime with-websockets-2015
Realtime with-websockets-2015
 
Maximizing Performance with SPDY and SSL
Maximizing Performance with SPDY and SSLMaximizing Performance with SPDY and SSL
Maximizing Performance with SPDY and SSL
 
About Caching
About CachingAbout Caching
About Caching
 
Introduction to WebSockets
Introduction to WebSocketsIntroduction to WebSockets
Introduction to WebSockets
 
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
2013 - Igor Sysoev - NGINx: origen, evolución y futuro - PHP Conference Argen...
 
Optimizing website performance
Optimizing website performanceOptimizing website performance
Optimizing website performance
 
HTML5 WebSocket Introduction
HTML5 WebSocket IntroductionHTML5 WebSocket Introduction
HTML5 WebSocket Introduction
 
Steam Learn : Varnish or How to reduce the load of your web server
Steam Learn : Varnish or How to reduce the load of your web serverSteam Learn : Varnish or How to reduce the load of your web server
Steam Learn : Varnish or How to reduce the load of your web server
 
Securing your web infrastructure
Securing your web infrastructureSecuring your web infrastructure
Securing your web infrastructure
 
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)
Cluster Fudge: Recipes for WordPress in the Cloud (WordCamp Austin 2014 Speaker)
 
vlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets Presentationvlavrynovych - WebSockets Presentation
vlavrynovych - WebSockets Presentation
 
Automated Web App Performance Testing Using WebDriver
Automated Web App Performance Testing Using WebDriverAutomated Web App Performance Testing Using WebDriver
Automated Web App Performance Testing Using WebDriver
 
Maximizing SPDY and SSL Performance (June 2014)
Maximizing SPDY and SSL Performance (June 2014)Maximizing SPDY and SSL Performance (June 2014)
Maximizing SPDY and SSL Performance (June 2014)
 
Microservices: Yes or not?
Microservices: Yes or not?Microservices: Yes or not?
Microservices: Yes or not?
 
Create scalable and failure safe cluster MagentoCommerce using cloud hosting ...
Create scalable and failure safe cluster MagentoCommerce using cloud hosting ...Create scalable and failure safe cluster MagentoCommerce using cloud hosting ...
Create scalable and failure safe cluster MagentoCommerce using cloud hosting ...
 
Revisiting HTTP/2
Revisiting HTTP/2Revisiting HTTP/2
Revisiting HTTP/2
 
Web performance testing with web driver
Web performance testing with web driverWeb performance testing with web driver
Web performance testing with web driver
 

Similar to Content Access Control with Varnish Cache

Six Steps to Build Successful APIs
Six Steps to Build Successful APIsSix Steps to Build Successful APIs
Six Steps to Build Successful APIs
WSO2
 
Six Steps To Build A Successful API
Six Steps To Build A Successful APISix Steps To Build A Successful API
Six Steps To Build A Successful API
Chris Haddad
 
Mobile for PHP developers
Mobile for PHP developersMobile for PHP developers
Mobile for PHP developers
Ivo Jansch
 
(For non-developers) HTML5: A richer web for everyone
(For non-developers) HTML5: A richer web for everyone(For non-developers) HTML5: A richer web for everyone
(For non-developers) HTML5: A richer web for everyone
Chris Mills
 
Optimizing content for the "mobile web"
Optimizing content for the "mobile web"Optimizing content for the "mobile web"
Optimizing content for the "mobile web"
Chris Mills
 
Stapling and patching the web of now - ForwardJS3, San Francisco
Stapling and patching the web of now - ForwardJS3, San FranciscoStapling and patching the web of now - ForwardJS3, San Francisco
Stapling and patching the web of now - ForwardJS3, San Francisco
Christian Heilmann
 
vue-storefront - PWA eCommerce for Magento2 MM17NYC presentation
vue-storefront - PWA eCommerce for Magento2 MM17NYC presentationvue-storefront - PWA eCommerce for Magento2 MM17NYC presentation
vue-storefront - PWA eCommerce for Magento2 MM17NYC presentation
Divante
 
Using WooCommerce to Scale Your Store
Using WooCommerce to Scale Your StoreUsing WooCommerce to Scale Your Store
Using WooCommerce to Scale Your Store
WP Engine
 
Ecommerce Solutions (China & West)
Ecommerce Solutions (China & West)Ecommerce Solutions (China & West)
Ecommerce Solutions (China & West)
Reach China Holdings Limited
 
3-18-11
3-18-113-18-11
3-18-11
MDuckinson
 
Online ecommerce website srs
Online ecommerce  website srsOnline ecommerce  website srs
Online ecommerce website srs
SM Nurnobi
 
Validating Session Isolation for Web Crawling to Provide Data Integrity
Validating Session Isolation for Web Crawling to Provide Data IntegrityValidating Session Isolation for Web Crawling to Provide Data Integrity
Validating Session Isolation for Web Crawling to Provide Data Integrity
Giacomo Zecchini
 
Building A Relevancy Engine Using MongoDB and Go
Building A Relevancy Engine Using MongoDB and GoBuilding A Relevancy Engine Using MongoDB and Go
Building A Relevancy Engine Using MongoDB and Go
ardan-bkennedy
 
Making Blockchain Real for Business at the "z Systems Agile Enterprise Develo...
Making Blockchain Real for Business at the "z Systems Agile Enterprise Develo...Making Blockchain Real for Business at the "z Systems Agile Enterprise Develo...
Making Blockchain Real for Business at the "z Systems Agile Enterprise Develo...
DevOps for Enterprise Systems
 
SOA Knowledge Kit, Developer Productivity and Performance Comparison Analysis
SOA Knowledge Kit, Developer Productivity  and Performance Comparison AnalysisSOA Knowledge Kit, Developer Productivity  and Performance Comparison Analysis
SOA Knowledge Kit, Developer Productivity and Performance Comparison Analysis
Clever Moe
 
Introducing The WSO2 Platform
Introducing The WSO2 Platform Introducing The WSO2 Platform
Introducing The WSO2 Platform
WSO2
 
Plesk WP Toolkit - Growing Together @Cloudfest 2022
Plesk WP Toolkit - Growing Together @Cloudfest 2022Plesk WP Toolkit - Growing Together @Cloudfest 2022
Plesk WP Toolkit - Growing Together @Cloudfest 2022
Plesk
 
Choosing the Right E-commerce Solution
Choosing the Right E-commerce SolutionChoosing the Right E-commerce Solution
Choosing the Right E-commerce Solution
Dr Matt McDougall
 
Qworum: Making the Web more suitable for applications
Qworum: Making the Web more suitable for applicationsQworum: Making the Web more suitable for applications
Qworum: Making the Web more suitable for applications
dogarma
 
Mobile Web High Performance
Mobile Web High PerformanceMobile Web High Performance
Mobile Web High Performance
Amjad Rafique
 

Similar to Content Access Control with Varnish Cache (20)

Six Steps to Build Successful APIs
Six Steps to Build Successful APIsSix Steps to Build Successful APIs
Six Steps to Build Successful APIs
 
Six Steps To Build A Successful API
Six Steps To Build A Successful APISix Steps To Build A Successful API
Six Steps To Build A Successful API
 
Mobile for PHP developers
Mobile for PHP developersMobile for PHP developers
Mobile for PHP developers
 
(For non-developers) HTML5: A richer web for everyone
(For non-developers) HTML5: A richer web for everyone(For non-developers) HTML5: A richer web for everyone
(For non-developers) HTML5: A richer web for everyone
 
Optimizing content for the "mobile web"
Optimizing content for the "mobile web"Optimizing content for the "mobile web"
Optimizing content for the "mobile web"
 
Stapling and patching the web of now - ForwardJS3, San Francisco
Stapling and patching the web of now - ForwardJS3, San FranciscoStapling and patching the web of now - ForwardJS3, San Francisco
Stapling and patching the web of now - ForwardJS3, San Francisco
 
vue-storefront - PWA eCommerce for Magento2 MM17NYC presentation
vue-storefront - PWA eCommerce for Magento2 MM17NYC presentationvue-storefront - PWA eCommerce for Magento2 MM17NYC presentation
vue-storefront - PWA eCommerce for Magento2 MM17NYC presentation
 
Using WooCommerce to Scale Your Store
Using WooCommerce to Scale Your StoreUsing WooCommerce to Scale Your Store
Using WooCommerce to Scale Your Store
 
Ecommerce Solutions (China & West)
Ecommerce Solutions (China & West)Ecommerce Solutions (China & West)
Ecommerce Solutions (China & West)
 
3-18-11
3-18-113-18-11
3-18-11
 
Online ecommerce website srs
Online ecommerce  website srsOnline ecommerce  website srs
Online ecommerce website srs
 
Validating Session Isolation for Web Crawling to Provide Data Integrity
Validating Session Isolation for Web Crawling to Provide Data IntegrityValidating Session Isolation for Web Crawling to Provide Data Integrity
Validating Session Isolation for Web Crawling to Provide Data Integrity
 
Building A Relevancy Engine Using MongoDB and Go
Building A Relevancy Engine Using MongoDB and GoBuilding A Relevancy Engine Using MongoDB and Go
Building A Relevancy Engine Using MongoDB and Go
 
Making Blockchain Real for Business at the "z Systems Agile Enterprise Develo...
Making Blockchain Real for Business at the "z Systems Agile Enterprise Develo...Making Blockchain Real for Business at the "z Systems Agile Enterprise Develo...
Making Blockchain Real for Business at the "z Systems Agile Enterprise Develo...
 
SOA Knowledge Kit, Developer Productivity and Performance Comparison Analysis
SOA Knowledge Kit, Developer Productivity  and Performance Comparison AnalysisSOA Knowledge Kit, Developer Productivity  and Performance Comparison Analysis
SOA Knowledge Kit, Developer Productivity and Performance Comparison Analysis
 
Introducing The WSO2 Platform
Introducing The WSO2 Platform Introducing The WSO2 Platform
Introducing The WSO2 Platform
 
Plesk WP Toolkit - Growing Together @Cloudfest 2022
Plesk WP Toolkit - Growing Together @Cloudfest 2022Plesk WP Toolkit - Growing Together @Cloudfest 2022
Plesk WP Toolkit - Growing Together @Cloudfest 2022
 
Choosing the Right E-commerce Solution
Choosing the Right E-commerce SolutionChoosing the Right E-commerce Solution
Choosing the Right E-commerce Solution
 
Qworum: Making the Web more suitable for applications
Qworum: Making the Web more suitable for applicationsQworum: Making the Web more suitable for applications
Qworum: Making the Web more suitable for applications
 
Mobile Web High Performance
Mobile Web High PerformanceMobile Web High Performance
Mobile Web High Performance
 

Recently uploaded

HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
Ajin Abraham
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Neo4j
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
Neo4j
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 

Recently uploaded (20)

HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 

Content Access Control with Varnish Cache

  • 1. Content Access Control with Varnish Cache A quick look at some challenges & considerations Carlos Abalde, Roberto Moreda {cabalde,moreda}@allenta.com Stockholm, Varnish Summit 2014
  • 2. Agenda ๏ Our particular journey designing & deploying access control solutions based on Varnish Plus ๏ Contents ‣ Varnish Paywall ‣ Challenges & considerations ‣ Conclusions
  • 3. Who are we? ๏ Allenta Consulting ‣ http://www.allenta.com ๏ Varnish Software integration partner ๏ Specialized in Varnish Paywall ‣ Paywall projects running in Italy, Ireland & Argentina at the moment
  • 4.
  • 7. Who’s Johann? ๏ According to Wikipedia, Johann Carolus is the name of the publisher of the first newspaper ๏ He’s also the hero of this presentation ๏ Johann is yet another publisher worried for the decline of advertising revenue in on-line media ‣ Evolution of traditional ad-based models? ‣ Alternative tool for monetizing on-line contents?
  • 8. Johann has a wish list ๏ Transition to a subscription-based model ‣ Flexible / extensible subscription model - Metered subscriptions - Partial subscriptions ๏ Freemium model ๏ Owned contents
  • 9. … a huge wish list! ๏ Separate Plug & Play component ‣ Minimal changes to existing backend ๏ Scalable & high performance solution ‣ Do not degrade current UX ๏ On-premises solution ‣ Full control of the product
  • 10.
  • 11.
  • 12. What’s VPW? ๏ Part of Varnish Plus ‣ Access control logic moved to the caching edge ‣ Fast & flexible paid content delivery ๏ Win-win toolkit solution ‣ Powerful access control layer ‣ Advanced caching technology
  • 13. What’s really VPW? ๏ Some VCL subroutines, a few general purpose OSS VMODs, and one access control specific VMOD ๏ Optionally, ‣ Some high performance storage ‣ Some Varnish Custom Statistics counters ‣ Some JavaScript assets
  • 14.
  • 15. Beyond newspapers ๏ VPW is not a traditional media specific product ๏ VPW is about moving access control logic to the caching edge ‣ Execute access control logic at Varnish speed ‣ Improve hit ratio ‣ Simplify backend logic
  • 16. VPW is also for… ๏ Alice, who’s running a trading site willing to distribute certain reports only to premium users ๏ Bob, who has been asked to speed up a paid music streaming service ๏ Emma, who’s running a slow site of stock images limited to 5 downloads per day per authenticated user ๏ …
  • 17.
  • 19. Who’s Cosme? ๏ Cosme is an engineer working at Allenta ๏ He has been working on access control solutions based on Varnish Plus for a few years ๏ Cosme discusses with Johann some usual challenges & considerations when adding a paywall layer to an existing website ‣ Anonymous metering, storage options, SEO…
  • 20. Anonymous metering “Let’s do this NYT style” ๏ “I don’t want the paywall to bother casual readers. Let’s do this NYT style. Only require authentication after 10 articles have been accessed during the current month” ๏ “I’ve read the NYT paywall is breakable using a simple bookmarklet. Seriously?” ๏ “What about using browser fingerprinting to identify anonymous users?”
  • 21. Anonymous metering Metering cookies ๏ Metering based on cookies is breakable ‣ Is this a real issue from a business perspective? ‣ Restrict contents eligible for anonymous access - Focus on user engaging ๏ Cookie backups in local storage, DOM… - https://github.com/samyk/evercookie
  • 22. Anonymous metering Browser fingerprinting ๏ Server side metering ‣ https://github.com/Valve/fingerprintjs ๏ Not a real solution ‣ Also easily breakable ‣ Collisions - Mobile devices, cloned desktops…
  • 23. Paywall state “Where is metering data stored?” ๏ “Where is metering data stored?” ๏ “Systems guys are asking about scalability of the storage layer keeping track of the state of the paywall. What about this?” ๏ “And what about HA? What are the options here?”
  • 24. Paywall state Memcached vs. Redis ๏ Memcached ‣ https://github.com/varnish/libvmod-memcached ๏ Redis ‣ https://github.com/carlosabalde/libvmod-redis ‣ Persistence ‣ Richer API & Power of LUA scripting
  • 25. Paywall state Current scalability & HA options ๏ Twemproxy ‣ https://github.com/twitter/twemproxy ‣ Light-weight sharding proxy for MC & Redis ๏ Redis Sentinel ‣ http://redis.io/topics/sentinel ‣ Monitoring, notification & automatic failover
  • 26. Paywall state Future scalability & HA options ๏ Redis Cluster ‣ http://redis.io/topics/cluster-tutorial ‣ Automatic sharding & replication for Redis ๏ Dynomite ‣ https://github.com/Netflix/dynomite ‣ Dynamo implementation for MC & Redis
  • 27. SEO “Let Google bot access to all paywalled contents” ๏ “Google bot should be able to index all contents in my site, both paywalled and not paywalled ones” ๏ “Simply detect the bot checking the User Agent HTTP header, check the source IP address using the DNS VMOD, and let it access to all paywalled contents”
  • 28. SEO Google’s First Click Free Policy for Web Search ๏ Google penalices content cloaking ๏ FCF requires that all users who click a Google search result should be allowed to see the full text of the content they are trying to access ‣ That text must be identical to the content that was shown to Google bot on indexing time ‣ Publishers are allowed to limit the number of accesses under the FCF policy to 5 accesses per user each day
  • 29. SEO FCF implications ๏ Users may get access even when their quotas are exhausted or they are even not authenticated ๏ Breakable exclusion based on Referrer header ‣ Well known issue of FT and other newspapers ‣ What about teasers? - Same URL internally rewritten by Varnish - Not useful for freemium contents
  • 30. And much more… ๏ Access control exclusions ๏ Fraud detection ๏ Testing strategy ๏ Paywall API & Agent ๏ Usage statistics ๏ …
  • 32. Conclusions ๏ VPW is a powerful paywalling toolkit ‣ Flexibility ‣ Access control logic running at Varnish speed ๏ Win-win solution ‣ Advanced caching technology ‣ Powerful access control layer
  • 35. How does VPW work? ๏ Custom HTTP headers ‣ X-Pw-Access-Control… ๏ API services ‣ Authorization service… ๏ Securely signed cookies ๏ High performance storage
  • 36. Exclusions “And now some exceptions” ๏ “The IP ranges of these companies should completely bypass the paywall. We have some B2B agreements with them” ๏ “The web views used by our official mobile apps should also bypass the paywall” ๏ “Any click on paywalled contents linked in Facebook or Twitter should also bypass the paywall”
  • 37. Exclusions Beware of fake HTTP headers ๏ It’s completely reasonable to bypass the paywall logic based on: ‣ A Varnish ACL ‣ Some ad-hoc HTTP headers including a HMAC signature generated using a secret shared between Varnish and the mobile apps ๏ Bypassing the paywall logic based on the HTTP referrer header is weak and should be carefully analyzed
  • 38. Fraud detection “Sharing unmetered subscriptions” ๏ “What if some user purchases an unmetered subscription and then shares his/her credentials with all his/her Facebook friends?” ๏ “What if an office using a NAT proxy buy a single unmetered subscription to all the employees in the building?”
  • 39. Fraud detection Rate limiting ๏ You may be able to detect fraud in your user management component ‣ Limit number / rate of sessions per user ‣ Force extra validations / block users when a suspicious behavior is detected ๏ Paywall may help if you are not able to do that ‣ Redis sorted set restricting number of SIDs & IPs per user during some short time window