SlideShare a Scribd company logo
Protecting Applications
with Lambda@Edge
Allan Denot
➔ 5 years working as DevOps and AWS
➔ Senior DevOps Engineer at amaysim
➔ Master in IT from University of Sydney
➔ Former Ansible “expert”
➔ Currently doing Docker, ECS, CI/CD and Serverless
@denot allandenot.com
Protecting Applications with Lambda@Edge and OAuth
Problem #1
Environment Consistency (or lack thereof)
Environment Consistency (or lack thereof)
Engineer
Before
Internal VPC
Dev QA
VPN
Stakeholders? Mobile? Architecture not consistent with Production
Internal VPC
Environment Consistency (or lack thereof)
CloudFront
Dev QA
VPN
Production
CloudFrontCloudFrontCan’t be exposed to public
Environment Consistency
Solution #1
Internal VPC
CloudFront
Dev QA
VPN
Production
CloudFrontCloudFront
with Lambda with Lambda
Problem #2
(caused by Solution #1)
Protecting API Endpoints
Protected API Endpoints
Internal VPC
QA
CloudFront
with Lambda
API call
302 Redirect to OAuth
Automate
d test
client
Automate
d test
client
Protected API Endpoints
Requirements
➔ Protected from public
➔ Can’t use API Tokens or header authentication
- keep consistency with production
➔ Known sources should have direct access
Solution #2
Protected API Endpoints
Internal VPC
QA
CloudFront
with Lambda
API call
200 OK
Automate
d test
client
Dynamo
DB
Automate
d test
client
How it works
302 Redirect to OAuth Endpoint
Request CALLBACK_URL with client code
200 Allow and set cookie
Stores IP
302 Redirect to CALLBACK_URL with client code
Request Webpage
Flow
Client
CloudFront
Labda@Edge
OAuth Provider
Client Authenticates with OAuth Provider
Can include
multiple
interactions
Checks code is valid
Dynamo
DB
Dynamo
DBIP Exists?
Demo
Questions?
Links
github.com/amaysim-au/cloudfront-auth-whitelist
branches: github and azure
Original code: github.com/Widen/cloudfront-auth

More Related Content

PDF
LFX Nov 16, 2021 - Find vulnerabilities before security knocks on your door
PDF
use case ibm k8s_service+devops
PPTX
Continous Delivery and Continous Integration at IKERLAN
PDF
NYIT DSC/ Spring 2021 - Introduction to DevOps (CI/CD)
PDF
Reactive Microservices with Quarkus
PDF
Batten Down the Hatches: A Practical Guide to Securing Kubernetes - RMISC 2019
PDF
The Future of Security and Productivity in Our Newly Remote World
PDF
Securing containers by Breaking In - Liran Tal - DevSecCon Tel Aviv 2019
LFX Nov 16, 2021 - Find vulnerabilities before security knocks on your door
use case ibm k8s_service+devops
Continous Delivery and Continous Integration at IKERLAN
NYIT DSC/ Spring 2021 - Introduction to DevOps (CI/CD)
Reactive Microservices with Quarkus
Batten Down the Hatches: A Practical Guide to Securing Kubernetes - RMISC 2019
The Future of Security and Productivity in Our Newly Remote World
Securing containers by Breaking In - Liran Tal - DevSecCon Tel Aviv 2019

What's hot (20)

PDF
Bridging the Security Testing Gap in Your CI/CD Pipeline
PDF
Security in CI/CD Pipelines: Tips for DevOps Engineers
PDF
GitLab Commit: Enhance your Compliance with Policy-Based CI/CD
PDF
Visual Recognition with Anki Cozmo and TensorFlow
PDF
Sec4dev 2021 - Catch Me If You can : Continuous Delivery vs. Security Assurance
PPTX
Enterprise level cloud CI
PDF
Jakarta Tech Talk: How to develop your first cloud-native Application with Java
PDF
Discovering and Fixing Dependency Vulnerabilities for Kubernetes apps with Sn...
PDF
You Want to Kubernetes? You MUST Know Containers!
PPTX
DevSecCon Tel Aviv 2018 - End2End containers SSDLC by Vitaly Davidoff
PPTX
Test coverage development
PPTX
Deploy multi-environment application with Azure DevOps
PPTX
Software Composition Analysis Deep Dive
PDF
PDF
Node.js Security Done Right - Tips and Tricks They Won't Teach You In School
PDF
Emulators as an Emerging Best Practice for API Providers
PPTX
DevSecCon Boston2018 - advanced mobile security automation with bdd
PDF
Continuous Integration from server to cloud
PPTX
Continuous Security Testing with Devops - OWASP EU 2014
PDF
Developing Serverless Applications with Apache OpenWhisk
Bridging the Security Testing Gap in Your CI/CD Pipeline
Security in CI/CD Pipelines: Tips for DevOps Engineers
GitLab Commit: Enhance your Compliance with Policy-Based CI/CD
Visual Recognition with Anki Cozmo and TensorFlow
Sec4dev 2021 - Catch Me If You can : Continuous Delivery vs. Security Assurance
Enterprise level cloud CI
Jakarta Tech Talk: How to develop your first cloud-native Application with Java
Discovering and Fixing Dependency Vulnerabilities for Kubernetes apps with Sn...
You Want to Kubernetes? You MUST Know Containers!
DevSecCon Tel Aviv 2018 - End2End containers SSDLC by Vitaly Davidoff
Test coverage development
Deploy multi-environment application with Azure DevOps
Software Composition Analysis Deep Dive
Node.js Security Done Right - Tips and Tricks They Won't Teach You In School
Emulators as an Emerging Best Practice for API Providers
DevSecCon Boston2018 - advanced mobile security automation with bdd
Continuous Integration from server to cloud
Continuous Security Testing with Devops - OWASP EU 2014
Developing Serverless Applications with Apache OpenWhisk
Ad

Similar to Protecting Applications with Lambda@Edge and OAuth (6)

PDF
Basic authentication with lambda@edge, Juho Rautio, Webscale Oy
PDF
Securing Serverless Architectures - AWS Serverless Web Day
PPTX
AWS Lambda Security Inside & Out
PDF
Serverless security: defense against the dark arts
PDF
Serverless Security: A How-to Guide @ SnowFROC 2019
PDF
Serverless security: defence against the dark arts
Basic authentication with lambda@edge, Juho Rautio, Webscale Oy
Securing Serverless Architectures - AWS Serverless Web Day
AWS Lambda Security Inside & Out
Serverless security: defense against the dark arts
Serverless Security: A How-to Guide @ SnowFROC 2019
Serverless security: defence against the dark arts
Ad

Recently uploaded (20)

PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPT
Teaching material agriculture food technology
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Cloud computing and distributed systems.
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Machine Learning_overview_presentation.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
Diabetes mellitus diagnosis method based random forest with bat algorithm
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Big Data Technologies - Introduction.pptx
Spectral efficient network and resource selection model in 5G networks
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Teaching material agriculture food technology
NewMind AI Weekly Chronicles - August'25-Week II
Review of recent advances in non-invasive hemoglobin estimation
Cloud computing and distributed systems.
Spectroscopy.pptx food analysis technology
Digital-Transformation-Roadmap-for-Companies.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Machine Learning_overview_presentation.pptx
MIND Revenue Release Quarter 2 2025 Press Release
Reach Out and Touch Someone: Haptics and Empathic Computing
Chapter 3 Spatial Domain Image Processing.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Approach and Philosophy of On baking technology
Assigned Numbers - 2025 - Bluetooth® Document
The Rise and Fall of 3GPP – Time for a Sabbatical?

Protecting Applications with Lambda@Edge and OAuth