SlideShare a Scribd company logo
1 of 49
Download to read offline
Building an Effective Architecture for
Identity and Access Management
JorgeAlvarez
alvarez.jeap@gmail.com
GitHub: @jealvarez
Twitter: @edlask8
Disclaimer
The point of views, thoughts and opinions
expressed in this presentation belongs only to
the presenter and not necessarily to the
presenter’s employer, organization, committee
or other group or individual.
About Me
Agenda
• Challenges
• Keycloak Overview
• Why shouldI use Keycloak?
• CoreConcepts
• TechnologyStack
• Server Architecture
• Single Sign-on/ Single Logout
• Tokens
• Calling Backing Services
• Supported Platforms
• Demo
• Summary
• Bibliography
Challenges
The old way
• Securing monolithic web application
relatively easy
• Username and Password
• Credentials verified against table in
database
• HTTP Session stores in security
context
User Interface
Logic
Data
The new way
• Multiple applications
• Multiple variants of each application
• Multiple services
• Multiple logins
• Multiple databases
• Multiple devices
[AuthZ] [AuthN]
Are you lookingfor a single
sign-on solutionthatenables
you to secure newor legacy
applicationsandeasilyuse
federatedidentityproviders
such as socialnetworks?
You should look at
Keycloak
Keycloak
Overview
Project
• Java based AuthN and AuthZ server
• Started in 2013
• Current Version 11.0.3
• ~ Every 5 weeks
• Commercial Offering Available
• Red Hat SSO
• Have you logged into
developers.redhat.com or
www.openshift.com?
• Community
• 400+ Contributors
• Very robust, good documentation, many
examples
Why should I use
Keycloak?
Features (1/3)
• Support multiple database engines
Adaptability
• Social networking logins
• Federation
• LDAP
• Active Directory
• Adapters for different frameworks
• Spring
• NodeJS
• NetCore
• …
Integration
Features (2/3)
• Clustering
Scalability
• Keycloak Service Provider Interface
• Enables to implement your own authenticatoror federator
Extensibility
• Session management
• Force logouts
• Determine how many sessions your system currently has
Centralization
Features
Features (3/3)
Core Concepts
Core Concepts
Realm
Identity
Provider
User
Federation
Themes
Roles
Clients
User
Groups
Facebook
Google
…
OpenID
Connect
SAML
LDAP
Kerberos
Authentication
Client
Scopes
Sessions
Events
Active
Directory
Technology Stack
Technology Stack
Admin Console
❖ AngularJS
❖ React
❖ PatternFly
❖ Bootstrap
Keycloak Server
❖ WildFly
❖ JPA
❖ RestEasy
❖ Freemarker
❖ Arquillian
❖ Infinispan
Server
Architecture
Overview
Keycloak
2
Keycloak1
SSO Protocols
Protocol Mapper
Infinispan
Events
Social
Login
User Storage
JPA
User
Federation
Realm
Clients, Users, AuthN,
AuthZ, Policies, …
Account
Login
Identity
Brokering
Sessions
Realms
Settings
…
Replication
Infinispan
HTTP
Endpoint
Single Sign-on
How it works?
Single Sign-on
• Login only once to access all
applications
SSO
• OpenID Connect
• Build on top of OAuth2
Standardized Protocols
• Logouts can be propagated to
applications
Support for Single Logout
Tokens are associatedwith a session
Unauthenticated User
Unauthenticated user accesses to Application
1
Application redirectsto Keycloak
2
User submits credentials
2.1
Credentials
2.2
Keycloak creates SSO Session and
Emits Cookies
Generates Code and redirects the user back to
the Application
3
Application exchangesCode to Tokens
4
Application verifies receivedTokens
5
User is signed-in to the application
6
1
2.2
2.1
5
3
2
4
6
Generates Code
Keycloak detects SSO Session
9
Authenticated User
…
Authenticateduse accesses other application
7
Other application redirects user to Keycloak to
sign-in
8
Other application exchangescode for tokens
10
Other application verifies receivedtokens
11
7
11
9
8
10
12
Redirectsto other application
Tokens are associatedwith a session
User is signed-in to the other application
12
Keycloak creates logout request to another
application
3
Single Logout
User initiates logout
1
Application creates logoutrequest to Keycloak
2
Keycloak terminates session
4
2
4
1
Application returns response logout to
Keycloak
3.1
Applicationsdo logout
5
2.1
3.1
3
5
5
Keycloak returns response logout to the
application
2.1
Tokens
Overview
Essential Token Types
• Access Token
• Short lived [Minutes+]
• Used for accessingresources
• RefreshToken
• Long lived [Hours+]
• Used for requestingnew tokens
• ID Token
• Containsuser information(OIDC)
• Offline Token
• Long lived [Days+]
• Refreshtoken that never expires
Keycloak Tokens
• OAuth2 / OpenID Connect
• Signed self-contained JWT
• Claims
• Key-Value Pairs + User Information +
Metadata
• Issued by Keycloak
• Signed with Realm Private Key
• Verified with Realm
• Realm Public Key
• Limited lifespan
• Can be revoked
JSON Web Tokens
<header-base64>. <payload-base64>. <signature-base64>
Note
Base64 means Encoding
Encoding != Encryption
Calling Backend
Services
The backend looks up the Realm Public Key in
cache with the kid from the JWT
3
Calling Backend Services
Authenticateduse accesses to the application
1
Application uses the access token in the http
header to access to the backend
2
The backend verifies signature of the access
token with the Realm Public Key
4
2
4
1
The backend grants access and returns data
5
If not found, then fetch Public Key with
kid from Keycloak
3.1
Keycloak returnsRealm Public Key
3.2
The applicationcan displaythe data
6
Authorization:Bearer
eyJhbGciOiJSUzI1NiIsInR5cCIg…
5
3
3.1
3.2
6
kid
public key
access
token
data
User can access to the data
7
7
Supported
Platforms
RESTAPI
Bearer
Frontend
Confidential
Frontend
Public
Frontend
Confidential
Authorization:Bearer
eyJhbGciOiJSUzI1NiIsInR5cCIg…
Single Sign-on
System’s Architecture
Authorization:Bearer
eyJhbGcizI1NiIsInOiJSUR5cCIg…
Summary
Summary (1/2)
• Unzip and Run
• Docker Images
So easy to get started with
• Single Sign-on
• Single Logout
• Federation
• User Management
• Social Logins
• …
Provides many features out of the box
Summary (2/2)
Build on proven a robust standards
• OAuth 2.0
• OpenID Connect 1.0
• SAML2.0
Extensible
• Custom
• Authenticationmechanisms
• Event Listeners
• Themes
• …
Easy to integrate
• Adapters available for different frameworks
…
Bibliography
Useful links
Keycloak
Website
Keycloak
Community
Extensions
Keycloak
Docker Images
Keycloak
Quickstart
Projects
OpenID
Connect
SAML
JSON Web
Tokens
Email: alvarez.jeap@gmail.com
Github: @jealvarez
Twitter: @edlask8

More Related Content

Similar to Building an Effective Architecture for Identity and Access Management.pdf

Keycloak for Science Gateways - SGCI Technology Sampler Webinar
Keycloak for Science Gateways - SGCI Technology Sampler WebinarKeycloak for Science Gateways - SGCI Technology Sampler Webinar
Keycloak for Science Gateways - SGCI Technology Sampler Webinarmarcuschristie
 
Self-Service x Hashicorp Vault
Self-Service x Hashicorp VaultSelf-Service x Hashicorp Vault
Self-Service x Hashicorp VaultMartin Conraux
 
Introduction to sitecore identity
Introduction to sitecore identityIntroduction to sitecore identity
Introduction to sitecore identityGopikrishna Gujjula
 
Adding Identity Management and Access Control to your App
Adding Identity Management and Access Control to your AppAdding Identity Management and Access Control to your App
Adding Identity Management and Access Control to your AppFIWARE
 
Managing your secrets in a cloud environment
Managing your secrets in a cloud environmentManaging your secrets in a cloud environment
Managing your secrets in a cloud environmentTaswar Bhatti
 
Part 5 of the REAL Webinars on Oracle Cloud Native Application Development - ...
Part 5 of the REAL Webinars on Oracle Cloud Native Application Development - ...Part 5 of the REAL Webinars on Oracle Cloud Native Application Development - ...
Part 5 of the REAL Webinars on Oracle Cloud Native Application Development - ...Lucas Jellema
 
Web API 2 Token Based Authentication
Web API 2 Token Based AuthenticationWeb API 2 Token Based Authentication
Web API 2 Token Based Authenticationjeremysbrown
 
SharePoint Authentication And Authorization SPTechCon San Francisco
SharePoint Authentication And Authorization SPTechCon San FranciscoSharePoint Authentication And Authorization SPTechCon San Francisco
SharePoint Authentication And Authorization SPTechCon San FranciscoLiam Cleary [MVP]
 
Building IAM for OpenStack
Building IAM for OpenStackBuilding IAM for OpenStack
Building IAM for OpenStackSteve Martinelli
 
Adding identity management and access control to your app
Adding identity management and access control to your appAdding identity management and access control to your app
Adding identity management and access control to your appÁlvaro Alonso González
 
WebLogic authentication debugging
WebLogic authentication debuggingWebLogic authentication debugging
WebLogic authentication debuggingMaarten Smeets
 
Shifting security left simplifying security for k8s open shift environments
Shifting security left simplifying security for k8s open shift environmentsShifting security left simplifying security for k8s open shift environments
Shifting security left simplifying security for k8s open shift environmentsLibbySchulze
 
Securing Microservices using Play and Akka HTTP
Securing Microservices using Play and Akka HTTPSecuring Microservices using Play and Akka HTTP
Securing Microservices using Play and Akka HTTPRafal Gancarz
 
Securing .NET Core, ASP.NET Core applications
Securing .NET Core, ASP.NET Core applicationsSecuring .NET Core, ASP.NET Core applications
Securing .NET Core, ASP.NET Core applicationsNETUserGroupBern
 
FIWARE Training: Identity Management and Access Control
FIWARE Training: Identity Management and Access ControlFIWARE Training: Identity Management and Access Control
FIWARE Training: Identity Management and Access ControlFIWARE
 
Access Management for Cloud and Mobile
Access Management for Cloud and MobileAccess Management for Cloud and Mobile
Access Management for Cloud and MobileForgeRock
 
GSoC Mideterm-OAuth2 Module
GSoC Mideterm-OAuth2 ModuleGSoC Mideterm-OAuth2 Module
GSoC Mideterm-OAuth2 ModuleMayank Sharma
 

Similar to Building an Effective Architecture for Identity and Access Management.pdf (20)

Keycloak for Science Gateways - SGCI Technology Sampler Webinar
Keycloak for Science Gateways - SGCI Technology Sampler WebinarKeycloak for Science Gateways - SGCI Technology Sampler Webinar
Keycloak for Science Gateways - SGCI Technology Sampler Webinar
 
Self-Service x Hashicorp Vault
Self-Service x Hashicorp VaultSelf-Service x Hashicorp Vault
Self-Service x Hashicorp Vault
 
SSL Everywhere!
SSL Everywhere!SSL Everywhere!
SSL Everywhere!
 
Introduction to sitecore identity
Introduction to sitecore identityIntroduction to sitecore identity
Introduction to sitecore identity
 
Adding Identity Management and Access Control to your App
Adding Identity Management and Access Control to your AppAdding Identity Management and Access Control to your App
Adding Identity Management and Access Control to your App
 
Managing your secrets in a cloud environment
Managing your secrets in a cloud environmentManaging your secrets in a cloud environment
Managing your secrets in a cloud environment
 
Part 5 of the REAL Webinars on Oracle Cloud Native Application Development - ...
Part 5 of the REAL Webinars on Oracle Cloud Native Application Development - ...Part 5 of the REAL Webinars on Oracle Cloud Native Application Development - ...
Part 5 of the REAL Webinars on Oracle Cloud Native Application Development - ...
 
Web API 2 Token Based Authentication
Web API 2 Token Based AuthenticationWeb API 2 Token Based Authentication
Web API 2 Token Based Authentication
 
SharePoint Authentication And Authorization SPTechCon San Francisco
SharePoint Authentication And Authorization SPTechCon San FranciscoSharePoint Authentication And Authorization SPTechCon San Francisco
SharePoint Authentication And Authorization SPTechCon San Francisco
 
Building IAM for OpenStack
Building IAM for OpenStackBuilding IAM for OpenStack
Building IAM for OpenStack
 
Intro to Apache Shiro
Intro to Apache ShiroIntro to Apache Shiro
Intro to Apache Shiro
 
Adding identity management and access control to your app
Adding identity management and access control to your appAdding identity management and access control to your app
Adding identity management and access control to your app
 
WebLogic authentication debugging
WebLogic authentication debuggingWebLogic authentication debugging
WebLogic authentication debugging
 
Shifting security left simplifying security for k8s open shift environments
Shifting security left simplifying security for k8s open shift environmentsShifting security left simplifying security for k8s open shift environments
Shifting security left simplifying security for k8s open shift environments
 
Securing Microservices using Play and Akka HTTP
Securing Microservices using Play and Akka HTTPSecuring Microservices using Play and Akka HTTP
Securing Microservices using Play and Akka HTTP
 
Securing .NET Core, ASP.NET Core applications
Securing .NET Core, ASP.NET Core applicationsSecuring .NET Core, ASP.NET Core applications
Securing .NET Core, ASP.NET Core applications
 
FIWARE Training: Identity Management and Access Control
FIWARE Training: Identity Management and Access ControlFIWARE Training: Identity Management and Access Control
FIWARE Training: Identity Management and Access Control
 
Access Management for Cloud and Mobile
Access Management for Cloud and MobileAccess Management for Cloud and Mobile
Access Management for Cloud and Mobile
 
GSoC Mideterm-OAuth2 Module
GSoC Mideterm-OAuth2 ModuleGSoC Mideterm-OAuth2 Module
GSoC Mideterm-OAuth2 Module
 
Vault
VaultVault
Vault
 

Recently uploaded

main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
EduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIEduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIkoyaldeepu123
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 

Recently uploaded (20)

main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
EduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AIEduAI - E learning Platform integrated with AI
EduAI - E learning Platform integrated with AI
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 

Building an Effective Architecture for Identity and Access Management.pdf