SlideShare une entreprise Scribd logo
1  sur  31
Télécharger pour lire hors ligne
Connect
explained
Vladimir Dzhuvinov
Chief Identity Architect
What is
OpenID Connect?
OpenID Connect is a new internet
standard for
Single
Sign-On
(SSO)
Identity
Provision
(IdP)
OpenID Connect supports
web
clients
mobile / native
clients
OpenID Connect is good for
social
apps
consumer
apps
enterprise
apps
mobile
apps
OpenID Connect is backed by
Microsoft Google
Ping Salesforce
Oracle
… us and
many others
1. Need to authenticate a user?
2. Send user to their OpenID provider
(via browser / HTTP 302 redirect)
3. Get identity token back
OpenID Connect distilled
The key OpenID Connect object
Client apps receive an ID token from the OpenID Provider
ID Token
asserts the user's identity
(user ID)
ID token
The ID token resembles the
concept of an identity card,
in a standard digital format
that client apps can validate.
● Asserts the user's identity.
● Has an issuing authority (the IdP).
● May specify how (strength, factors)
and when the user was authenticated.
● Is generated for a particular audience
(client).
● Has an issue and an expiration date.
● May contain details such as the user's
name, email address and other profile
information.
● Is digitally signed, so the intended
recipients can verify it.
● May optionally be encrypted for
confidentiality.
ID token internals
● Encoded as a JSON Web
Token (JWT).
● The claims about the
authenticated end-user
(subject) are packaged in a
simple JSON object.
● Digitally signed with the
OpenID Provider's RSA or
EC key.
● Is URL-safe.
{
 "iss"   : "https://c2id.com",
 "sub"   : "alice",
 "aud"   : "s6BhdRkqt3",
 "nonce" : "n­0S6_WzA2Mj",
 "exp"   : 1311281970,
 "iat"   : 1311280970,
 "acr"   : "http://loa.c2id.com/high",
 "amr"   : [ "mfa", "pwd", "otp" ]
}
Encoded ID token
eyJhbGciOiJSUzI1NiIsImtpZCI6IjFlOWdkazcifQ.ewogImlzcyI6ICJodHRw
Oi8vc2VydmVyLmV4YW1wbGUuY29tIiwKICJzdWIiOiAiMjQ4Mjg5NzYxMDAxIiw
KICJhdWQiOiAiczZCaGRSa3F0MyIsCiAibm9uY2UiOiAibi0wUzZfV3pBMk1qIi
wKICJleHAiOiAxMzExMjgxOTcwLAogImlhdCI6IDEzMTEyODA5NzAKfQ.ggW8hZ
1EuVLuxNuuIJKX_V8a_OMXzR0EHR9R6jgdqrOOF4daGU96Sr_P6qJp6IcmD3HP9
9Obi1PRs-cwh3LO-p146waJ8IhehcwL7F09JdijmBqkvPeB2T9CJNqeGpegccMg
4vfKjkM8FcGvnzZUN4_KSP0aAp1tOJ1zZwgjxqGByKHiOtX7TpdQyHE5lcMiKPX
fEIQILVq0pc_E2DzL7emopWoaoZTF_m0_N0YzFC6g6EJbOEoRoSK5hoDalrcvRY
LSrQAZZKflyuVCyixEoV9GfNQC3_osjzw2PAithfubEEBLuVVk4XUVrWOLrLl0n
x7RkKU8NXNHq-rvKMzqg
[ Header ] . [ Claims ] . [ Digital Signature ]
Cool ID token uses
● Simple stateless session management for JavaScript and
single-page applications.
● Universal passport for all your users and applications,
regardless of where they came from – social networks,
partner businesses and organisations, local accounts.
●
May be passed to 3rd
parties to assert the user's identity.
● May be exchanged for an access token at the token
endpoint of an OAuth 2.0 authorisation server. See draft-
ietf-oauth-token-exchange-05.
Via the OAuth 2.0
protocol flows
How to obtain an ID token?
Choose a flow to suit your app
● Authorisation code flow
– for typical web and mobile apps
– the client is typically authenticated
– tokens retrieved via back channel
● Implicit flow
– for JavaScript applications that run in the browser
– the client is not authenticated
– tokens returned via front-channel, revealed to browser
● Hybrid flow
– allows app front-end and back-end to receive tokens independently
– rarely used
http://openid.net/specs/openid-connect-core-1_0.html#Authentication
The OpenID auth request
(code flow)
Send the user to the OpenID provider with an
authentication request:
https://openid.provider.com/authorize?
response_type=code
&scope=openid
&client_id=s6BhdRkqt3
&state=af0ifjsldkj
&redirect_uri=https%3A%2 %2Fclient.example.org%2Fcb
The OpenID auth response
(code flow)
If the user is successfully authenticatted the OpenID
provider will redirect the browser back to the client app
with an authorisation code:
https://client.example.org/cb?
code=SplxlOBeZQQYbYS6WxSbIA
&state=af0ifjsldkj
The OpenID auth response
(code flow)
If the authentication request cannot be fulfilled for some
reason the OpenID provider may return an error code:
https://client.example.org/cb?
error=access_denied
&state=af0ifjsldkj
Exchange code for ID token
(code flow)
Makes a back channel request to exchange the code for
an ID token. Note that the client authenticates itself to
the server here!
POST /token HTTP/1.1
Host: openid.provider.com
Content-Type: application/x-www-form-urlencoded
Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW
grant_type=authorization_code
&code=SplxlOBeZQQYbYS6WxSbIA
&redirect_uri=https%3A%2F%2Fclient.example.org%2Fcb
Exchange code for ID token
(code flow)
Finally, we have our ID token! But what's this access
token?
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store
Pragma: no-cache
{
"access_token": "SlAV32hkKG",
"token_type": "Bearer",
"refresh_token": "8xLOxBtZp8",
"expires_in": 3600,
"id_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjFlOWdkazc..."
}
UserInfo
{
"sub" : "alice",
"name" : "Alice Adams",
"given_name" : "Alice",
"family_name" : "Adams",
"email" : "alice@wonderland.net",
"email_verified" : true,
"phone_number" : "+359 (99) 100200305",
"profile" : "https://c2id.com/users/alice",
"ldap_groups" : [ "audit", "admin" ]
}
OpenID Connect defines an extensible JSON schema for releasing
consented user details to client applications
Requesting UserInfo with the
OpenID auth request
Send user to OpenID provider with auth request:
https://openid.provider.com/authorize?
response_type=code
&scope=openid%20profile%20email
&client_id=s6BhdRkqt3
&state=af0ifjsldkj
&redirect_uri=https%3A%2 %2Fclient.example.org%2Fcb
Access token
Resembles the concept of a
physical token or ticket. Permits
the bearer access to a specific
resource or service. Has typically
an expiration associated with it.
● OAuth 2.0 access tokens are
employed in OpenID Connect
to allow the client application to
retrieve consented user details
from a UserInfo endpoint.
● The server may extend the
access token scope to allow
the client access to other
protected resources and web
APIs.
● The client treats the access
token as a simple opaque
string to be passed with the
HTTP request to the protected
resource.
UserInfo request with access
token
Put the obtained bearer token in the authorization
header of your outgoing HTTPS request:
GET /userinfo HTTP/1.1
Host: server.example.com
Authorization: Bearer SlAV32hkKG
UserInfo response
Sample response from the UserInfo endpoint, with the
consented details (claims / assertions) about the user:
HTTP/1.1 200 OK
Content-Type: application/json
{
"sub" : "alice",
"name" : "Alice Adams",
"email" : "alice@wonderland.net",
"email_verified" : true,
"phone_number" : "+359 (99) 100200305",
"profile" : "https://c2id.com/users/alice",
"ldap_groups" : [ "audit", "admin" ]
}
The two OpenID Connect tokens
summed up
ID Token
asserts the user's identity
(user ID)
Access Token
optional, to retrieve
consented UserInfo
OpenID Connect rides on top of
OAuth 2.0
● User identity is asserted by means of
JSON Web Tokens (JWT)
● Clients use standard OAuth 2.0 flows
to obtain ID tokens
● Guiding mantra: Simple clients,
complexity absorbed by the server
● Any method for authenticating users –
LDAP, tokens, biometrics, etc.
● JSON schema for UserInfo
● Supports optional OpenID provider
discovery, dynamic client registration
and session management.
● Extensible to suit many use cases.
● Federation is possible.
OpenID Connect
OAuth 2.0
JOSE
+
JWT
OpenID Connect provider
endpoints
● Core provider endpoints:
– Authorisation endpoint
– Token endpoint
– UserInfo endpoint
● Optional provider endpoints:
– WebFinger endpoint
– Provider metadata URI
– Provider JWK set URI
– Client registration endpoint
– Session management endpoint
HTTP Endpoints
Optional endpoints
● WebFinger : Enables dynamic discovery of the OpenID Connect provider
for a user based on their email address.
● Provider configuration URI : Well-known URL of a JSON document
advertising the endpoints and capabilities of the OpenID provider. Helps
the client apps to auto-configure their OpenID Connect requests.
● Provider JWK set URI : JSON document containing the OpenID provider's
public (typically RSA) keys in JSON Web Key (JWK) format. These keys
are used to sign the issued ID tokens and other artefacts.
● Client registration : Enables client apps to register dynamically, then
update their details or unregister. Registration may be open (public).
● Session management : Enables client apps to check if a logged in user
has an active session with the OpenID provider. Also to signal logout.
The future: dynamic discovery +
client registration
alice@wonderland.net
ID token for Alice
The specifications
● OpenID Connect: http://openid.net/connect
● OAuth 2.0 (RFC 6749): http://tools.ietf.org/html/rfc6749
● OAuth 2.0 Bearer token (RFC 6750): http://tools.ietf.org/html/rfc6750
● JSON Web Token: http://tools.ietf.org/html/rfc7519
● JSON Web Signature: http://tools.ietf.org/html/rfc7515
● JSON Web Encryption: http://tools.ietf.org/html/rfc7516
● JSON Web Key: http://tools.ietf.org/html/rfc7517
Thank You!
Q + A
Get these slides from
http://connect2id.com/assets/oidc-explained.pdf

Contenu connexe

Tendances

OAuth2 - Introduction
OAuth2 - IntroductionOAuth2 - Introduction
OAuth2 - IntroductionKnoldus Inc.
 
OAuth 2.0 and OpenID Connect
OAuth 2.0 and OpenID ConnectOAuth 2.0 and OpenID Connect
OAuth 2.0 and OpenID ConnectJacob Combs
 
Demystifying SAML 2.0,Oauth 2.0, OpenID Connect
Demystifying SAML 2.0,Oauth 2.0, OpenID ConnectDemystifying SAML 2.0,Oauth 2.0, OpenID Connect
Demystifying SAML 2.0,Oauth 2.0, OpenID ConnectVinay Manglani
 
OpenId Connect Protocol
OpenId Connect ProtocolOpenId Connect Protocol
OpenId Connect ProtocolMichael Furman
 
Implementing OAuth
Implementing OAuthImplementing OAuth
Implementing OAuthleahculver
 
Rest API Security - A quick understanding of Rest API Security
Rest API Security - A quick understanding of Rest API SecurityRest API Security - A quick understanding of Rest API Security
Rest API Security - A quick understanding of Rest API SecurityMohammed Fazuluddin
 
Token, token... From SAML to OIDC
Token, token... From SAML to OIDCToken, token... From SAML to OIDC
Token, token... From SAML to OIDCShiu-Fun Poon
 
FIDO2 Specifications Overview
FIDO2 Specifications OverviewFIDO2 Specifications Overview
FIDO2 Specifications OverviewFIDO Alliance
 
OpenID for Verifiable Credentials (IIW 35)
OpenID for Verifiable Credentials (IIW 35)OpenID for Verifiable Credentials (IIW 35)
OpenID for Verifiable Credentials (IIW 35)Torsten Lodderstedt
 
SAML VS OAuth 2.0 VS OpenID Connect
SAML VS OAuth 2.0 VS OpenID ConnectSAML VS OAuth 2.0 VS OpenID Connect
SAML VS OAuth 2.0 VS OpenID ConnectUbisecure
 
REST Service Authetication with TLS & JWTs
REST Service Authetication with TLS & JWTsREST Service Authetication with TLS & JWTs
REST Service Authetication with TLS & JWTsJon Todd
 
OAuth 2.0 with IBM WebSphere DataPower
OAuth 2.0 with IBM WebSphere DataPowerOAuth 2.0 with IBM WebSphere DataPower
OAuth 2.0 with IBM WebSphere DataPowerShiu-Fun Poon
 
OAuth - Open API Authentication
OAuth - Open API AuthenticationOAuth - Open API Authentication
OAuth - Open API Authenticationleahculver
 

Tendances (20)

OAuth 2.0
OAuth 2.0OAuth 2.0
OAuth 2.0
 
OAuth2 - Introduction
OAuth2 - IntroductionOAuth2 - Introduction
OAuth2 - Introduction
 
OAuth 2.0 and OpenID Connect
OAuth 2.0 and OpenID ConnectOAuth 2.0 and OpenID Connect
OAuth 2.0 and OpenID Connect
 
OAuth 2
OAuth 2OAuth 2
OAuth 2
 
Demystifying SAML 2.0,Oauth 2.0, OpenID Connect
Demystifying SAML 2.0,Oauth 2.0, OpenID ConnectDemystifying SAML 2.0,Oauth 2.0, OpenID Connect
Demystifying SAML 2.0,Oauth 2.0, OpenID Connect
 
Demystifying OAuth 2.0
Demystifying OAuth 2.0Demystifying OAuth 2.0
Demystifying OAuth 2.0
 
OpenId Connect Protocol
OpenId Connect ProtocolOpenId Connect Protocol
OpenId Connect Protocol
 
OAuth2 + API Security
OAuth2 + API SecurityOAuth2 + API Security
OAuth2 + API Security
 
Implementing OAuth
Implementing OAuthImplementing OAuth
Implementing OAuth
 
OAuth
OAuthOAuth
OAuth
 
OpenID Connect 4 SSI
OpenID Connect 4 SSIOpenID Connect 4 SSI
OpenID Connect 4 SSI
 
Rest API Security - A quick understanding of Rest API Security
Rest API Security - A quick understanding of Rest API SecurityRest API Security - A quick understanding of Rest API Security
Rest API Security - A quick understanding of Rest API Security
 
Token, token... From SAML to OIDC
Token, token... From SAML to OIDCToken, token... From SAML to OIDC
Token, token... From SAML to OIDC
 
LDAP
LDAPLDAP
LDAP
 
FIDO2 Specifications Overview
FIDO2 Specifications OverviewFIDO2 Specifications Overview
FIDO2 Specifications Overview
 
OpenID for Verifiable Credentials (IIW 35)
OpenID for Verifiable Credentials (IIW 35)OpenID for Verifiable Credentials (IIW 35)
OpenID for Verifiable Credentials (IIW 35)
 
SAML VS OAuth 2.0 VS OpenID Connect
SAML VS OAuth 2.0 VS OpenID ConnectSAML VS OAuth 2.0 VS OpenID Connect
SAML VS OAuth 2.0 VS OpenID Connect
 
REST Service Authetication with TLS & JWTs
REST Service Authetication with TLS & JWTsREST Service Authetication with TLS & JWTs
REST Service Authetication with TLS & JWTs
 
OAuth 2.0 with IBM WebSphere DataPower
OAuth 2.0 with IBM WebSphere DataPowerOAuth 2.0 with IBM WebSphere DataPower
OAuth 2.0 with IBM WebSphere DataPower
 
OAuth - Open API Authentication
OAuth - Open API AuthenticationOAuth - Open API Authentication
OAuth - Open API Authentication
 

En vedette

Securing RESTful APIs using OAuth 2 and OpenID Connect
Securing RESTful APIs using OAuth 2 and OpenID ConnectSecuring RESTful APIs using OAuth 2 and OpenID Connect
Securing RESTful APIs using OAuth 2 and OpenID ConnectJonathan LeBlanc
 
OAuth 2.0 & OpenID Connect @ OpenSource Conference 2011 Tokyo #osc11tk
OAuth 2.0 & OpenID Connect @ OpenSource Conference 2011 Tokyo #osc11tkOAuth 2.0 & OpenID Connect @ OpenSource Conference 2011 Tokyo #osc11tk
OAuth 2.0 & OpenID Connect @ OpenSource Conference 2011 Tokyo #osc11tkNov Matake
 
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...CA API Management
 
OpenID Authentication by example
OpenID Authentication by exampleOpenID Authentication by example
OpenID Authentication by exampleChris Vertonghen
 
OpenID Connect and Single Sign-On for Beginners
OpenID Connect and Single Sign-On for BeginnersOpenID Connect and Single Sign-On for Beginners
OpenID Connect and Single Sign-On for BeginnersSalesforce Developers
 
OpenID Connect - a simple[sic] single sign-on & identity layer on top of OAut...
OpenID Connect - a simple[sic] single sign-on & identity layer on top of OAut...OpenID Connect - a simple[sic] single sign-on & identity layer on top of OAut...
OpenID Connect - a simple[sic] single sign-on & identity layer on top of OAut...Brian Campbell
 

En vedette (6)

Securing RESTful APIs using OAuth 2 and OpenID Connect
Securing RESTful APIs using OAuth 2 and OpenID ConnectSecuring RESTful APIs using OAuth 2 and OpenID Connect
Securing RESTful APIs using OAuth 2 and OpenID Connect
 
OAuth 2.0 & OpenID Connect @ OpenSource Conference 2011 Tokyo #osc11tk
OAuth 2.0 & OpenID Connect @ OpenSource Conference 2011 Tokyo #osc11tkOAuth 2.0 & OpenID Connect @ OpenSource Conference 2011 Tokyo #osc11tk
OAuth 2.0 & OpenID Connect @ OpenSource Conference 2011 Tokyo #osc11tk
 
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...
 
OpenID Authentication by example
OpenID Authentication by exampleOpenID Authentication by example
OpenID Authentication by example
 
OpenID Connect and Single Sign-On for Beginners
OpenID Connect and Single Sign-On for BeginnersOpenID Connect and Single Sign-On for Beginners
OpenID Connect and Single Sign-On for Beginners
 
OpenID Connect - a simple[sic] single sign-on & identity layer on top of OAut...
OpenID Connect - a simple[sic] single sign-on & identity layer on top of OAut...OpenID Connect - a simple[sic] single sign-on & identity layer on top of OAut...
OpenID Connect - a simple[sic] single sign-on & identity layer on top of OAut...
 

Similaire à OpenID Connect Explained

#5 WSO2 Masterclassitalia - WSO2 Identity Server, un approccio OAUTH2
#5 WSO2 Masterclassitalia - WSO2 Identity Server, un approccio OAUTH2#5 WSO2 Masterclassitalia - WSO2 Identity Server, un approccio OAUTH2
#5 WSO2 Masterclassitalia - WSO2 Identity Server, un approccio OAUTH2Profesia Srl, Lynx Group
 
OpenID for Verifiable Credentials
OpenID for Verifiable CredentialsOpenID for Verifiable Credentials
OpenID for Verifiable CredentialsTorsten Lodderstedt
 
OpenID Connect - An Emperor or Just New Cloths?
OpenID Connect - An Emperor or Just New Cloths?OpenID Connect - An Emperor or Just New Cloths?
OpenID Connect - An Emperor or Just New Cloths?Oliver Pfaff
 
Introduction to the Globus Platform for Developers
Introduction to the Globus Platform for DevelopersIntroduction to the Globus Platform for Developers
Introduction to the Globus Platform for DevelopersGlobus
 
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
 
OAuth 2.0 for Web and Native (Mobile) App Developers
OAuth 2.0 for Web and Native (Mobile) App DevelopersOAuth 2.0 for Web and Native (Mobile) App Developers
OAuth 2.0 for Web and Native (Mobile) App DevelopersPrabath Siriwardena
 
Microsoft Graph API Delegated Permissions
Microsoft Graph API Delegated PermissionsMicrosoft Graph API Delegated Permissions
Microsoft Graph API Delegated PermissionsStefan Weber
 
Introducing OpenID 1.0 Protocol: Security and Performance
Introducing OpenID 1.0 Protocol: Security and PerformanceIntroducing OpenID 1.0 Protocol: Security and Performance
Introducing OpenID 1.0 Protocol: Security and PerformanceAmin Saqi
 
Protecting web APIs with OAuth 2.0
Protecting web APIs with OAuth 2.0Protecting web APIs with OAuth 2.0
Protecting web APIs with OAuth 2.0Vladimir Dzhuvinov
 
OAuth2 and OpenID with Spring Boot
OAuth2 and OpenID with Spring BootOAuth2 and OpenID with Spring Boot
OAuth2 and OpenID with Spring BootGeert Pante
 
Wso2 is integration with .net core
Wso2 is   integration with .net coreWso2 is   integration with .net core
Wso2 is integration with .net coreIsmaeel Enjreny
 
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
 
Implementing OpenID for Your Social Networking Site
Implementing OpenID for Your Social Networking SiteImplementing OpenID for Your Social Networking Site
Implementing OpenID for Your Social Networking SiteDavid Keener
 
The OpenID Connect Protocol
The OpenID Connect ProtocolThe OpenID Connect Protocol
The OpenID Connect ProtocolClément OUDOT
 
Oauth2 and OWSM OAuth2 support
Oauth2 and OWSM OAuth2 supportOauth2 and OWSM OAuth2 support
Oauth2 and OWSM OAuth2 supportGaurav Sharma
 
OAuth 2.0 - The fundamentals, the good , the bad, technical primer and commo...
OAuth 2.0  - The fundamentals, the good , the bad, technical primer and commo...OAuth 2.0  - The fundamentals, the good , the bad, technical primer and commo...
OAuth 2.0 - The fundamentals, the good , the bad, technical primer and commo...Good Dog Labs, Inc.
 
OAuth and OpenID Connect for PSD2 and Third-Party Access
OAuth and OpenID Connect for PSD2 and Third-Party AccessOAuth and OpenID Connect for PSD2 and Third-Party Access
OAuth and OpenID Connect for PSD2 and Third-Party AccessNordic APIs
 
OAuth with Salesforce - Demystified
OAuth with Salesforce - DemystifiedOAuth with Salesforce - Demystified
OAuth with Salesforce - DemystifiedCalvin Noronha
 

Similaire à OpenID Connect Explained (20)

#5 WSO2 Masterclassitalia - WSO2 Identity Server, un approccio OAUTH2
#5 WSO2 Masterclassitalia - WSO2 Identity Server, un approccio OAUTH2#5 WSO2 Masterclassitalia - WSO2 Identity Server, un approccio OAUTH2
#5 WSO2 Masterclassitalia - WSO2 Identity Server, un approccio OAUTH2
 
OpenID for Verifiable Credentials
OpenID for Verifiable CredentialsOpenID for Verifiable Credentials
OpenID for Verifiable Credentials
 
OpenID Connect - An Emperor or Just New Cloths?
OpenID Connect - An Emperor or Just New Cloths?OpenID Connect - An Emperor or Just New Cloths?
OpenID Connect - An Emperor or Just New Cloths?
 
Introduction to the Globus Platform for Developers
Introduction to the Globus Platform for DevelopersIntroduction to the Globus Platform for Developers
Introduction to the Globus Platform for Developers
 
OpenID for SSI
OpenID for SSIOpenID for SSI
OpenID for SSI
 
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 ...
 
OAuth 2.0 for Web and Native (Mobile) App Developers
OAuth 2.0 for Web and Native (Mobile) App DevelopersOAuth 2.0 for Web and Native (Mobile) App Developers
OAuth 2.0 for Web and Native (Mobile) App Developers
 
Full stack security
Full stack securityFull stack security
Full stack security
 
Microsoft Graph API Delegated Permissions
Microsoft Graph API Delegated PermissionsMicrosoft Graph API Delegated Permissions
Microsoft Graph API Delegated Permissions
 
Introducing OpenID 1.0 Protocol: Security and Performance
Introducing OpenID 1.0 Protocol: Security and PerformanceIntroducing OpenID 1.0 Protocol: Security and Performance
Introducing OpenID 1.0 Protocol: Security and Performance
 
Protecting web APIs with OAuth 2.0
Protecting web APIs with OAuth 2.0Protecting web APIs with OAuth 2.0
Protecting web APIs with OAuth 2.0
 
OAuth2 and OpenID with Spring Boot
OAuth2 and OpenID with Spring BootOAuth2 and OpenID with Spring Boot
OAuth2 and OpenID with Spring Boot
 
Wso2 is integration with .net core
Wso2 is   integration with .net coreWso2 is   integration with .net core
Wso2 is integration with .net core
 
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"
 
Implementing OpenID for Your Social Networking Site
Implementing OpenID for Your Social Networking SiteImplementing OpenID for Your Social Networking Site
Implementing OpenID for Your Social Networking Site
 
The OpenID Connect Protocol
The OpenID Connect ProtocolThe OpenID Connect Protocol
The OpenID Connect Protocol
 
Oauth2 and OWSM OAuth2 support
Oauth2 and OWSM OAuth2 supportOauth2 and OWSM OAuth2 support
Oauth2 and OWSM OAuth2 support
 
OAuth 2.0 - The fundamentals, the good , the bad, technical primer and commo...
OAuth 2.0  - The fundamentals, the good , the bad, technical primer and commo...OAuth 2.0  - The fundamentals, the good , the bad, technical primer and commo...
OAuth 2.0 - The fundamentals, the good , the bad, technical primer and commo...
 
OAuth and OpenID Connect for PSD2 and Third-Party Access
OAuth and OpenID Connect for PSD2 and Third-Party AccessOAuth and OpenID Connect for PSD2 and Third-Party Access
OAuth and OpenID Connect for PSD2 and Third-Party Access
 
OAuth with Salesforce - Demystified
OAuth with Salesforce - DemystifiedOAuth with Salesforce - Demystified
OAuth with Salesforce - Demystified
 

Plus de Vladimir Dzhuvinov

Криптография за уеб и мобилни разработчици
Криптография за уеб и мобилни разработчициКриптография за уеб и мобилни разработчици
Криптография за уеб и мобилни разработчициVladimir Dzhuvinov
 
Mind patterns and anti-patterns
Mind patterns and anti-patternsMind patterns and anti-patterns
Mind patterns and anti-patternsVladimir Dzhuvinov
 
Cross-domain requests with CORS
Cross-domain requests with CORSCross-domain requests with CORS
Cross-domain requests with CORSVladimir Dzhuvinov
 
Plovdev 2013: How to be a better programmer, beyond programming
Plovdev 2013: How to be a better programmer, beyond programmingPlovdev 2013: How to be a better programmer, beyond programming
Plovdev 2013: How to be a better programmer, beyond programmingVladimir Dzhuvinov
 
Binding components, events + data sources in HTML + JS
Binding components, events + data sources in HTML + JSBinding components, events + data sources in HTML + JS
Binding components, events + data sources in HTML + JSVladimir Dzhuvinov
 

Plus de Vladimir Dzhuvinov (7)

Криптография за уеб и мобилни разработчици
Криптография за уеб и мобилни разработчициКриптография за уеб и мобилни разработчици
Криптография за уеб и мобилни разработчици
 
New money
New moneyNew money
New money
 
Mind patterns and anti-patterns
Mind patterns and anti-patternsMind patterns and anti-patterns
Mind patterns and anti-patterns
 
Cross-domain requests with CORS
Cross-domain requests with CORSCross-domain requests with CORS
Cross-domain requests with CORS
 
JSON Web Tokens (JWT)
JSON Web Tokens (JWT)JSON Web Tokens (JWT)
JSON Web Tokens (JWT)
 
Plovdev 2013: How to be a better programmer, beyond programming
Plovdev 2013: How to be a better programmer, beyond programmingPlovdev 2013: How to be a better programmer, beyond programming
Plovdev 2013: How to be a better programmer, beyond programming
 
Binding components, events + data sources in HTML + JS
Binding components, events + data sources in HTML + JSBinding components, events + data sources in HTML + JS
Binding components, events + data sources in HTML + JS
 

Dernier

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
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
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
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
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
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
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
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
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 

Dernier (20)

The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
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
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
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...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
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
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
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
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 

OpenID Connect Explained

  • 3. OpenID Connect is a new internet standard for Single Sign-On (SSO) Identity Provision (IdP)
  • 5. OpenID Connect is good for social apps consumer apps enterprise apps mobile apps
  • 6. OpenID Connect is backed by Microsoft Google Ping Salesforce Oracle … us and many others
  • 7. 1. Need to authenticate a user? 2. Send user to their OpenID provider (via browser / HTTP 302 redirect) 3. Get identity token back OpenID Connect distilled
  • 8. The key OpenID Connect object Client apps receive an ID token from the OpenID Provider ID Token asserts the user's identity (user ID)
  • 9. ID token The ID token resembles the concept of an identity card, in a standard digital format that client apps can validate. ● Asserts the user's identity. ● Has an issuing authority (the IdP). ● May specify how (strength, factors) and when the user was authenticated. ● Is generated for a particular audience (client). ● Has an issue and an expiration date. ● May contain details such as the user's name, email address and other profile information. ● Is digitally signed, so the intended recipients can verify it. ● May optionally be encrypted for confidentiality.
  • 10. ID token internals ● Encoded as a JSON Web Token (JWT). ● The claims about the authenticated end-user (subject) are packaged in a simple JSON object. ● Digitally signed with the OpenID Provider's RSA or EC key. ● Is URL-safe. {  "iss"   : "https://c2id.com",  "sub"   : "alice",  "aud"   : "s6BhdRkqt3",  "nonce" : "n­0S6_WzA2Mj",  "exp"   : 1311281970,  "iat"   : 1311280970,  "acr"   : "http://loa.c2id.com/high",  "amr"   : [ "mfa", "pwd", "otp" ] }
  • 12. Cool ID token uses ● Simple stateless session management for JavaScript and single-page applications. ● Universal passport for all your users and applications, regardless of where they came from – social networks, partner businesses and organisations, local accounts. ● May be passed to 3rd parties to assert the user's identity. ● May be exchanged for an access token at the token endpoint of an OAuth 2.0 authorisation server. See draft- ietf-oauth-token-exchange-05.
  • 13. Via the OAuth 2.0 protocol flows How to obtain an ID token?
  • 14. Choose a flow to suit your app ● Authorisation code flow – for typical web and mobile apps – the client is typically authenticated – tokens retrieved via back channel ● Implicit flow – for JavaScript applications that run in the browser – the client is not authenticated – tokens returned via front-channel, revealed to browser ● Hybrid flow – allows app front-end and back-end to receive tokens independently – rarely used http://openid.net/specs/openid-connect-core-1_0.html#Authentication
  • 15. The OpenID auth request (code flow) Send the user to the OpenID provider with an authentication request: https://openid.provider.com/authorize? response_type=code &scope=openid &client_id=s6BhdRkqt3 &state=af0ifjsldkj &redirect_uri=https%3A%2 %2Fclient.example.org%2Fcb
  • 16. The OpenID auth response (code flow) If the user is successfully authenticatted the OpenID provider will redirect the browser back to the client app with an authorisation code: https://client.example.org/cb? code=SplxlOBeZQQYbYS6WxSbIA &state=af0ifjsldkj
  • 17. The OpenID auth response (code flow) If the authentication request cannot be fulfilled for some reason the OpenID provider may return an error code: https://client.example.org/cb? error=access_denied &state=af0ifjsldkj
  • 18. Exchange code for ID token (code flow) Makes a back channel request to exchange the code for an ID token. Note that the client authenticates itself to the server here! POST /token HTTP/1.1 Host: openid.provider.com Content-Type: application/x-www-form-urlencoded Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW grant_type=authorization_code &code=SplxlOBeZQQYbYS6WxSbIA &redirect_uri=https%3A%2F%2Fclient.example.org%2Fcb
  • 19. Exchange code for ID token (code flow) Finally, we have our ID token! But what's this access token? HTTP/1.1 200 OK Content-Type: application/json Cache-Control: no-store Pragma: no-cache { "access_token": "SlAV32hkKG", "token_type": "Bearer", "refresh_token": "8xLOxBtZp8", "expires_in": 3600, "id_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjFlOWdkazc..." }
  • 20. UserInfo { "sub" : "alice", "name" : "Alice Adams", "given_name" : "Alice", "family_name" : "Adams", "email" : "alice@wonderland.net", "email_verified" : true, "phone_number" : "+359 (99) 100200305", "profile" : "https://c2id.com/users/alice", "ldap_groups" : [ "audit", "admin" ] } OpenID Connect defines an extensible JSON schema for releasing consented user details to client applications
  • 21. Requesting UserInfo with the OpenID auth request Send user to OpenID provider with auth request: https://openid.provider.com/authorize? response_type=code &scope=openid%20profile%20email &client_id=s6BhdRkqt3 &state=af0ifjsldkj &redirect_uri=https%3A%2 %2Fclient.example.org%2Fcb
  • 22. Access token Resembles the concept of a physical token or ticket. Permits the bearer access to a specific resource or service. Has typically an expiration associated with it. ● OAuth 2.0 access tokens are employed in OpenID Connect to allow the client application to retrieve consented user details from a UserInfo endpoint. ● The server may extend the access token scope to allow the client access to other protected resources and web APIs. ● The client treats the access token as a simple opaque string to be passed with the HTTP request to the protected resource.
  • 23. UserInfo request with access token Put the obtained bearer token in the authorization header of your outgoing HTTPS request: GET /userinfo HTTP/1.1 Host: server.example.com Authorization: Bearer SlAV32hkKG
  • 24. UserInfo response Sample response from the UserInfo endpoint, with the consented details (claims / assertions) about the user: HTTP/1.1 200 OK Content-Type: application/json { "sub" : "alice", "name" : "Alice Adams", "email" : "alice@wonderland.net", "email_verified" : true, "phone_number" : "+359 (99) 100200305", "profile" : "https://c2id.com/users/alice", "ldap_groups" : [ "audit", "admin" ] }
  • 25. The two OpenID Connect tokens summed up ID Token asserts the user's identity (user ID) Access Token optional, to retrieve consented UserInfo
  • 26. OpenID Connect rides on top of OAuth 2.0 ● User identity is asserted by means of JSON Web Tokens (JWT) ● Clients use standard OAuth 2.0 flows to obtain ID tokens ● Guiding mantra: Simple clients, complexity absorbed by the server ● Any method for authenticating users – LDAP, tokens, biometrics, etc. ● JSON schema for UserInfo ● Supports optional OpenID provider discovery, dynamic client registration and session management. ● Extensible to suit many use cases. ● Federation is possible. OpenID Connect OAuth 2.0 JOSE + JWT
  • 27. OpenID Connect provider endpoints ● Core provider endpoints: – Authorisation endpoint – Token endpoint – UserInfo endpoint ● Optional provider endpoints: – WebFinger endpoint – Provider metadata URI – Provider JWK set URI – Client registration endpoint – Session management endpoint HTTP Endpoints
  • 28. Optional endpoints ● WebFinger : Enables dynamic discovery of the OpenID Connect provider for a user based on their email address. ● Provider configuration URI : Well-known URL of a JSON document advertising the endpoints and capabilities of the OpenID provider. Helps the client apps to auto-configure their OpenID Connect requests. ● Provider JWK set URI : JSON document containing the OpenID provider's public (typically RSA) keys in JSON Web Key (JWK) format. These keys are used to sign the issued ID tokens and other artefacts. ● Client registration : Enables client apps to register dynamically, then update their details or unregister. Registration may be open (public). ● Session management : Enables client apps to check if a logged in user has an active session with the OpenID provider. Also to signal logout.
  • 29. The future: dynamic discovery + client registration alice@wonderland.net ID token for Alice
  • 30. The specifications ● OpenID Connect: http://openid.net/connect ● OAuth 2.0 (RFC 6749): http://tools.ietf.org/html/rfc6749 ● OAuth 2.0 Bearer token (RFC 6750): http://tools.ietf.org/html/rfc6750 ● JSON Web Token: http://tools.ietf.org/html/rfc7519 ● JSON Web Signature: http://tools.ietf.org/html/rfc7515 ● JSON Web Encryption: http://tools.ietf.org/html/rfc7516 ● JSON Web Key: http://tools.ietf.org/html/rfc7517
  • 31. Thank You! Q + A Get these slides from http://connect2id.com/assets/oidc-explained.pdf