SlideShare a Scribd company logo
Overview of OAuth and OpenID Connect
The Nuts and Bolts of API Security
By Travis Spencer, CEO
@travisspencer, @2botech
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved
ü All API Conferences
ü API Community
ü Active blogosphere
Organizers
and founders
Agenda
§ The security challenge in context
§ OAuth 2 Fundamentals
§ Building OpenID Connect on OAuth
§ 2 example use cases
Copyright © 2013-2014 Twobo Technologies AB. All rights reserved
API Security == API Keys
§ Problem solved!
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
API Security != API Keys
§ Revocable, un-audienced, non-expiring, bearer access
tokens
§ Symmetric keys
§ Passwords!
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
API Security == OAuth
§ Problem solved for real this time?
Not that easy! Sorry L
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
Crucial Security Concerns
Enterprise Security API Security Mobile Security
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
Identity is Central
MDM MAM
Mobile
Security
API
Security
Enterprise
Security
Identity
Venn diagram by Gunnar Peterson
AuthZ
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
The Neo-security Stack
JSON Identity Suite
OpenID Connect
SCIM
OAuth 2
Provisioning
Identities
Federation
Delegated Access
Authorization
U2FAuthentication
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
§ OAuth 2 is a protocol of protocols
§ Used as the base of other specifications
§ OpenID Connect, UMA, HEART, etc.
§ Addresses some important requirements
§ Delegated access
§ No password sharing
§ Revocation of access
OAuth
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
1. Resource Owner (RO)
2. Client
3. Authorization Server (AS)
4. Resource Server (RS) (i.e., API)
Getatoken
Delegate
RSClient
AS
RO
Use a token
OAuth Actors
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
Request, Authenticate & Consent
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
The Client Requests Access
Resource Owner (RO) Authorization Server (AS)
Resource Server (RS)Client
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
The AS Requires the RO to Authenticate
Resource Owner (RO) Authorization Server (AS)
Resource Server (RS)Client
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
The AS Issues the One-time Use Code
Resource Owner (RO) Authorization Server (AS)
Resource Server (RS)Client
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
The Client Redeems the One-time Use Code
Resource Owner (RO) Authorization Server (AS)
Resource Server (RS)Client
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
The AS Issues the Token
Resource Owner (RO) Authorization Server (AS)
Resource Server (RS)Client
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
The Client Presents the Token to the RS
Resource Owner (RO) Authorization Server (AS)
Resource Server (RS)Client
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
The RS Validates the Token
Resource Owner (RO)
Resource Server (RS)Client
Authorization Server (AS)
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
Access!
Resource Owner (RO) Authorization Server (AS)
Resource Server (RS)Client
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
§ Like permissions
§ Scopes specify extent of tokens’ usefulness
§ Listed on consent UI (if shown)
§ No standardized scopes
Scopes
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
Kinds of Tokens
Access Tokens
Like a Session
Used to secure API calls
Refresh Tokens
Like a Password
Used to get new access tokens
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
Holder of Key
HoK tokens are like
credit cards
Profiles of Tokens
Bearer
Bearer tokens are like
cash
$
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
Types of Tokens
§ WS-Security
§ SAML
§ Custom
§ Home-grown
§ Oracle Access Manager
§ SiteMinder
§ JWT
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
JWT Tokens
§ Pronounced like the English word “jot”
§ Lightweight tokens passed in HTTP headers & query strings
§ Akin to SAML tokens
§ Less expressive
§ Less security options
§ More compact
§ Encoded w/ JSON not XML
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
Passing Tokens
123XYZ
John Doe
By Value By Reference
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
Not for authentication
Not really for authorization
Not for federation
Improper Usage of OAuth
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
For delegated access
User to app delegation in particular
Proper Usage of OAuth
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
• Next generation federation
protocol
– Based on OAuth 2
– Made for mobile
– Not backward compatible
• Client & API receive tokens
• User info endpoint provided for
client to get user data
OpenID Connect
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
Get user info using
access token
OpenID Connect Example
OAuth AS / OpenID
Provider
RP / Client
Browser
Access code
Send code to get
access token
Access token & ID token
Check audience
restriction of ID token
Request login,
providing “openid”
scope & user info
scopes
User info
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
ID Token is for Client
§ Access token is for API; ID token is for client
§ ID token provides client with info about
§ Intended client recipient
§ Username
§ Credential used to login
§ Issuer of token
§ Expiration time
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
User Info Endpoint
§ Token issuance and user discovery
endpoint
§ Authenticate using bearer access
token issued by OpenID Provider
§ Output depends on requested and
authorized scopes
§ sub claim must match sub claim in ID
token
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
Applying All this to Micro-services
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
All Micro-services Accept JWTs
Resource Owner (RO)
But translate!
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
Translate from by-ref to by-value in gateway
Resource Owner (RO)
123
XYZ
API Firewall /
Reverse Proxy
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
Additional Resources
§ Blog posts
§ bit.ly/oauth-deep-dive
§ bit.ly/4-api-security-defenses
§ bit.ly/building-secure-api
§ bit.ly/right-api-armor
§ API keys http://bit.ly/2dI9Z7Q
§ Videos
§ bit.ly/oauth-in-depth
§ bit.ly/micro-services-security
§ bit.ly/building-secure-api-video
§ API security insights
§ http://nordicapis.com/api-
insights/security/
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
For more information, visit curity.io
Summary
§ API security > API keys & OAuth
§ OAuth 2 fundamentals
§ Token types
§ Profiles
§ Passing tokens
§ Building OpenID Connect on OAuth
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved
Thank you!
Copyright © 2013-2017 Twobo Technologies AB. All rights reserved
Secure your APIs using OAuth 2 and OpenID Connect

More Related Content

PPTX
OAuth 2.0 and the Internet of Things (IoT) (Jacob Ideskog)
PDF
Launching a Successful and Secure API
PDF
1400 ping madsen-nordicapis-connect-01
PDF
Integrated social solutions, the power and pitfalls of mashups
PDF
Who’s Knocking? Identity for APIs, Web and Mobile
PDF
Open APIs - Risks and Rewards (Øredev 2013)
PDF
Incorporating OAuth: How to integrate OAuth into your mobile app
PDF
OAuth and OpenID Connect for Microservices
OAuth 2.0 and the Internet of Things (IoT) (Jacob Ideskog)
Launching a Successful and Secure API
1400 ping madsen-nordicapis-connect-01
Integrated social solutions, the power and pitfalls of mashups
Who’s Knocking? Identity for APIs, Web and Mobile
Open APIs - Risks and Rewards (Øredev 2013)
Incorporating OAuth: How to integrate OAuth into your mobile app
OAuth and OpenID Connect for Microservices

What's hot (20)

PDF
Authorization The Missing Piece of the Puzzle
PDF
Neo-security Stack
PDF
OAuth & OpenID Connect Deep Dive
PDF
Nordic APIs - Integrated Social Solutions for a Cloudy, Mobile World
PDF
Transforming organizations into platforms
PPTX
Incorporating OAuth
PPTX
OAuth Assisted Token Flow for Single Page Applications
PDF
OpenID Connect Explained
PDF
Nordic APIs - Building a Secure API
PDF
Designing an API
PDF
Twobo LDAP Attribute Store for ADFS
PDF
OpenID Connect: The new standard for connecting to your Customers, Partners, ...
PDF
CIS14: Consolidating Authorization for API and Web SSO using OpenID Connect
PDF
CIS 2015 OpenID Connect and Mobile Applications - David Chase
PPTX
Mit 2014 introduction to open id connect and o-auth 2
PDF
SSL Certificate and Code Signing
PDF
Security Cas And Open Id
PPTX
OAuth 2.0 and Mobile Devices: Is that a token in your phone in your pocket or...
PPTX
The JSON-based Identity Protocol Suite
PPTX
Why Assertion-based Access Token is preferred to Handle-based one?
Authorization The Missing Piece of the Puzzle
Neo-security Stack
OAuth & OpenID Connect Deep Dive
Nordic APIs - Integrated Social Solutions for a Cloudy, Mobile World
Transforming organizations into platforms
Incorporating OAuth
OAuth Assisted Token Flow for Single Page Applications
OpenID Connect Explained
Nordic APIs - Building a Secure API
Designing an API
Twobo LDAP Attribute Store for ADFS
OpenID Connect: The new standard for connecting to your Customers, Partners, ...
CIS14: Consolidating Authorization for API and Web SSO using OpenID Connect
CIS 2015 OpenID Connect and Mobile Applications - David Chase
Mit 2014 introduction to open id connect and o-auth 2
SSL Certificate and Code Signing
Security Cas And Open Id
OAuth 2.0 and Mobile Devices: Is that a token in your phone in your pocket or...
The JSON-based Identity Protocol Suite
Why Assertion-based Access Token is preferred to Handle-based one?
Ad

Similar to Secure your APIs using OAuth 2 and OpenID Connect (20)

PDF
AT&T 2012 DevLab Speech API Deep Dive
PPTX
Platform Security that will Last for Decades (Travis Spencer)
PPTX
Microservices architecture
PDF
OAuth in the Real World featuring Webshell
PDF
ITB 2023 - The Many Layers of OAuth - Keith Casey .pdf
PDF
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
PDF
Deep dive into the Open Banking payments flows
PDF
gRPC vs REST: let the battle begin!
PDF
An Introduction to AWS IoT - Web Summit Lisbon
PDF
The Future is Now: What’s New in ForgeRock Access Management
PPTX
The Hitchhiker's Guide to the Land of OAuth
PDF
OAuth2 - The Swiss Army Framework
PDF
What is Hyperledger | Blockchain Technology | Blockchain Tutorial for Beginne...
PDF
Blockchain Wallet | Blockchain Tutorial for Beginners | Blockchain Training ...
PPTX
API Security: Securing Digital Channels and Mobile Apps Against Hacks
PDF
Serverless Software Architecture - Gears 17
PPTX
Code on the chain! An introduction in writing smart contracts and tooling for...
PDF
Oauth Nightmares Abstract OAuth Nightmares
PDF
Liferay as a headless platform
PDF
Using OAuth with PHP
AT&T 2012 DevLab Speech API Deep Dive
Platform Security that will Last for Decades (Travis Spencer)
Microservices architecture
OAuth in the Real World featuring Webshell
ITB 2023 - The Many Layers of OAuth - Keith Casey .pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
Deep dive into the Open Banking payments flows
gRPC vs REST: let the battle begin!
An Introduction to AWS IoT - Web Summit Lisbon
The Future is Now: What’s New in ForgeRock Access Management
The Hitchhiker's Guide to the Land of OAuth
OAuth2 - The Swiss Army Framework
What is Hyperledger | Blockchain Technology | Blockchain Tutorial for Beginne...
Blockchain Wallet | Blockchain Tutorial for Beginners | Blockchain Training ...
API Security: Securing Digital Channels and Mobile Apps Against Hacks
Serverless Software Architecture - Gears 17
Code on the chain! An introduction in writing smart contracts and tooling for...
Oauth Nightmares Abstract OAuth Nightmares
Liferay as a headless platform
Using OAuth with PHP
Ad

More from Nordic APIs (20)

PPTX
How to Choose the Right API Platform - We Have the Tool You Need! - Mikkel Iv...
PPTX
Bulletproof Backend Architecture: Building Adaptive Services with Self-Descri...
PDF
Implementing Zero Trust Security in API Gateway with Cilium - Pubudu Gunatila...
PPTX
Event-Driven Architecture the Cloud-Native Way - Manuel Ottlik, HDI Global SE
PPTX
Navigating the Post-OpenAPI Era with Innovative API Design Frameworks - Danie...
PDF
Using Typespec for Open Finance Standards - Chris Wood, Ozone API
PPTX
Schema-first API Design Using Typespec - Cailin Smith, Microsoft
PPTX
Avoiding APIpocalypse; API Resiliency Testing FTW! - Naresh Jain, Xnsio
PPTX
How to Build an Integration Platform with Open Source - Magnus Hedner, Benify
PPTX
API Design First in Practise – An Experience Report - Hari Krishnan, Specmatic
PPTX
The Right Kind of API – How To Choose Appropriate API Protocols and Data Form...
PPTX
Why Frequent API Hackathons Are Key to Product Market Feedback and Go-to-Mark...
PPTX
Maximizing API Management Efficiency: The Power of Shifting Down with APIOps ...
PPTX
APIs Vs Events - Bala Bairapaka, Sandvik AB
PPTX
GraphQL in the Post-Hype Era - Daniel Hervas, Reckon Digital
PPTX
From Good API Design to Secure Design - Axel Grosse, 42Crunch
PPTX
API Revolution in IoT: How Platform Engineering Streamlines API Development -...
PPTX
Unlocking the ROI of API Platforms: What Success Actually Looks Like - Budhad...
PDF
Increase Your Productivity with No-Code GraphQL Mocking - Hugo Guerrero, Red Hat
PPTX
Securely Boosting Any Product with Generative AI APIs - Ruben Sitbon, Theodo ...
How to Choose the Right API Platform - We Have the Tool You Need! - Mikkel Iv...
Bulletproof Backend Architecture: Building Adaptive Services with Self-Descri...
Implementing Zero Trust Security in API Gateway with Cilium - Pubudu Gunatila...
Event-Driven Architecture the Cloud-Native Way - Manuel Ottlik, HDI Global SE
Navigating the Post-OpenAPI Era with Innovative API Design Frameworks - Danie...
Using Typespec for Open Finance Standards - Chris Wood, Ozone API
Schema-first API Design Using Typespec - Cailin Smith, Microsoft
Avoiding APIpocalypse; API Resiliency Testing FTW! - Naresh Jain, Xnsio
How to Build an Integration Platform with Open Source - Magnus Hedner, Benify
API Design First in Practise – An Experience Report - Hari Krishnan, Specmatic
The Right Kind of API – How To Choose Appropriate API Protocols and Data Form...
Why Frequent API Hackathons Are Key to Product Market Feedback and Go-to-Mark...
Maximizing API Management Efficiency: The Power of Shifting Down with APIOps ...
APIs Vs Events - Bala Bairapaka, Sandvik AB
GraphQL in the Post-Hype Era - Daniel Hervas, Reckon Digital
From Good API Design to Secure Design - Axel Grosse, 42Crunch
API Revolution in IoT: How Platform Engineering Streamlines API Development -...
Unlocking the ROI of API Platforms: What Success Actually Looks Like - Budhad...
Increase Your Productivity with No-Code GraphQL Mocking - Hugo Guerrero, Red Hat
Securely Boosting Any Product with Generative AI APIs - Ruben Sitbon, Theodo ...

Recently uploaded (20)

PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
history of c programming in notes for students .pptx
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
System and Network Administration Chapter 2
PPT
Introduction Database Management System for Course Database
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PPTX
ai tools demonstartion for schools and inter college
PPTX
Computer Software and OS of computer science of grade 11.pptx
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Digital Systems & Binary Numbers (comprehensive )
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Wondershare Filmora 15 Crack With Activation Key [2025
VVF-Customer-Presentation2025-Ver1.9.pptx
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
history of c programming in notes for students .pptx
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Reimagine Home Health with the Power of Agentic AI​
Understanding Forklifts - TECH EHS Solution
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
System and Network Administration Chapter 2
Introduction Database Management System for Course Database
2025 Textile ERP Trends: SAP, Odoo & Oracle
Which alternative to Crystal Reports is best for small or large businesses.pdf
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
CHAPTER 2 - PM Management and IT Context
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
ai tools demonstartion for schools and inter college
Computer Software and OS of computer science of grade 11.pptx
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf

Secure your APIs using OAuth 2 and OpenID Connect

  • 1. Overview of OAuth and OpenID Connect The Nuts and Bolts of API Security By Travis Spencer, CEO @travisspencer, @2botech Copyright © 2013-2017 Twobo Technologies AB. All rights reserved
  • 2. ü All API Conferences ü API Community ü Active blogosphere Organizers and founders
  • 3. Agenda § The security challenge in context § OAuth 2 Fundamentals § Building OpenID Connect on OAuth § 2 example use cases Copyright © 2013-2014 Twobo Technologies AB. All rights reserved
  • 4. API Security == API Keys § Problem solved! Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 5. API Security != API Keys § Revocable, un-audienced, non-expiring, bearer access tokens § Symmetric keys § Passwords! Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 6. API Security == OAuth § Problem solved for real this time? Not that easy! Sorry L Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 7. Crucial Security Concerns Enterprise Security API Security Mobile Security Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 8. Identity is Central MDM MAM Mobile Security API Security Enterprise Security Identity Venn diagram by Gunnar Peterson AuthZ Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 9. The Neo-security Stack JSON Identity Suite OpenID Connect SCIM OAuth 2 Provisioning Identities Federation Delegated Access Authorization U2FAuthentication Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 10. § OAuth 2 is a protocol of protocols § Used as the base of other specifications § OpenID Connect, UMA, HEART, etc. § Addresses some important requirements § Delegated access § No password sharing § Revocation of access OAuth Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 11. 1. Resource Owner (RO) 2. Client 3. Authorization Server (AS) 4. Resource Server (RS) (i.e., API) Getatoken Delegate RSClient AS RO Use a token OAuth Actors Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 12. Request, Authenticate & Consent Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 13. The Client Requests Access Resource Owner (RO) Authorization Server (AS) Resource Server (RS)Client Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 14. The AS Requires the RO to Authenticate Resource Owner (RO) Authorization Server (AS) Resource Server (RS)Client Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 15. The AS Issues the One-time Use Code Resource Owner (RO) Authorization Server (AS) Resource Server (RS)Client Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 16. The Client Redeems the One-time Use Code Resource Owner (RO) Authorization Server (AS) Resource Server (RS)Client Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 17. The AS Issues the Token Resource Owner (RO) Authorization Server (AS) Resource Server (RS)Client Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 18. The Client Presents the Token to the RS Resource Owner (RO) Authorization Server (AS) Resource Server (RS)Client Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 19. The RS Validates the Token Resource Owner (RO) Resource Server (RS)Client Authorization Server (AS) Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 20. Access! Resource Owner (RO) Authorization Server (AS) Resource Server (RS)Client Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 21. § Like permissions § Scopes specify extent of tokens’ usefulness § Listed on consent UI (if shown) § No standardized scopes Scopes Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 22. Kinds of Tokens Access Tokens Like a Session Used to secure API calls Refresh Tokens Like a Password Used to get new access tokens Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 23. Holder of Key HoK tokens are like credit cards Profiles of Tokens Bearer Bearer tokens are like cash $ Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 24. Types of Tokens § WS-Security § SAML § Custom § Home-grown § Oracle Access Manager § SiteMinder § JWT Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 25. JWT Tokens § Pronounced like the English word “jot” § Lightweight tokens passed in HTTP headers & query strings § Akin to SAML tokens § Less expressive § Less security options § More compact § Encoded w/ JSON not XML Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 26. Passing Tokens 123XYZ John Doe By Value By Reference Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 27. Not for authentication Not really for authorization Not for federation Improper Usage of OAuth Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 28. For delegated access User to app delegation in particular Proper Usage of OAuth Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 29. • Next generation federation protocol – Based on OAuth 2 – Made for mobile – Not backward compatible • Client & API receive tokens • User info endpoint provided for client to get user data OpenID Connect Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 30. Get user info using access token OpenID Connect Example OAuth AS / OpenID Provider RP / Client Browser Access code Send code to get access token Access token & ID token Check audience restriction of ID token Request login, providing “openid” scope & user info scopes User info Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 31. ID Token is for Client § Access token is for API; ID token is for client § ID token provides client with info about § Intended client recipient § Username § Credential used to login § Issuer of token § Expiration time Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 32. User Info Endpoint § Token issuance and user discovery endpoint § Authenticate using bearer access token issued by OpenID Provider § Output depends on requested and authorized scopes § sub claim must match sub claim in ID token Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 33. Applying All this to Micro-services Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 34. All Micro-services Accept JWTs Resource Owner (RO) But translate! Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 35. Translate from by-ref to by-value in gateway Resource Owner (RO) 123 XYZ API Firewall / Reverse Proxy Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 36. Additional Resources § Blog posts § bit.ly/oauth-deep-dive § bit.ly/4-api-security-defenses § bit.ly/building-secure-api § bit.ly/right-api-armor § API keys http://bit.ly/2dI9Z7Q § Videos § bit.ly/oauth-in-depth § bit.ly/micro-services-security § bit.ly/building-secure-api-video § API security insights § http://nordicapis.com/api- insights/security/ Copyright © 2013-2017 Twobo Technologies AB. All rights reserved @travisspencer / @2botech
  • 37. For more information, visit curity.io
  • 38. Summary § API security > API keys & OAuth § OAuth 2 fundamentals § Token types § Profiles § Passing tokens § Building OpenID Connect on OAuth Copyright © 2013-2017 Twobo Technologies AB. All rights reserved
  • 39. Thank you! Copyright © 2013-2017 Twobo Technologies AB. All rights reserved