SlideShare a Scribd company logo
2015 Programming Layer
Authentication in Microservice
Systems
Dejan Glozic, Senior Technical StaïŹ€ Member

IBM Watson Data Platform
About Me
IBM Canada Toronto Lab
Senior Technical Staff Member
IBM Watson Data Platform
@dglozic
http://dejanglozic.com
Part 1
Setting the stage
Broccoli of topics
You know it is good for you, but you would rather eat
(React) ice cream.
Securing a single-page app
1. Secure UI endpoints
2. That’s it
Securing a microservice system
1. Secure each micro frontend
2. Secure each REST API micro service
3. Secure async messaging ïŹ‚ows
4. Don’t affect performance
5. Don’t leak micro service architecture to the user
Microservice grid
UI domain
API domain
Legacy
systems
Proxy
Events
UIAPI
Message‹
Broker Backend
Frontend
Disclaimer
I do not intend to teach you OAuth2 or JWT or JWK.

You can Google without my help.
Part 2
Building up the vocabulary
OAuth2 (RFC 6749)
‱ Industry-standard protocol for authorization
‱ Supersedes the work done on the original
OAuth protocol created in 2006
‱ Multiple ïŹ‚ows (‘grants’)
‱ Clients are issued ID and Secret
Bearer Tokens (RFC 6750)
‱ Sent to downstream REST APIs via Authorization header
‱ Can be opaque or JWT
‱ Provides for session-less APIs
JWT (RFC 7519)
‱ JSON Web Token
‱ Encoded, digitally signed, self-describing
‱ Can be validated programmatically
JWK (RF 7517)
‱ JSON Web Keys
‱ Provides for asymmetric signing of JWT
‱ Thou shalt never useth symmetric signing (promise!)
Part 3
Authentication in micro frontends
Identity provider
‱ Assists with OAuth2 authorization_code grant
‱ Challenges with user and password
‱ Optionally provides 2-factor auth
‱ Optionally federates with other systems using SAML
‱ Mints bearer tokens from authorization codes
#1 article at dejanglozic.com
UI authentication ïŹ‚ow
Load balancer
OAuth2‹
(Passport)
Session
Cache
(Redis)
Identity
Provider
Session cookie
Bearer token
UI
API
Leader/follower patternTM
OAuth2‹
(Passport)
Session
Cache
(Redis)
Identity
Provider
Load balancer Load balancer Load balancer Load balancer
Leader Follower Follower Follower
login
Synchronizing leaders
OAuth2‹
(Passport)
Session
Cache
(Redis)
Identity
Provider
Load balancer
Leader
Load balancer
Leader
Session
Cache
(Redis)
Login Sync Cookie
UI endpoint middleware
router.use(“/mypath", authHandler.checkAuth, mypathController);
‱ Redirects to login if not authenticated
‱ Synchronizes with other leaders
‱ Refreshes bearer token if expired
XHR endpoint middleware
router.use(“/api/myXHRpath”,‹
authHandler.checkXHR, myXHRpathController);
‱ Refreshes bearer token if expired
‱ If not logged in, returns 511
‱ Client code needs to catch 511 and reload
Part 4
Authentication in REST API micro services
Bearer token validation
Load balancer
DB
Bearer token
JWKS
Worth repeating
Thou shalt never useth symmetric JWT signage
Part 5
Authentication with asynchronous messages
Message broker path
Message‹
Broker
Queue
Load balancer
DB
Bearer token
No token!!
Help Jared calm down
‱ client_credentials grant
‱ Personal access tokens
‱ Service API keys + whitelists
Web Socket path
Message
Broker
Queue
Load balancer
NoSQL
DB
UI
Web Sockets
No token!!
Help Heath
 well, something
‱ All the same stuff as with Message
Brokers, plus

‱ Use the same session ID as Express
‱ express-socket.io-session
Conclusion
Do you have any ice cream?
Securing a microservice system
1. Secure each micro frontend
2. Secure each REST API micro service
3. Secure async messaging ïŹ‚ows (MQ and web sockets)
4. Don’t affect performance
5. Don’t leak micro service architecture to the user
Q/A
Thank you!
Follow me on Twitter: @dglozic

Read my blog: dejanglozic.com
IBM Watson Data Platform

More Related Content

PPTX
JWT SSO Inbound Authenticator
PPTX
ASP.NET Web Security
PDF
Microservices and Self-contained System to Scale Agile
PPTX
Secure your app with keycloak
PDF
Microservices - not just with Java
PDF
JavaOne 2014 - Securing RESTful Resources with OAuth2
PPTX
Keycloak for Science Gateways - SGCI Technology Sampler Webinar
PPTX
Building secure applications with keycloak
JWT SSO Inbound Authenticator
ASP.NET Web Security
Microservices and Self-contained System to Scale Agile
Secure your app with keycloak
Microservices - not just with Java
JavaOne 2014 - Securing RESTful Resources with OAuth2
Keycloak for Science Gateways - SGCI Technology Sampler Webinar
Building secure applications with keycloak

What's hot (20)

PDF
PPTX
K8s idm-devfest
PDF
SAML and Liferay
PDF
How Small Can Java Microservices Be?
PDF
Microservices: Architecture to Support Agile
PPTX
K8s rbac-sso
PPTX
Android app security
PPTX
presentation_finals
PDF
Foreman Single Sign-On Made Easy with Keycloak
PPTX
Securing Single Page Applications with Token Based Authentication
PPTX
API Security & Federation Patterns - Francois Lascelles, Chief Architect, Lay...
PPTX
IdP, SAML, OAuth
PDF
Keycloak Single Sign-On
PDF
Building an API Security Ecosystem
PPT
Web 20 Security - Vordel
PPTX
CIS 2012 - Going Mobile with PingFederate and OAuth 2
PPT
SynapseIndia dotnet website security development
PDF
Spring Security
PDF
Securing java web applications
PDF
Access Management for Cloud and Mobile
K8s idm-devfest
SAML and Liferay
How Small Can Java Microservices Be?
Microservices: Architecture to Support Agile
K8s rbac-sso
Android app security
presentation_finals
Foreman Single Sign-On Made Easy with Keycloak
Securing Single Page Applications with Token Based Authentication
API Security & Federation Patterns - Francois Lascelles, Chief Architect, Lay...
IdP, SAML, OAuth
Keycloak Single Sign-On
Building an API Security Ecosystem
Web 20 Security - Vordel
CIS 2012 - Going Mobile with PingFederate and OAuth 2
SynapseIndia dotnet website security development
Spring Security
Securing java web applications
Access Management for Cloud and Mobile
Ad

Similar to Authentication in microservice systems - fsto 2017 (20)

PPTX
Microservices security - jpmc tech fest 2018
PDF
Secured REST Microservices with Spring Cloud
PPTX
Microservices Manchester: Authentication in Microservice Systems by David Borsos
PDF
muCon 2016: Authentication in Microservice Systems By David Borsos
PDF
Authentication in microservice systems
PDF
API Security In Cloud Native Era
 
PDF
APIsecure 2023 - OAuth, OIDC and protecting third-party credentials, Ed Olson...
PDF
Securing Web Applications with Token Authentication
PPTX
Micro Web Service - Slim and JWT
PPTX
Building Secure User Interfaces With JWTs (JSON Web Tokens)
PPTX
Securing Microservices with Spring Cloud Security
PPTX
Microservice security with spring security 5.1,Oauth 2.0 and open id connect
PPTX
Token Authentication for Java Applications
PDF
Beyond API Authorization
PDF
Building Highly Secure Cloud-Native Applications on PAS with Ease - Jignesh S...
PPT
Securing RESTful API
PDF
Implementing Microservices Security Patterns & Protocols with Spring
PDF
The Role of IAM in Microservices
 
PPTX
Building Secure User Interfaces With JWTs
PPTX
Complete Guide to Setup Secure Scheme for Restful APIs
Microservices security - jpmc tech fest 2018
Secured REST Microservices with Spring Cloud
Microservices Manchester: Authentication in Microservice Systems by David Borsos
muCon 2016: Authentication in Microservice Systems By David Borsos
Authentication in microservice systems
API Security In Cloud Native Era
 
APIsecure 2023 - OAuth, OIDC and protecting third-party credentials, Ed Olson...
Securing Web Applications with Token Authentication
Micro Web Service - Slim and JWT
Building Secure User Interfaces With JWTs (JSON Web Tokens)
Securing Microservices with Spring Cloud Security
Microservice security with spring security 5.1,Oauth 2.0 and open id connect
Token Authentication for Java Applications
Beyond API Authorization
Building Highly Secure Cloud-Native Applications on PAS with Ease - Jignesh S...
Securing RESTful API
Implementing Microservices Security Patterns & Protocols with Spring
The Role of IAM in Microservices
 
Building Secure User Interfaces With JWTs
Complete Guide to Setup Secure Scheme for Restful APIs
Ad

Recently uploaded (20)

PDF
top salesforce developer skills in 2025.pdf
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
Essential Infomation Tech presentation.pptx
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
medical staffing services at VALiNTRY
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
ai tools demonstartion for schools and inter college
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Digital Strategies for Manufacturing Companies
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
history of c programming in notes for students .pptx
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
Odoo POS Development Services by CandidRoot Solutions
top salesforce developer skills in 2025.pdf
Operating system designcfffgfgggggggvggggggggg
Wondershare Filmora 15 Crack With Activation Key [2025
CHAPTER 2 - PM Management and IT Context
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Softaken Excel to vCard Converter Software.pdf
Essential Infomation Tech presentation.pptx
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
medical staffing services at VALiNTRY
Navsoft: AI-Powered Business Solutions & Custom Software Development
How to Migrate SBCGlobal Email to Yahoo Easily
ai tools demonstartion for schools and inter college
Which alternative to Crystal Reports is best for small or large businesses.pdf
Reimagine Home Health with the Power of Agentic AI​
Design an Analysis of Algorithms I-SECS-1021-03
Digital Strategies for Manufacturing Companies
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
history of c programming in notes for students .pptx
2025 Textile ERP Trends: SAP, Odoo & Oracle
Odoo POS Development Services by CandidRoot Solutions

Authentication in microservice systems - fsto 2017