SlideShare a Scribd company logo
1 of 40
Download to read offline
Applications and Deployment Patterns of
OAuth and OpenID Connect
Kavindu Dodanduwa
Senior Software Engineer - WSO2
▪ OAuth 2.0 and OpenID Connect ?
▪ Must known things
▪ Patterns
▪ Q&A
Agenda
2
Theory Practice
Technology
▪ Typical systems with built in login dialog
▪ Maintain its own identities
A decade ago ~ 200X
3
Username :
Password :
Login Cancel
Still used ? YES !
4
https://github.com/docker/docker.github.io/issues/6910
Samples
5
▪ HTTP - Hypertext Transfer Protocol
▪ Defined through RFC7230 - IETF
Specifications
6
▪ OAuth working group - OAuth 2.0
▪ OpenID Foundation - OpenID Connect
▪ Motivation - Do things better
▪ Specifications - How to do better
Checklist
7
▪ Two different concepts
▪ Authentication - Identify true identity
▪ Authorization - Validate permissions/rights
AuthN and AuthZ
8
AuthN and AuthZ
Bob Alice
▪ OAuth 2.0 - RFC6749
▪ For authorization - Access delegation
OAuth 2.0 and OpenID Connect
10
▪ OpenID Connect
▪ End user authentication, built on OAuth 2.0
Overview
11
1
2
3
▪ Access delegation
▪ Basic authentication (RFC7617) vs Tokens (RFC6750)
Tokens
12
Authorization : Basic Base64(username:password)
Authorization : Bearer JkP76NNv_sd
▪ Revocable & short life-span
▪ Integrations
▪ Unique login experience
▪ Reduce complexity
Why adopt ?
13
▪ AuthN & AuthZ - General concepts
▪ OAuth 2.0 & OpenID Connect - Specifications
▪ How does it works ? - “Simple as completing few API calls”
▪ Tokens - They have advantage over other mechanisms
Checklist
14
Revise
15
User Client Authorization server Resource Server
Generic flow
16
Username :
Password :
Login Cancel
1
2
3
4 5
6
▪ Authorization code grant - Official name
▪ Require a user agent - a browser
▪ Browser redirects + backend call
Generic flow
17
Public client
18
▪ Public - General availability to customers, users
▪ B2B or B2C
“Such clients cannot protect an embedded secret”[1]
▪ Thus require extra protection when obtaining token!
▪ Avoid access token stealing by other applications
▪ To consume a common APIs/resources - ex: product suite
▪ Identity management
Public client - why OAuth ?
19
▪ Original request contains a hashed secret
▪ Authorization server stores it (against code issue for second step)
▪ Token request contains secret with hash method
PKCE - Proof Key for Code Exchange (RFC7636)
20
Public client - PKCE
21
Username :
Password :
Login Cancel
1
2
3
4 5
6
▪ An application which has a front end and a backend
▪ JSP, PHP or ASP are few examples
Web application
22
“Having a backend allows them to securely store secrets”
▪ Usually can store client secrets, tokens securely in a backend
▪ PKCE ?
▪ Identity management
▪ Separate authN logic
▪ Consume common set of
services
Web application - why OAuth ?
23
Client
Web application
24
Strategy I
▪ Use OpenID Connect
▪ Authenticate on ID Token
▪ Create a session to maintain
authenticated state
▪ Suitable when there’s tightly
coupled logic (embedded
business logic)
1
2
Web application
25
1
2
3
Strategy II
▪ Authenticate and maintain a
session
▪ Store access token against the
session
▪ Consume APIs using access
token
▪ Suitable when logic is
separated from application
▪ Everyone’s favourite
Single Page Application - SPA
26
“They are replacing native applications and web applications”
▪ Runs on the browser
▪ Challenges security implementations
▪ Logic is seperated
▪ Consumes APIs
▪ APIs - Can be easily secured by tokens
▪ Identity management
SPA - why OAuth ?
27
SPA - Challenge I
28
1
Where is the backend ???
SPA - Challenge II
29
1
Where to store the token ???
▪ Implicit flow - receive access token through URL
▪ Not recommended anymore
▪ Use authorization code grant with PKCE
SPA
30
▪ Cookie vs Local storage
1
SPA
31
Username :
Password :
Login Cancel
1
2
3
4
SPA
32
Local storage
▪ Not going out of browser
▪ Challenge - XSS
▪ Maintained by JS
Cookie
▪ Set as Secure
▪ Maintained by JS
▪ Challenge - CSRF
▪ No end user involvement
▪ Running in a secure environment
▪ Automation
Services
33
“OAuth define a mechanism to obtain tokens and maintain them”
▪ Access token - Safer and Revocable
▪ Credentials issued for client (No end user)
▪ Common interface at API - Share with SPA, Web App and Service
Services - why OAuth ?
34
Services
35
▪ Services use client credential grant
1
▪ Bearer tokens (RFC6750)
▪ Token introspection (RFC7662)
▪ Self contained tokens - JSON Web Token (RFC7519)
Protecting your service
36
GET /resource/1 HTTP/1.1
Authorization: Bearer <Token>
Introspect JWT validate
▪ OAuth and OpenID Connect can be used in many application types
▪ Token generation, Identity separation
▪ Reduce burden on credential, authentication handling
▪ Common interface - Protected by tokens
Checklist
37
Before you use
38
“Do not use a technology simply because you have heard of it”
▪ Evaluate your use case
▪ Think how your product will evolve
Q&A
Thank You .!

More Related Content

What's hot

AllTheTalks.Online 2020: "Basics of OAuth 2.0 and OpenID Connect"
AllTheTalks.Online 2020: "Basics of OAuth 2.0 and OpenID Connect"AllTheTalks.Online 2020: "Basics of OAuth 2.0 and OpenID Connect"
AllTheTalks.Online 2020: "Basics of OAuth 2.0 and OpenID Connect"Andreas Falk
 
Bring your own Identity (BYOID) with WSO2 Identity Server
Bring your own Identity (BYOID) with WSO2 Identity ServerBring your own Identity (BYOID) with WSO2 Identity Server
Bring your own Identity (BYOID) with WSO2 Identity ServerWSO2
 
[POSS 2019] MicroServices authentication and authorization with LemonLDAP::NG
[POSS 2019] MicroServices authentication and authorization with LemonLDAP::NG[POSS 2019] MicroServices authentication and authorization with LemonLDAP::NG
[POSS 2019] MicroServices authentication and authorization with LemonLDAP::NGWorteks
 
Client-Side Wallets in DApps - Nakov @ BlockWorld 2018 (San Jose)
Client-Side Wallets in DApps - Nakov @ BlockWorld 2018 (San Jose)Client-Side Wallets in DApps - Nakov @ BlockWorld 2018 (San Jose)
Client-Side Wallets in DApps - Nakov @ BlockWorld 2018 (San Jose)Svetlin Nakov
 
Getting Started with OpenIDM
Getting Started with OpenIDMGetting Started with OpenIDM
Getting Started with OpenIDMForgeRock
 
20180714 workshop - Ethereum decentralized application with truffle framework
20180714 workshop - Ethereum decentralized application with truffle framework20180714 workshop - Ethereum decentralized application with truffle framework
20180714 workshop - Ethereum decentralized application with truffle frameworkHu Kenneth
 
OIDF Workshop at Verizon Media -- 9/30/2019 -- OpenID Connect for Identity As...
OIDF Workshop at Verizon Media -- 9/30/2019 -- OpenID Connect for Identity As...OIDF Workshop at Verizon Media -- 9/30/2019 -- OpenID Connect for Identity As...
OIDF Workshop at Verizon Media -- 9/30/2019 -- OpenID Connect for Identity As...OpenIDFoundation
 
Code signing and trust
Code signing and trustCode signing and trust
Code signing and trustJapneet Singh
 
Cm2 secure code_training_1day_data_protection
Cm2 secure code_training_1day_data_protectionCm2 secure code_training_1day_data_protection
Cm2 secure code_training_1day_data_protectiondcervigni
 
2019 03 18_kenneth_simplebitcoinwebsite
2019 03 18_kenneth_simplebitcoinwebsite 2019 03 18_kenneth_simplebitcoinwebsite
2019 03 18_kenneth_simplebitcoinwebsite Hu Kenneth
 
Blockchain Introduction
Blockchain IntroductionBlockchain Introduction
Blockchain IntroductionAyham Madi
 
Secure Authorization for your Printer: The OAuth Device Flow (DevSum 2018)
Secure Authorization for your Printer: The OAuth Device Flow (DevSum 2018)Secure Authorization for your Printer: The OAuth Device Flow (DevSum 2018)
Secure Authorization for your Printer: The OAuth Device Flow (DevSum 2018)Scott Brady
 
Security aspects on blockchain white paper
Security aspects on blockchain  white paperSecurity aspects on blockchain  white paper
Security aspects on blockchain white paperCreus Moreira Carlos
 
OpenID Connect 4 SSI (DIFCon F2F)
OpenID Connect 4 SSI (DIFCon F2F)OpenID Connect 4 SSI (DIFCon F2F)
OpenID Connect 4 SSI (DIFCon F2F)Torsten Lodderstedt
 
[Pass the SALT 2021] Hosting Identity in the Cloud with free softwares
[Pass the SALT 2021] Hosting Identity in the Cloud with free softwares[Pass the SALT 2021] Hosting Identity in the Cloud with free softwares
[Pass the SALT 2021] Hosting Identity in the Cloud with free softwaresWorteks
 
SSO with the WSO2 Identity Server
SSO with the WSO2 Identity ServerSSO with the WSO2 Identity Server
SSO with the WSO2 Identity ServerWSO2
 
[FOSDEM 2019] LemonLDAP::NG 2.0
[FOSDEM 2019] LemonLDAP::NG 2.0[FOSDEM 2019] LemonLDAP::NG 2.0
[FOSDEM 2019] LemonLDAP::NG 2.0Clément OUDOT
 

What's hot (19)

AllTheTalks.Online 2020: "Basics of OAuth 2.0 and OpenID Connect"
AllTheTalks.Online 2020: "Basics of OAuth 2.0 and OpenID Connect"AllTheTalks.Online 2020: "Basics of OAuth 2.0 and OpenID Connect"
AllTheTalks.Online 2020: "Basics of OAuth 2.0 and OpenID Connect"
 
Bring your own Identity (BYOID) with WSO2 Identity Server
Bring your own Identity (BYOID) with WSO2 Identity ServerBring your own Identity (BYOID) with WSO2 Identity Server
Bring your own Identity (BYOID) with WSO2 Identity Server
 
[POSS 2019] MicroServices authentication and authorization with LemonLDAP::NG
[POSS 2019] MicroServices authentication and authorization with LemonLDAP::NG[POSS 2019] MicroServices authentication and authorization with LemonLDAP::NG
[POSS 2019] MicroServices authentication and authorization with LemonLDAP::NG
 
Client-Side Wallets in DApps - Nakov @ BlockWorld 2018 (San Jose)
Client-Side Wallets in DApps - Nakov @ BlockWorld 2018 (San Jose)Client-Side Wallets in DApps - Nakov @ BlockWorld 2018 (San Jose)
Client-Side Wallets in DApps - Nakov @ BlockWorld 2018 (San Jose)
 
Getting Started with OpenIDM
Getting Started with OpenIDMGetting Started with OpenIDM
Getting Started with OpenIDM
 
20180714 workshop - Ethereum decentralized application with truffle framework
20180714 workshop - Ethereum decentralized application with truffle framework20180714 workshop - Ethereum decentralized application with truffle framework
20180714 workshop - Ethereum decentralized application with truffle framework
 
OIDF Workshop at Verizon Media -- 9/30/2019 -- OpenID Connect for Identity As...
OIDF Workshop at Verizon Media -- 9/30/2019 -- OpenID Connect for Identity As...OIDF Workshop at Verizon Media -- 9/30/2019 -- OpenID Connect for Identity As...
OIDF Workshop at Verizon Media -- 9/30/2019 -- OpenID Connect for Identity As...
 
Code signing and trust
Code signing and trustCode signing and trust
Code signing and trust
 
Cm2 secure code_training_1day_data_protection
Cm2 secure code_training_1day_data_protectionCm2 secure code_training_1day_data_protection
Cm2 secure code_training_1day_data_protection
 
2019 03 18_kenneth_simplebitcoinwebsite
2019 03 18_kenneth_simplebitcoinwebsite 2019 03 18_kenneth_simplebitcoinwebsite
2019 03 18_kenneth_simplebitcoinwebsite
 
Blockchain Introduction
Blockchain IntroductionBlockchain Introduction
Blockchain Introduction
 
Secure Authorization for your Printer: The OAuth Device Flow (DevSum 2018)
Secure Authorization for your Printer: The OAuth Device Flow (DevSum 2018)Secure Authorization for your Printer: The OAuth Device Flow (DevSum 2018)
Secure Authorization for your Printer: The OAuth Device Flow (DevSum 2018)
 
Security aspects on blockchain white paper
Security aspects on blockchain  white paperSecurity aspects on blockchain  white paper
Security aspects on blockchain white paper
 
OpenID Connect 4 SSI (DIFCon F2F)
OpenID Connect 4 SSI (DIFCon F2F)OpenID Connect 4 SSI (DIFCon F2F)
OpenID Connect 4 SSI (DIFCon F2F)
 
OpenID Connect 4 SSI
OpenID Connect 4 SSIOpenID Connect 4 SSI
OpenID Connect 4 SSI
 
[Pass the SALT 2021] Hosting Identity in the Cloud with free softwares
[Pass the SALT 2021] Hosting Identity in the Cloud with free softwares[Pass the SALT 2021] Hosting Identity in the Cloud with free softwares
[Pass the SALT 2021] Hosting Identity in the Cloud with free softwares
 
SSO with the WSO2 Identity Server
SSO with the WSO2 Identity ServerSSO with the WSO2 Identity Server
SSO with the WSO2 Identity Server
 
[FOSDEM 2019] LemonLDAP::NG 2.0
[FOSDEM 2019] LemonLDAP::NG 2.0[FOSDEM 2019] LemonLDAP::NG 2.0
[FOSDEM 2019] LemonLDAP::NG 2.0
 
UMA for ACE
UMA for ACEUMA for ACE
UMA for ACE
 

Similar to Applications and Deployment Patterns of OAuth and OpenID Connect

Mobile Authentication - Onboarding, best practices & anti-patterns
Mobile Authentication - Onboarding, best practices & anti-patternsMobile Authentication - Onboarding, best practices & anti-patterns
Mobile Authentication - Onboarding, best practices & anti-patternsPieter Ennes
 
Secure your app with keycloak
Secure your app with keycloakSecure your app with keycloak
Secure your app with keycloakGuy Marom
 
Application Security in ASP.NET Core
Application Security in ASP.NET CoreApplication Security in ASP.NET Core
Application Security in ASP.NET CoreNETUserGroupBern
 
INTERFACE, by apidays - The Evolution of API Security by Johann Dilantha Nal...
INTERFACE, by apidays  - The Evolution of API Security by Johann Dilantha Nal...INTERFACE, by apidays  - The Evolution of API Security by Johann Dilantha Nal...
INTERFACE, by apidays - The Evolution of API Security by Johann Dilantha Nal...apidays
 
[APIdays INTERFACE 2021] The Evolution of API Security for Client-side Applic...
[APIdays INTERFACE 2021] The Evolution of API Security for Client-side Applic...[APIdays INTERFACE 2021] The Evolution of API Security for Client-side Applic...
[APIdays INTERFACE 2021] The Evolution of API Security for Client-side Applic...WSO2
 
De la bonne utilisation de OAuth2
De la bonne utilisation de OAuth2 De la bonne utilisation de OAuth2
De la bonne utilisation de OAuth2 Leonard Moustacchis
 
CIS13: Bootcamp: Ping Identity OAuth and OpenID Connect In Action with PingFe...
CIS13: Bootcamp: Ping Identity OAuth and OpenID Connect In Action with PingFe...CIS13: Bootcamp: Ping Identity OAuth and OpenID Connect In Action with PingFe...
CIS13: Bootcamp: Ping Identity OAuth and OpenID Connect In Action with PingFe...CloudIDSummit
 
Securing .NET Core, ASP.NET Core applications
Securing .NET Core, ASP.NET Core applicationsSecuring .NET Core, ASP.NET Core applications
Securing .NET Core, ASP.NET Core applicationsNETUserGroupBern
 
FIWARE Tech Summit - Complete Framework for Identity, Access Control and API ...
FIWARE Tech Summit - Complete Framework for Identity, Access Control and API ...FIWARE Tech Summit - Complete Framework for Identity, Access Control and API ...
FIWARE Tech Summit - Complete Framework for Identity, Access Control and API ...FIWARE
 
OAuth2 Authorization Server Under the Hood
OAuth2 Authorization Server Under the HoodOAuth2 Authorization Server Under the Hood
OAuth2 Authorization Server Under the HoodLohika_Odessa_TechTalks
 
Microservices on a budget meetup
Microservices on a budget   meetupMicroservices on a budget   meetup
Microservices on a budget meetupMatthew Reynolds
 
Building an Effective Architecture for Identity and Access Management.pdf
Building an Effective Architecture for Identity and Access Management.pdfBuilding an Effective Architecture for Identity and Access Management.pdf
Building an Effective Architecture for Identity and Access Management.pdfJorge Alvarez
 
Implementing security requirements for banking API system using Open Source ...
 Implementing security requirements for banking API system using Open Source ... Implementing security requirements for banking API system using Open Source ...
Implementing security requirements for banking API system using Open Source ...Yuichi Nakamura
 
Mastering Secrets Management in Rundeck
Mastering Secrets Management in RundeckMastering Secrets Management in Rundeck
Mastering Secrets Management in RundeckRundeck
 
Auth proxy pattern on Kubernetes
Auth proxy pattern on KubernetesAuth proxy pattern on Kubernetes
Auth proxy pattern on KubernetesMichał Wcisło
 
Hyperledger Fabric - Blockchain for the Enterprise - FOSDEM 20190203
Hyperledger Fabric - Blockchain for the Enterprise - FOSDEM 20190203Hyperledger Fabric - Blockchain for the Enterprise - FOSDEM 20190203
Hyperledger Fabric - Blockchain for the Enterprise - FOSDEM 20190203Arnaud Le Hors
 
Adding Identity Management and Access Control to your App
Adding Identity Management and Access Control to your AppAdding Identity Management and Access Control to your App
Adding Identity Management and Access Control to your AppFIWARE
 
Building IAM for OpenStack
Building IAM for OpenStackBuilding IAM for OpenStack
Building IAM for OpenStackSteve Martinelli
 
ConFoo 2015 - Securing RESTful resources with OAuth2
ConFoo 2015 - Securing RESTful resources with OAuth2ConFoo 2015 - Securing RESTful resources with OAuth2
ConFoo 2015 - Securing RESTful resources with OAuth2Rodrigo Cândido da Silva
 

Similar to Applications and Deployment Patterns of OAuth and OpenID Connect (20)

Mobile Authentication - Onboarding, best practices & anti-patterns
Mobile Authentication - Onboarding, best practices & anti-patternsMobile Authentication - Onboarding, best practices & anti-patterns
Mobile Authentication - Onboarding, best practices & anti-patterns
 
Secure your app with keycloak
Secure your app with keycloakSecure your app with keycloak
Secure your app with keycloak
 
Application Security in ASP.NET Core
Application Security in ASP.NET CoreApplication Security in ASP.NET Core
Application Security in ASP.NET Core
 
INTERFACE, by apidays - The Evolution of API Security by Johann Dilantha Nal...
INTERFACE, by apidays  - The Evolution of API Security by Johann Dilantha Nal...INTERFACE, by apidays  - The Evolution of API Security by Johann Dilantha Nal...
INTERFACE, by apidays - The Evolution of API Security by Johann Dilantha Nal...
 
[APIdays INTERFACE 2021] The Evolution of API Security for Client-side Applic...
[APIdays INTERFACE 2021] The Evolution of API Security for Client-side Applic...[APIdays INTERFACE 2021] The Evolution of API Security for Client-side Applic...
[APIdays INTERFACE 2021] The Evolution of API Security for Client-side Applic...
 
De la bonne utilisation de OAuth2
De la bonne utilisation de OAuth2 De la bonne utilisation de OAuth2
De la bonne utilisation de OAuth2
 
CIS13: Bootcamp: Ping Identity OAuth and OpenID Connect In Action with PingFe...
CIS13: Bootcamp: Ping Identity OAuth and OpenID Connect In Action with PingFe...CIS13: Bootcamp: Ping Identity OAuth and OpenID Connect In Action with PingFe...
CIS13: Bootcamp: Ping Identity OAuth and OpenID Connect In Action with PingFe...
 
Securing .NET Core, ASP.NET Core applications
Securing .NET Core, ASP.NET Core applicationsSecuring .NET Core, ASP.NET Core applications
Securing .NET Core, ASP.NET Core applications
 
FIWARE Tech Summit - Complete Framework for Identity, Access Control and API ...
FIWARE Tech Summit - Complete Framework for Identity, Access Control and API ...FIWARE Tech Summit - Complete Framework for Identity, Access Control and API ...
FIWARE Tech Summit - Complete Framework for Identity, Access Control and API ...
 
OAuth2 Authorization Server Under the Hood
OAuth2 Authorization Server Under the HoodOAuth2 Authorization Server Under the Hood
OAuth2 Authorization Server Under the Hood
 
SFScon 2020 - Alex Lanz Martin Malfertheiner - OAuth2 OpenID
 SFScon 2020 - Alex Lanz Martin Malfertheiner - OAuth2 OpenID SFScon 2020 - Alex Lanz Martin Malfertheiner - OAuth2 OpenID
SFScon 2020 - Alex Lanz Martin Malfertheiner - OAuth2 OpenID
 
Microservices on a budget meetup
Microservices on a budget   meetupMicroservices on a budget   meetup
Microservices on a budget meetup
 
Building an Effective Architecture for Identity and Access Management.pdf
Building an Effective Architecture for Identity and Access Management.pdfBuilding an Effective Architecture for Identity and Access Management.pdf
Building an Effective Architecture for Identity and Access Management.pdf
 
Implementing security requirements for banking API system using Open Source ...
 Implementing security requirements for banking API system using Open Source ... Implementing security requirements for banking API system using Open Source ...
Implementing security requirements for banking API system using Open Source ...
 
Mastering Secrets Management in Rundeck
Mastering Secrets Management in RundeckMastering Secrets Management in Rundeck
Mastering Secrets Management in Rundeck
 
Auth proxy pattern on Kubernetes
Auth proxy pattern on KubernetesAuth proxy pattern on Kubernetes
Auth proxy pattern on Kubernetes
 
Hyperledger Fabric - Blockchain for the Enterprise - FOSDEM 20190203
Hyperledger Fabric - Blockchain for the Enterprise - FOSDEM 20190203Hyperledger Fabric - Blockchain for the Enterprise - FOSDEM 20190203
Hyperledger Fabric - Blockchain for the Enterprise - FOSDEM 20190203
 
Adding Identity Management and Access Control to your App
Adding Identity Management and Access Control to your AppAdding Identity Management and Access Control to your App
Adding Identity Management and Access Control to your App
 
Building IAM for OpenStack
Building IAM for OpenStackBuilding IAM for OpenStack
Building IAM for OpenStack
 
ConFoo 2015 - Securing RESTful resources with OAuth2
ConFoo 2015 - Securing RESTful resources with OAuth2ConFoo 2015 - Securing RESTful resources with OAuth2
ConFoo 2015 - Securing RESTful resources with OAuth2
 

Recently uploaded

Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
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
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
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)

Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
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
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 

Applications and Deployment Patterns of OAuth and OpenID Connect

  • 1. Applications and Deployment Patterns of OAuth and OpenID Connect Kavindu Dodanduwa Senior Software Engineer - WSO2
  • 2. ▪ OAuth 2.0 and OpenID Connect ? ▪ Must known things ▪ Patterns ▪ Q&A Agenda 2 Theory Practice Technology
  • 3. ▪ Typical systems with built in login dialog ▪ Maintain its own identities A decade ago ~ 200X 3 Username : Password : Login Cancel
  • 4. Still used ? YES ! 4 https://github.com/docker/docker.github.io/issues/6910
  • 6. ▪ HTTP - Hypertext Transfer Protocol ▪ Defined through RFC7230 - IETF Specifications 6 ▪ OAuth working group - OAuth 2.0 ▪ OpenID Foundation - OpenID Connect
  • 7. ▪ Motivation - Do things better ▪ Specifications - How to do better Checklist 7
  • 8. ▪ Two different concepts ▪ Authentication - Identify true identity ▪ Authorization - Validate permissions/rights AuthN and AuthZ 8
  • 10. ▪ OAuth 2.0 - RFC6749 ▪ For authorization - Access delegation OAuth 2.0 and OpenID Connect 10 ▪ OpenID Connect ▪ End user authentication, built on OAuth 2.0
  • 12. ▪ Access delegation ▪ Basic authentication (RFC7617) vs Tokens (RFC6750) Tokens 12 Authorization : Basic Base64(username:password) Authorization : Bearer JkP76NNv_sd ▪ Revocable & short life-span
  • 13. ▪ Integrations ▪ Unique login experience ▪ Reduce complexity Why adopt ? 13
  • 14. ▪ AuthN & AuthZ - General concepts ▪ OAuth 2.0 & OpenID Connect - Specifications ▪ How does it works ? - “Simple as completing few API calls” ▪ Tokens - They have advantage over other mechanisms Checklist 14
  • 15. Revise 15 User Client Authorization server Resource Server
  • 16. Generic flow 16 Username : Password : Login Cancel 1 2 3 4 5 6
  • 17. ▪ Authorization code grant - Official name ▪ Require a user agent - a browser ▪ Browser redirects + backend call Generic flow 17
  • 18. Public client 18 ▪ Public - General availability to customers, users ▪ B2B or B2C “Such clients cannot protect an embedded secret”[1] ▪ Thus require extra protection when obtaining token! ▪ Avoid access token stealing by other applications
  • 19. ▪ To consume a common APIs/resources - ex: product suite ▪ Identity management Public client - why OAuth ? 19
  • 20. ▪ Original request contains a hashed secret ▪ Authorization server stores it (against code issue for second step) ▪ Token request contains secret with hash method PKCE - Proof Key for Code Exchange (RFC7636) 20
  • 21. Public client - PKCE 21 Username : Password : Login Cancel 1 2 3 4 5 6
  • 22. ▪ An application which has a front end and a backend ▪ JSP, PHP or ASP are few examples Web application 22 “Having a backend allows them to securely store secrets” ▪ Usually can store client secrets, tokens securely in a backend ▪ PKCE ?
  • 23. ▪ Identity management ▪ Separate authN logic ▪ Consume common set of services Web application - why OAuth ? 23 Client
  • 24. Web application 24 Strategy I ▪ Use OpenID Connect ▪ Authenticate on ID Token ▪ Create a session to maintain authenticated state ▪ Suitable when there’s tightly coupled logic (embedded business logic) 1 2
  • 25. Web application 25 1 2 3 Strategy II ▪ Authenticate and maintain a session ▪ Store access token against the session ▪ Consume APIs using access token ▪ Suitable when logic is separated from application
  • 26. ▪ Everyone’s favourite Single Page Application - SPA 26 “They are replacing native applications and web applications” ▪ Runs on the browser ▪ Challenges security implementations
  • 27. ▪ Logic is seperated ▪ Consumes APIs ▪ APIs - Can be easily secured by tokens ▪ Identity management SPA - why OAuth ? 27
  • 28. SPA - Challenge I 28 1 Where is the backend ???
  • 29. SPA - Challenge II 29 1 Where to store the token ???
  • 30. ▪ Implicit flow - receive access token through URL ▪ Not recommended anymore ▪ Use authorization code grant with PKCE SPA 30 ▪ Cookie vs Local storage 1
  • 32. SPA 32 Local storage ▪ Not going out of browser ▪ Challenge - XSS ▪ Maintained by JS Cookie ▪ Set as Secure ▪ Maintained by JS ▪ Challenge - CSRF
  • 33. ▪ No end user involvement ▪ Running in a secure environment ▪ Automation Services 33
  • 34. “OAuth define a mechanism to obtain tokens and maintain them” ▪ Access token - Safer and Revocable ▪ Credentials issued for client (No end user) ▪ Common interface at API - Share with SPA, Web App and Service Services - why OAuth ? 34
  • 35. Services 35 ▪ Services use client credential grant 1
  • 36. ▪ Bearer tokens (RFC6750) ▪ Token introspection (RFC7662) ▪ Self contained tokens - JSON Web Token (RFC7519) Protecting your service 36 GET /resource/1 HTTP/1.1 Authorization: Bearer <Token> Introspect JWT validate
  • 37. ▪ OAuth and OpenID Connect can be used in many application types ▪ Token generation, Identity separation ▪ Reduce burden on credential, authentication handling ▪ Common interface - Protected by tokens Checklist 37
  • 38. Before you use 38 “Do not use a technology simply because you have heard of it” ▪ Evaluate your use case ▪ Think how your product will evolve
  • 39. Q&A