SlideShare a Scribd company logo
1 of 9
twitter: @MithunShanbhag
blog: mithunshanbhag.github.io
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
OpenID Connect (OIDC) vs OAuth 2.0
OpenID Connection (OIDC)
• Authentication protocol (SSO)
• Built on OAuth 2.0
• Generates id_token
• Standardizedscopes
OAuth 2.0
• Authorization protocol
• Generates access_token
• Claimsandcustom claims
image attribution: okta dev blog
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
User Client App Authorization Server Resource (API)
Authorization request
Login button
302/Redirectto authentication prompt
Authentication and consent
Calls /authorize endpoint
• client_id: xxxxxxxxxxxx
• redirect_uri: xxxxxxxxxxxxxxx
• state:xxxxxxxxxxxxxxx
• response_type:tokenid_token
• scope: openid
Authorization grant
Requestresource(s)
• access_token
• id_token
• access_token
Response
Implicit Flow
LEGEND
FrontChannel
Back Channel
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
DEMO
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
AppType Channels User
Interaction
Client
Secret
response_type field Recommended Flow
Single Page Apps Front Yes No “token id_token” Implicit
Server-Side Web Apps Front, Back Yes Yes “code” Authorization Code
Native Apps Front, Back Yes Yes “code” Authorization Code/PKCE
CLI,daemons, services Back No Yes N/A Client Credentials
Legacy Apps Front, Back No No N/A Resource Owner/Password
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
User Client App Authorization Server Resource (API)
Authorization request
Login button
302/Redirectto authentication prompt
Authentication and consent
Calls /authorize endpoint
• client_id: {xxxxxxxxxxxx}
• redirect_uri: {xxxxxxxxxxxxxx}
• state:{xxxxxxxxxxxxxxx}
• response_type:code
• scope: openid
Authorization code grant
RequestID and Access tokens
code: {code}
Response
Authorization
Code Flow LEGEND
FrontChannel
Back Channel
Calls /token endpoint
• client_id: xxxxxxxxxxxx
• client_secret: xxxxxxxxxxxxxxx
• code: {code}
• id_token
• access_token
Requestresource(s)
Response
• access_token
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
OIDC Endpoints
• GET/authorize: Obtain user consent andauthorization grant.
• POST/token: Obtains id_token, access_token by supplying the authorization code or refresh_token.
• GET/userinfo: Obtains claims about the authenticated end user.
• POST/revoke: Revoke an access_token or refresh_token.
• GET/logout: Self-explanatory.
• GET/.well-known/keys: Obtain public keys (JWKS) used tosign the tokens.
• GET/.well-known/openid-configuration: Return OIDCmetadata related tothe specified authorization server.
• GET/.well-known/authorization-server: Return OAuth 2.0 metadata related tothe specified authorization server.
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
JWT Structure
HEADER
• Signing algorithm (mostly RS256/asymmetric orHS256/symmetric).
• Signing Key Id.
PAYLOAD
• Standardandcustom claims.
SIGNATURE
• HS256/symmetric:
• The client secret is used toboth sign & verify.
• Signature = HS256(base64UrlEncode(header)+ "." + base64UrlEncode(payload) + “.”+ secret)
• RS256/asymmetric:
• The private signing key/certificate is used tosign.
• Verification done via the public key (JWKS from/.well-known/keys OIDCendpoint).
• Signature = RS256(base64UrlEncode(header)+ "." + base64UrlEncode(payload) + “.”+ public/private key pair)
twitter: @MithunShanbhagblog: mithunshanbhag.github.io
Q&A

More Related Content

Similar to Identity, authentication and authorization

アプリ開発で知っておきたい認証技術 - OAuth 1.0 + OAuth 2.0 + OpenID Connect -
アプリ開発で知っておきたい認証技術 - OAuth 1.0 + OAuth 2.0 + OpenID Connect -アプリ開発で知っておきたい認証技術 - OAuth 1.0 + OAuth 2.0 + OpenID Connect -
アプリ開発で知っておきたい認証技術 - OAuth 1.0 + OAuth 2.0 + OpenID Connect -Naoki Nagazumi
 
What the Heck is OAuth and OIDC - UberConf 2018
What the Heck is OAuth and OIDC - UberConf 2018What the Heck is OAuth and OIDC - UberConf 2018
What the Heck is OAuth and OIDC - UberConf 2018Matt Raible
 
RFC6749 et alia 20130504
RFC6749 et alia 20130504RFC6749 et alia 20130504
RFC6749 et alia 20130504Mattias Jidhage
 
What the Heck is OAuth and OIDC - Denver Developer Identity Workshop 2020
What the Heck is OAuth and OIDC - Denver Developer Identity Workshop 2020What the Heck is OAuth and OIDC - Denver Developer Identity Workshop 2020
What the Heck is OAuth and OIDC - Denver Developer Identity Workshop 2020Matt Raible
 
Secure your app with keycloak
Secure your app with keycloakSecure your app with keycloak
Secure your app with keycloakGuy Marom
 
Securing APIs with OAuth 2.0
Securing APIs with OAuth 2.0Securing APIs with OAuth 2.0
Securing APIs with OAuth 2.0Kai Hofstetter
 
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
 
OAuth2 and OpenID with Spring Boot
OAuth2 and OpenID with Spring BootOAuth2 and OpenID with Spring Boot
OAuth2 and OpenID with Spring BootGeert Pante
 
Intro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID ConnectIntro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID ConnectLiamWadman
 
Ember Authentication and Authorization with Torii
Ember Authentication and Authorization with ToriiEmber Authentication and Authorization with Torii
Ember Authentication and Authorization with ToriiCory Forsyth
 
OAuth 2.0 Misconceptions
OAuth 2.0 MisconceptionsOAuth 2.0 Misconceptions
OAuth 2.0 MisconceptionsCory Forsyth
 
FamilySearch Authentication Options
FamilySearch Authentication OptionsFamilySearch Authentication Options
FamilySearch Authentication OptionsJimmy Zimmerman
 
Keycloak for Science Gateways - SGCI Technology Sampler Webinar
Keycloak for Science Gateways - SGCI Technology Sampler WebinarKeycloak for Science Gateways - SGCI Technology Sampler Webinar
Keycloak for Science Gateways - SGCI Technology Sampler Webinarmarcuschristie
 
Best Practices in Building an API Security Ecosystem
Best Practices in Building an API Security EcosystemBest Practices in Building an API Security Ecosystem
Best Practices in Building an API Security EcosystemPrabath Siriwardena
 
2019 - Tech Talk DC - Token-based security for web applications using OAuth2 ...
2019 - Tech Talk DC - Token-based security for web applications using OAuth2 ...2019 - Tech Talk DC - Token-based security for web applications using OAuth2 ...
2019 - Tech Talk DC - Token-based security for web applications using OAuth2 ...Vladimir Bychkov
 
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
 

Similar to Identity, authentication and authorization (20)

Demystifying OAuth 2.0
Demystifying OAuth 2.0Demystifying OAuth 2.0
Demystifying OAuth 2.0
 
アプリ開発で知っておきたい認証技術 - OAuth 1.0 + OAuth 2.0 + OpenID Connect -
アプリ開発で知っておきたい認証技術 - OAuth 1.0 + OAuth 2.0 + OpenID Connect -アプリ開発で知っておきたい認証技術 - OAuth 1.0 + OAuth 2.0 + OpenID Connect -
アプリ開発で知っておきたい認証技術 - OAuth 1.0 + OAuth 2.0 + OpenID Connect -
 
What the Heck is OAuth and OIDC - UberConf 2018
What the Heck is OAuth and OIDC - UberConf 2018What the Heck is OAuth and OIDC - UberConf 2018
What the Heck is OAuth and OIDC - UberConf 2018
 
RFC6749 et alia 20130504
RFC6749 et alia 20130504RFC6749 et alia 20130504
RFC6749 et alia 20130504
 
What the Heck is OAuth and OIDC - Denver Developer Identity Workshop 2020
What the Heck is OAuth and OIDC - Denver Developer Identity Workshop 2020What the Heck is OAuth and OIDC - Denver Developer Identity Workshop 2020
What the Heck is OAuth and OIDC - Denver Developer Identity Workshop 2020
 
Secure your app with keycloak
Secure your app with keycloakSecure your app with keycloak
Secure your app with keycloak
 
OAuth: Trust Issues
OAuth: Trust IssuesOAuth: Trust Issues
OAuth: Trust Issues
 
Securing APIs with OAuth 2.0
Securing APIs with OAuth 2.0Securing APIs with OAuth 2.0
Securing APIs with OAuth 2.0
 
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
 
Api security
Api security Api security
Api security
 
OAuth2 and OpenID with Spring Boot
OAuth2 and OpenID with Spring BootOAuth2 and OpenID with Spring Boot
OAuth2 and OpenID with Spring Boot
 
Intro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID ConnectIntro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID Connect
 
TLDR - OAuth
TLDR - OAuthTLDR - OAuth
TLDR - OAuth
 
Ember Authentication and Authorization with Torii
Ember Authentication and Authorization with ToriiEmber Authentication and Authorization with Torii
Ember Authentication and Authorization with Torii
 
OAuth 2.0 Misconceptions
OAuth 2.0 MisconceptionsOAuth 2.0 Misconceptions
OAuth 2.0 Misconceptions
 
FamilySearch Authentication Options
FamilySearch Authentication OptionsFamilySearch Authentication Options
FamilySearch Authentication Options
 
Keycloak for Science Gateways - SGCI Technology Sampler Webinar
Keycloak for Science Gateways - SGCI Technology Sampler WebinarKeycloak for Science Gateways - SGCI Technology Sampler Webinar
Keycloak for Science Gateways - SGCI Technology Sampler Webinar
 
Best Practices in Building an API Security Ecosystem
Best Practices in Building an API Security EcosystemBest Practices in Building an API Security Ecosystem
Best Practices in Building an API Security Ecosystem
 
2019 - Tech Talk DC - Token-based security for web applications using OAuth2 ...
2019 - Tech Talk DC - Token-based security for web applications using OAuth2 ...2019 - Tech Talk DC - Token-based security for web applications using OAuth2 ...
2019 - Tech Talk DC - Token-based security for web applications using OAuth2 ...
 
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
 

More from Mithun Shanbhag

Design Patterns for Data Management and Consistency
Design Patterns for Data Management and ConsistencyDesign Patterns for Data Management and Consistency
Design Patterns for Data Management and ConsistencyMithun Shanbhag
 
WSL - Windows SubSytem For Linux
WSL - Windows SubSytem For LinuxWSL - Windows SubSytem For Linux
WSL - Windows SubSytem For LinuxMithun Shanbhag
 
Creating user-mode debuggers for Windows
Creating user-mode debuggers for WindowsCreating user-mode debuggers for Windows
Creating user-mode debuggers for WindowsMithun Shanbhag
 
Crash course in git and github
Crash course in git and githubCrash course in git and github
Crash course in git and githubMithun Shanbhag
 

More from Mithun Shanbhag (8)

CloudSkew Architecture
CloudSkew ArchitectureCloudSkew Architecture
CloudSkew Architecture
 
Azure Pipelines
Azure PipelinesAzure Pipelines
Azure Pipelines
 
Terraform on Azure
Terraform on AzureTerraform on Azure
Terraform on Azure
 
Design Patterns for Data Management and Consistency
Design Patterns for Data Management and ConsistencyDesign Patterns for Data Management and Consistency
Design Patterns for Data Management and Consistency
 
WSL - Windows SubSytem For Linux
WSL - Windows SubSytem For LinuxWSL - Windows SubSytem For Linux
WSL - Windows SubSytem For Linux
 
Creating user-mode debuggers for Windows
Creating user-mode debuggers for WindowsCreating user-mode debuggers for Windows
Creating user-mode debuggers for Windows
 
Crash course in sql
Crash course in sqlCrash course in sql
Crash course in sql
 
Crash course in git and github
Crash course in git and githubCrash course in git and github
Crash course in git and github
 

Recently uploaded

KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?Watsoo Telematics
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutionsmonugehlot87
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 

Recently uploaded (20)

KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutions
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 

Identity, authentication and authorization

  • 2. twitter: @MithunShanbhagblog: mithunshanbhag.github.io OpenID Connect (OIDC) vs OAuth 2.0 OpenID Connection (OIDC) • Authentication protocol (SSO) • Built on OAuth 2.0 • Generates id_token • Standardizedscopes OAuth 2.0 • Authorization protocol • Generates access_token • Claimsandcustom claims image attribution: okta dev blog
  • 3. twitter: @MithunShanbhagblog: mithunshanbhag.github.io User Client App Authorization Server Resource (API) Authorization request Login button 302/Redirectto authentication prompt Authentication and consent Calls /authorize endpoint • client_id: xxxxxxxxxxxx • redirect_uri: xxxxxxxxxxxxxxx • state:xxxxxxxxxxxxxxx • response_type:tokenid_token • scope: openid Authorization grant Requestresource(s) • access_token • id_token • access_token Response Implicit Flow LEGEND FrontChannel Back Channel
  • 5. twitter: @MithunShanbhagblog: mithunshanbhag.github.io AppType Channels User Interaction Client Secret response_type field Recommended Flow Single Page Apps Front Yes No “token id_token” Implicit Server-Side Web Apps Front, Back Yes Yes “code” Authorization Code Native Apps Front, Back Yes Yes “code” Authorization Code/PKCE CLI,daemons, services Back No Yes N/A Client Credentials Legacy Apps Front, Back No No N/A Resource Owner/Password
  • 6. twitter: @MithunShanbhagblog: mithunshanbhag.github.io User Client App Authorization Server Resource (API) Authorization request Login button 302/Redirectto authentication prompt Authentication and consent Calls /authorize endpoint • client_id: {xxxxxxxxxxxx} • redirect_uri: {xxxxxxxxxxxxxx} • state:{xxxxxxxxxxxxxxx} • response_type:code • scope: openid Authorization code grant RequestID and Access tokens code: {code} Response Authorization Code Flow LEGEND FrontChannel Back Channel Calls /token endpoint • client_id: xxxxxxxxxxxx • client_secret: xxxxxxxxxxxxxxx • code: {code} • id_token • access_token Requestresource(s) Response • access_token
  • 7. twitter: @MithunShanbhagblog: mithunshanbhag.github.io OIDC Endpoints • GET/authorize: Obtain user consent andauthorization grant. • POST/token: Obtains id_token, access_token by supplying the authorization code or refresh_token. • GET/userinfo: Obtains claims about the authenticated end user. • POST/revoke: Revoke an access_token or refresh_token. • GET/logout: Self-explanatory. • GET/.well-known/keys: Obtain public keys (JWKS) used tosign the tokens. • GET/.well-known/openid-configuration: Return OIDCmetadata related tothe specified authorization server. • GET/.well-known/authorization-server: Return OAuth 2.0 metadata related tothe specified authorization server.
  • 8. twitter: @MithunShanbhagblog: mithunshanbhag.github.io JWT Structure HEADER • Signing algorithm (mostly RS256/asymmetric orHS256/symmetric). • Signing Key Id. PAYLOAD • Standardandcustom claims. SIGNATURE • HS256/symmetric: • The client secret is used toboth sign & verify. • Signature = HS256(base64UrlEncode(header)+ "." + base64UrlEncode(payload) + “.”+ secret) • RS256/asymmetric: • The private signing key/certificate is used tosign. • Verification done via the public key (JWKS from/.well-known/keys OIDCendpoint). • Signature = RS256(base64UrlEncode(header)+ "." + base64UrlEncode(payload) + “.”+ public/private key pair)

Editor's Notes

  1. angular app (angular app) Fiddler jwt.io
  2. PKCE: Proof key for code exchange Code verifier, code challenge Client Credentials: Directly call the /token endpoint with client id + client secret, get access_token back Resource Owner Password: Directly call the /token endpoint with usernam + password, get access_token back