SlideShare a Scribd company logo
KEVINDOCKX
https://www.kevindockx.com
OPENID CONNECT
IN-DEPTH
In this session, you’ll learn about
less-than-obvious OIDC
approaches and use cases
KEVINDOCKX
MARVIN
HI, I’M KEVIN
@KevinDockx
https://www.kevindockx.com
https://github.com/KevinDockx
Freelance solution architect
focused on APIs and security
Microsoft MVP
Pluralsight Author
2
KEVINDOCKX
MARVIN
COMING UP
SSOn/SSOut
Reference tokens & token revocation
API to API communication on behalf of the user
3
KEVINDOCKX
MARVIN
Given multiple
applications, using the
same set of credentials, a
user should only provide
these credentials once
4
KEVINDOCKX
MARVIN
SINGLE SIGN-ON
id_token
Application A
IDP
id_token
Application B
KEVINDOCKX
MARVIN
DEMO TIME Time to dive into code
6
KEVINDOCKX
MARVIN
SINGLE SIGN-OUT
Application A
IDP
Application B
KEVINDOCKX
MARVIN
SINGLE SIGN OUT: SPECIFICATIONS
8
Server-side
Front-Channel Logout
https://openid.net/specs/openid-connect-frontchannel-1_0.html
Back-Channel Logout
https://openid.net/specs/openid-connect-backchannel-1_0.html
KEVINDOCKX
MARVIN
SINGLE SIGN-OUT (SERVER, FRONT CHANNEL)
Application A IDP
Application B
sign-out endpoint
sign-out endpoint
iframe (hidden)
logged out
iframe (hidden)
KEVINDOCKX
MARVIN
SINGLE SIGN OUT: SPECIFICATIONS
10
Client-side
OIDC Session Management (also front-channel)
https://openid.net/specs/openid-connect-session-1_0.html
KEVINDOCKX
MARVIN
SINGLE SIGN-OUT (USER AGENT, FRONT CHANNEL)
Application B IDP
Application C
(user agent based)
sign-out endpoint
iframe (hidden)
logged out
hidden iframe polling
check_session_iframe
(URI from discovery
document)
KEVINDOCKX
MARVIN
DEMO TIME Time to dive into code
12
KEVINDOCKX
MARVIN
SELF-CONTAINED VS REFERENCE TOKENS
13
JWT (self-contained) Reference token
{
"nbf": 1568970856,
"exp": 1568974456,
"iss": "https://localhost:44391",
"aud": [ "https://localhost:44391/
resources", "api1"],
"client_id": "webclient",
"sub": "818727",
"email": "AliceSmith@email.com",
"scope": ["openid", "email",
"api1"]
}
fe1370fab9e1c7f9edd0d85427f98e6da2fb28d27689fd030fc0042c56
d6e406
KEVINDOCKX
MARVIN
SELF-CONTAINED VS REFERENCE TOKENS
14
A self-contained token (JWT) is a protected data structure
with claims and an expiration
• Once the API knows about the public key to verify the signature, no
additional communication with the IDP is required
• A self-contained token potentially grants access for as long as that
token hasn’t expired
• There is no mechanism to revoke self-contained tokens
KEVINDOCKX
MARVIN
SELF-CONTAINED VS REFERENCE TOKENS
15
A reference token is an identifier for the actual token
• It references a grant result (token) stored at IDP level
• Remove the grant result to revoke access ad hoc
• It requires communication with the IDP on each request
• The communication requirement is often tackled by caching the grant
result
KEVINDOCKX
MARVIN
DEMO TIME Time to dive into code
16
KEVINDOCKX
MARVIN
Use reference tokens for
tokens that leave the
company walls
17
KEVINDOCKX
MARVIN 18
Api1
{
sub: “kevin”,
aud: [“api1”]
}
Client
API TOAPIACCESS ON BEHALF OF THE USER
KEVINDOCKX
MARVIN
API TOAPIACCESS ON BEHALF OF THE USER
19
Api1
{
sub: “kevin”,
aud: [“api1”]
}
Client
Api2
KEVINDOCKX
MARVIN
API TOAPIACCESS ON BEHALF OF THE USER
20
Api1
{
sub: “kevin”,
aud: [“api1”]
}
Client
Api2
{
aud: [“api2”]
}
KEVINDOCKX
MARVIN
API TOAPIACCESS ON BEHALF OF THE USER
21
Api1
{
sub: “kevin”,
aud: [“api1”, “api2”]
}
Client
Api2
{
sub: “kevin”,
aud: [“api1”, “api2”]
}
KEVINDOCKX
MARVIN
API TOAPIACCESS ON BEHALF OF THE USER
22
Api1
{
sub: “kevin”,
aud: [“api1”, “api2”]
}
Client
Api2
{
sub: “kevin”,
aud: [“api1”, “api2”]
}
KEVINDOCKX
MARVIN
API TOAPIACCESS ON BEHALF OF THE USER
23
Api1
{
sub: “kevin”,
aud: [“api1”]
}
Client
Api2
{
sub: “kevin”,
aud: [“api2”]
}
KEVINDOCKX
MARVIN
API TOAPIACCESS ON BEHALF OF THE USER
24
Api1
{
sub: “kevin”,
aud: [“api1”]
}
Client
Api2
{
sub: “kevin”,
aud: [“api2”]
}
KEVINDOCKX
MARVIN
API TOAPIACCESS ON BEHALF OF THE USER
25
We need a custom flow
• OAuth2 was built with extensibility in mind
Token Exchange (proposed standard)
• https://tools.ietf.org/html/draft-ietf-oauth-token-exchange-19
• Describes how to safely exchange tokens for other tokens, including
how to request tokens for employing impersonation and delegation
• We can use impersonation semantics for this – we’re simply
“impersonating” our self
KEVINDOCKX
MARVIN
API TOAPIACCESS ON BEHALF OF THE USER
26
POST /as/token.oauth2 HTTP/1.1
Host: as.example.com
Content-Type: application/x-www-form-urlencoded
grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange
&subject_token=eyJhbGciOiJFUzI1NiIsImtpZCI6IjE2In0.eyJhdWQiOiJodHRwc
zovL2FzLmV4YW1wbGUuY29tIiwiaXNzIjoiaHR0cHM6Ly9vcmlnaW5hbC1pc3N1ZXI
uZXhhbXBsZS5uZXQiLCJleHAiOjE0NDE5MTA2MDAsIm5iZiI6MTQ0MTkwOTAwMCwic
3ViIjoiYmRjQGV4YW1wbGUubmV0Iiwic2NvcGUiOiJvcmRlcnMgcHJvZmlsZSBoaXN
0b3J5In0.PRBg-jXn4cJuj1gmYXFiGkZzRuzbXZ_sDxdE98ddW44ufsbWLKd3JJ1VZ
hF64pbTtfjy4VXFVBDaQpKjn5JzAw
&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token
KEVINDOCKX
MARVIN
DEMO TIME Time to dive into code
27
KEVINDOCKX
MARVIN
ADDITIONAL RESOURCES
Demo code on my Github
https://github.com/KevinDockx/
My Pluralsight Courses
https://app.pluralsight.com/profile/author/kevin-dockx
28
THANK YOU

More Related Content

PDF
You and your containers: strumenti di automazione in Cloud (parte 2) - Gabrie...
PDF
New NeXt for Advanced Developers
PDF
What's New with NGINX Application Security Solutions
PDF
API Gateway Use Cases​ for Kubernetes​
PDF
Batten Down the Hatches: A Practical Guide to Securing Kubernetes - RMISC 2019
PDF
Serverless Security: What's Left To Protect
PDF
Secrets as Code
PDF
Your Application Deserves Better than Kubernetes Ingress: Istio vs. Kubernetes
You and your containers: strumenti di automazione in Cloud (parte 2) - Gabrie...
New NeXt for Advanced Developers
What's New with NGINX Application Security Solutions
API Gateway Use Cases​ for Kubernetes​
Batten Down the Hatches: A Practical Guide to Securing Kubernetes - RMISC 2019
Serverless Security: What's Left To Protect
Secrets as Code
Your Application Deserves Better than Kubernetes Ingress: Istio vs. Kubernetes

What's hot (20)

PDF
apidays LIVE Paris - Creating a scalable ecosystem of Microservices by Archan...
PDF
Security in Serverless world
PDF
Designing & Building Secure Web APIs
PPTX
CyberArk Impact 2017 - REST for the Rest of Us
PDF
Monitoring NGINX Deployments with Sumo Logic
PPTX
Hacking Tizen : The OS of Everything - Nullcon Goa 2015
PPTX
Stève Sfartz - Meeting rooms are talking! Are you listening? - Codemotion Ber...
PDF
Demystifying AuthN/AuthZ Using OIDC & OAuth2
PDF
HITCON Defense Summit 2019 - 從 SAST 談持續式資安測試
PPTX
Lacework | Top 10 Cloud Security Threats
PDF
Securing Serverless - By Breaking In
PDF
Security in the FaaS Lane
PPTX
Serverless - minimizing the attack surface
PDF
Modern Web 2019 從零開始加入自動化資安測試
PDF
Prepare to defend thyself with Blue/Green
PPTX
AWS Security Week | Getting to Continuous Security and Compliance Monitoring ...
PDF
Lviv MD Day 2015 Анастасія Войтова "Data transfer security for mobile apps: w...
PDF
JSCONF 2018 - Baking security into DevOps - a tale of hunting down bugs befor...
PDF
OWASP AppSecEu 2016 Rome - Building secure cloud native apps
PDF
Automated Infrastructure Security: Monitoring using FOSS
apidays LIVE Paris - Creating a scalable ecosystem of Microservices by Archan...
Security in Serverless world
Designing & Building Secure Web APIs
CyberArk Impact 2017 - REST for the Rest of Us
Monitoring NGINX Deployments with Sumo Logic
Hacking Tizen : The OS of Everything - Nullcon Goa 2015
Stève Sfartz - Meeting rooms are talking! Are you listening? - Codemotion Ber...
Demystifying AuthN/AuthZ Using OIDC & OAuth2
HITCON Defense Summit 2019 - 從 SAST 談持續式資安測試
Lacework | Top 10 Cloud Security Threats
Securing Serverless - By Breaking In
Security in the FaaS Lane
Serverless - minimizing the attack surface
Modern Web 2019 從零開始加入自動化資安測試
Prepare to defend thyself with Blue/Green
AWS Security Week | Getting to Continuous Security and Compliance Monitoring ...
Lviv MD Day 2015 Анастасія Войтова "Data transfer security for mobile apps: w...
JSCONF 2018 - Baking security into DevOps - a tale of hunting down bugs befor...
OWASP AppSecEu 2016 Rome - Building secure cloud native apps
Automated Infrastructure Security: Monitoring using FOSS
Ad

Similar to .NET Fest 2019. Kevin Dockx. OpenID Connect In Depth (20)

PPTX
.NET Fest 2019. Kevin Dockx. Uncovering Swagger/OpenAPI
PDF
cisco networking automation presentation.pdf
PPTX
Coding 102 REST API Basics Using Spark
PDF
stackconf 2021 | Continuous Security – integrating security into your pipelines
PDF
Application Security in ASP.NET Core
PDF
Streaming a Million Likes/Second: Real-Time Interactions on Live Video
PPTX
Protecting Applications with Lambda@Edge and OAuth
PDF
DEVNET-2138 - Managing OpenAPI Documents at Scale - clus24.pdf
PDF
Deploy and Secure Your API Gateway with NGINX: From Zero to Hero – APCJ
PDF
DevSecCon Boston 2018: Building a practical DevSecOps pipeline for free by Je...
PPTX
Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...
PDF
testupload
PDF
OpenID Connect 4 SSI (at EIC 2021)
PDF
Cyberlands Sales Deck
PPTX
Advanced coding & deployment for Cisco Video Devices - CL20B - DEVNET-3244
PDF
CredHub and Secure Credential Management
PDF
Embed Spark calling SDK in Your App - Olivier PROFFIT - Cisco Live Berlin 2017
PDF
[apidays LIVE HONK KONG] - OAS to Managed API in Seconds
PDF
PKI in DevOps: How to Deploy Certificate Automation within CI/CD
PPTX
Interop 2017 - Managing Containers in Production
.NET Fest 2019. Kevin Dockx. Uncovering Swagger/OpenAPI
cisco networking automation presentation.pdf
Coding 102 REST API Basics Using Spark
stackconf 2021 | Continuous Security – integrating security into your pipelines
Application Security in ASP.NET Core
Streaming a Million Likes/Second: Real-Time Interactions on Live Video
Protecting Applications with Lambda@Edge and OAuth
DEVNET-2138 - Managing OpenAPI Documents at Scale - clus24.pdf
Deploy and Secure Your API Gateway with NGINX: From Zero to Hero – APCJ
DevSecCon Boston 2018: Building a practical DevSecOps pipeline for free by Je...
Conclusion Code Cafe - Microcks for Mocking and Testing Async APIs (January 2...
testupload
OpenID Connect 4 SSI (at EIC 2021)
Cyberlands Sales Deck
Advanced coding & deployment for Cisco Video Devices - CL20B - DEVNET-3244
CredHub and Secure Credential Management
Embed Spark calling SDK in Your App - Olivier PROFFIT - Cisco Live Berlin 2017
[apidays LIVE HONK KONG] - OAS to Managed API in Seconds
PKI in DevOps: How to Deploy Certificate Automation within CI/CD
Interop 2017 - Managing Containers in Production
Ad

More from NETFest (20)

PDF
.NET Fest 2019. Николай Балакин. Микрооптимизации в мире .NET
PPTX
.NET Fest 2019. Сергей Калинец. Efficient Microservice Communication with .NE...
PPTX
.NET Fest 2019. Оля Гавриш. .NET Core 3.0 и будущее .NET
PPTX
.NET Fest 2019. Оля Гавриш. Машинное обучение для .NET программистов
PPTX
.NET Fest 2019. Roberto Freato. Provisioning Azure PaaS fluently with Managem...
PPTX
.NET Fest 2019. Halil Ibrahim Kalkan. Implementing Domain Driven Design
PPTX
.NET Fest 2019. Сергій Бута. Feature Toggles: Dynamic Configuration at Wirex
PPTX
.NET Fest 2019. Michael Staib. Hot Chocolate: GraphQL Schema Stitching with A...
PPTX
.NET Fest 2019. Андрей Литвинов. Async lifetime tests with xUnit and AutoFixture
PPTX
.NET Fest 2019. Анатолий Колесник. Love, Death & F# Tests
PPTX
.NET Fest 2019. Алексей Голуб. Монадные парсер-комбинаторы в C# (простой спос...
PPTX
.NET Fest 2019. Roberto Freato. Azure App Service deep dive
PPTX
.NET Fest 2019. Леонид Молотиевский. DotNet Core in production
PPTX
.NET Fest 2019. Александр Демчук. How to measure relationships within the Com...
PDF
.NET Fest 2019. Anna Melashkina та Philipp Bauknecht. Dragons in a Mixed Real...
PDF
.NET Fest 2019. Alex Thissen. Architecting .NET solutions in a Docker ecosystem
PPTX
.NET Fest 2019. Stas Lebedenko. Practical serverless use cases in Azure with ...
PPTX
.NET Fest 2019. Сергей Медведев. How serverless makes Integration TDD a reali...
PPTX
.NET Fest 2019. Сергей Корж. Natural Language Processing in .NET
PDF
.NET Fest 2019. Eran Stiller. Create Your Own Serverless PKI with .NET & Azur...
.NET Fest 2019. Николай Балакин. Микрооптимизации в мире .NET
.NET Fest 2019. Сергей Калинец. Efficient Microservice Communication with .NE...
.NET Fest 2019. Оля Гавриш. .NET Core 3.0 и будущее .NET
.NET Fest 2019. Оля Гавриш. Машинное обучение для .NET программистов
.NET Fest 2019. Roberto Freato. Provisioning Azure PaaS fluently with Managem...
.NET Fest 2019. Halil Ibrahim Kalkan. Implementing Domain Driven Design
.NET Fest 2019. Сергій Бута. Feature Toggles: Dynamic Configuration at Wirex
.NET Fest 2019. Michael Staib. Hot Chocolate: GraphQL Schema Stitching with A...
.NET Fest 2019. Андрей Литвинов. Async lifetime tests with xUnit and AutoFixture
.NET Fest 2019. Анатолий Колесник. Love, Death & F# Tests
.NET Fest 2019. Алексей Голуб. Монадные парсер-комбинаторы в C# (простой спос...
.NET Fest 2019. Roberto Freato. Azure App Service deep dive
.NET Fest 2019. Леонид Молотиевский. DotNet Core in production
.NET Fest 2019. Александр Демчук. How to measure relationships within the Com...
.NET Fest 2019. Anna Melashkina та Philipp Bauknecht. Dragons in a Mixed Real...
.NET Fest 2019. Alex Thissen. Architecting .NET solutions in a Docker ecosystem
.NET Fest 2019. Stas Lebedenko. Practical serverless use cases in Azure with ...
.NET Fest 2019. Сергей Медведев. How serverless makes Integration TDD a reali...
.NET Fest 2019. Сергей Корж. Natural Language Processing in .NET
.NET Fest 2019. Eran Stiller. Create Your Own Serverless PKI with .NET & Azur...

Recently uploaded (20)

PDF
VCE English Exam - Section C Student Revision Booklet
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
Pharma ospi slides which help in ospi learning
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Insiders guide to clinical Medicine.pdf
PDF
01-Introduction-to-Information-Management.pdf
PDF
Complications of Minimal Access Surgery at WLH
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
Cell Structure & Organelles in detailed.
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Sports Quiz easy sports quiz sports quiz
VCE English Exam - Section C Student Revision Booklet
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Module 4: Burden of Disease Tutorial Slides S2 2025
Pharma ospi slides which help in ospi learning
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
GDM (1) (1).pptx small presentation for students
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Insiders guide to clinical Medicine.pdf
01-Introduction-to-Information-Management.pdf
Complications of Minimal Access Surgery at WLH
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Renaissance Architecture: A Journey from Faith to Humanism
PPH.pptx obstetrics and gynecology in nursing
Anesthesia in Laparoscopic Surgery in India
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Cell Structure & Organelles in detailed.
102 student loan defaulters named and shamed – Is someone you know on the list?
Microbial disease of the cardiovascular and lymphatic systems
O7-L3 Supply Chain Operations - ICLT Program
Sports Quiz easy sports quiz sports quiz

.NET Fest 2019. Kevin Dockx. OpenID Connect In Depth