SlideShare a Scribd company logo
Keycloak Theme
configurations
HOW TO CHANGE DEFAULT KEYCLOAOK THEMEHow to change the default Keycloak theme
Page 1 of 6
Content
Keycloak themes…………………………………………………..02
Before adding new themes…………………………………..03
Add new themes……………………………………………………03
Create your own theme………………………………………..05
What is theme.property file ?..............................06
Change styles related to your theme……………………06
Change the template structure…………………………….06
Page 2 of 6
Keycloak themes
• First, configure Keycloak server with Spring Boot application.
• Keycloak themes can be changed after login to the Keycloak dashboard as admin.
• Go to Realm settings and select Themes tab.
• Now you can see some options about themes and language support.
• There are several options to change the default theme.
• It can be changed the Login theme, Account theme, Admin console theme…etc.
• By default, two themes are provided (base and keycloak) for each option.
Page 3 of 6
Before adding new themes
• Before adding new themes, some configurations need to be done.
• According to Keycloak documentation theme caching and template caching can be disabled. This allows user
to edit themes without restarting the Keycloak server.
• To change this, go to the standalone directory and then go inside configuration.
Keycloak -> standalone -> configuration -> standalone.xml
• There are several files, but only standalone.xml should be changed.
• Please change it as follows.
• But please remember the re-enable it in production!!!
Add new themes
• New themes can be added, where Keycloak server is installed.
• Basically, Keycloak server looks like this. Please refer following image.
Page 4 of 6
• New themes should be added to themes directory.
• By default, three Themes are available (base, keycloak and keycloak-preview)
• Base theme consists of basic template files for each page without styles. It acts as the parent.
• Keycloak theme extends Base theme and it has some specific styles.
• Documentation says not to edit preloaded themes, instead create your own theme and extends the base theme
according to your requirements.
• You can change themes for account, admin, email, login and welcome pages. Above directory names should
be exactly same. You cannot change those directory names.
Page 5 of 6
Create your own theme
• Let’s create a new theme called “sml”. In this theme I am going customize the login page.
• Create a folder inside the Theme directory and that folder name becomes the name of the theme.
• Here is the flow. Please use exact words for directories and files.
1. Go to Keycloak -> themes
2. Create a directory called “sml”. This will be the theme name.
3. Go to sml directory
4. Create a directory called login. This specify that you are going to change the login theme.
5. Go inside of login directory
6. Create a directory called resources and create a property file called theme.properties. Resources
directory contains all resources files such as styles and images.
7. theme.properties file contains property definitions.
8. Go inside of the resources directory and create two directories called css and img.
9. css directory for style sheets and img directory is for images.
Page 6 of 6
What is theme.property file ?
• theme.property file consists some basic configuration things.
1. Parent class (parent=keycloak)
2. Where style sheets are located (styles=css/styles.css)
3. Keycloak tags related to Bootstrap tags (kcHtmlClass=login-pf)
• Here is the sample theme .property file.
parent=keycloak
import=common/keycloak
styles=lib/patternfly/css/patternfly.css lib/zocial/zocial.css css/login.css css/logo.css css/styles.css
kcHtmlClass=login-pf
kcContentClass=col-sm-12 col-md-12 col-lg-12 container
kcContentWrapperClass=row
kcHeaderClass=col-xs-12 col-sm-8 col-md-8 col-lg-7
kcFeedbackAreaClass=col-md-12
kcAlertIconClasserror=pficon pficon-error-circle-o
kcFormAreaClass=col-xs-12 col-sm-8 col-md-8 col-lg-7 login
kcFeedbackErrorIcon=pficon pficon-error-circle-o
Change styles related to your theme
• Inside of the css directory you can create style sheets as you preferred. Once you create a stylesheet, it needs
to be mentioned in the theme.properties file.
styles=css/login.css
Change the template structure
• If you want to change the structure of the template, you need to change the related freemaker template
files.
• There are two ways to change the template.
1. Change the Base template – NOT RECOMMENTED
2. Override the template and change it – BEST OPTION
• As I mentioned, ‘override the template’ is the best option.
• Just what you need to do is,
Get a copy from template file (Keycloak -> themes -> base -> login -> login.ftl)
Save it in your theme location (Keycloak -> themes -> sml -> login -> login.ftl)
• Then you can edit saved template according to your requirements and you can add new styles as mentioned
above.

More Related Content

What's hot

OpenId Connect Protocol
OpenId Connect ProtocolOpenId Connect Protocol
OpenId Connect Protocol
Michael Furman
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
Amazon Web Services
 
OAuth & OpenID Connect Deep Dive
OAuth & OpenID Connect Deep DiveOAuth & OpenID Connect Deep Dive
OAuth & OpenID Connect Deep Dive
Nordic APIs
 
OAuth 2.0
OAuth 2.0OAuth 2.0
OAuth 2.0
Uwe Friedrichsen
 
Identity management and single sign on - how much flexibility
Identity management and single sign on - how much flexibilityIdentity management and single sign on - how much flexibility
Identity management and single sign on - how much flexibility
Ryan Dawson
 
Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action
Alex Movila
 
Keeping a Secret with HashiCorp Vault
Keeping a Secret with HashiCorp VaultKeeping a Secret with HashiCorp Vault
Keeping a Secret with HashiCorp Vault
Mitchell Pronschinske
 
An Introduction To REST API
An Introduction To REST APIAn Introduction To REST API
An Introduction To REST API
Aniruddh Bhilvare
 
Introduction to JWT and How to integrate with Spring Security
Introduction to JWT and How to integrate with Spring SecurityIntroduction to JWT and How to integrate with Spring Security
Introduction to JWT and How to integrate with Spring Security
Bruno Henrique Rother
 
Mongoose and MongoDB 101
Mongoose and MongoDB 101Mongoose and MongoDB 101
Mongoose and MongoDB 101
Will Button
 
Enforcing Bespoke Policies in Kubernetes
Enforcing Bespoke Policies in KubernetesEnforcing Bespoke Policies in Kubernetes
Enforcing Bespoke Policies in Kubernetes
Torin Sandall
 
Fetch API Talk
Fetch API TalkFetch API Talk
Fetch API Talk
Chiamaka Nwolisa
 
Maven 3 Overview
Maven 3  OverviewMaven 3  Overview
Maven 3 Overview
Mike Ensor
 
Introduction to Nexus Repository Manager.pdf
Introduction to Nexus Repository Manager.pdfIntroduction to Nexus Repository Manager.pdf
Introduction to Nexus Repository Manager.pdf
Knoldus Inc.
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
Imesh Gunaratne
 
Complete MVC on NodeJS
Complete MVC on NodeJSComplete MVC on NodeJS
Complete MVC on NodeJS
Hüseyin BABAL
 
TLC303_Walkthrough Setting up a Highly Available Communications Platform on AWS
TLC303_Walkthrough Setting up a Highly Available Communications Platform on AWSTLC303_Walkthrough Setting up a Highly Available Communications Platform on AWS
TLC303_Walkthrough Setting up a Highly Available Communications Platform on AWS
Amazon Web Services
 
OPA: The Cloud Native Policy Engine
OPA: The Cloud Native Policy EngineOPA: The Cloud Native Policy Engine
OPA: The Cloud Native Policy Engine
Torin Sandall
 
NGINX Kubernetes Ingress Controller: Getting Started – EMEA
NGINX Kubernetes Ingress Controller: Getting Started – EMEANGINX Kubernetes Ingress Controller: Getting Started – EMEA
NGINX Kubernetes Ingress Controller: Getting Started – EMEA
Aine Long
 
Programmazione funzionale e Stream in Java
Programmazione funzionale e Stream in JavaProgrammazione funzionale e Stream in Java
Programmazione funzionale e Stream in Java
Cristina Attori
 

What's hot (20)

OpenId Connect Protocol
OpenId Connect ProtocolOpenId Connect Protocol
OpenId Connect Protocol
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
OAuth & OpenID Connect Deep Dive
OAuth & OpenID Connect Deep DiveOAuth & OpenID Connect Deep Dive
OAuth & OpenID Connect Deep Dive
 
OAuth 2.0
OAuth 2.0OAuth 2.0
OAuth 2.0
 
Identity management and single sign on - how much flexibility
Identity management and single sign on - how much flexibilityIdentity management and single sign on - how much flexibility
Identity management and single sign on - how much flexibility
 
Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action
 
Keeping a Secret with HashiCorp Vault
Keeping a Secret with HashiCorp VaultKeeping a Secret with HashiCorp Vault
Keeping a Secret with HashiCorp Vault
 
An Introduction To REST API
An Introduction To REST APIAn Introduction To REST API
An Introduction To REST API
 
Introduction to JWT and How to integrate with Spring Security
Introduction to JWT and How to integrate with Spring SecurityIntroduction to JWT and How to integrate with Spring Security
Introduction to JWT and How to integrate with Spring Security
 
Mongoose and MongoDB 101
Mongoose and MongoDB 101Mongoose and MongoDB 101
Mongoose and MongoDB 101
 
Enforcing Bespoke Policies in Kubernetes
Enforcing Bespoke Policies in KubernetesEnforcing Bespoke Policies in Kubernetes
Enforcing Bespoke Policies in Kubernetes
 
Fetch API Talk
Fetch API TalkFetch API Talk
Fetch API Talk
 
Maven 3 Overview
Maven 3  OverviewMaven 3  Overview
Maven 3 Overview
 
Introduction to Nexus Repository Manager.pdf
Introduction to Nexus Repository Manager.pdfIntroduction to Nexus Repository Manager.pdf
Introduction to Nexus Repository Manager.pdf
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
 
Complete MVC on NodeJS
Complete MVC on NodeJSComplete MVC on NodeJS
Complete MVC on NodeJS
 
TLC303_Walkthrough Setting up a Highly Available Communications Platform on AWS
TLC303_Walkthrough Setting up a Highly Available Communications Platform on AWSTLC303_Walkthrough Setting up a Highly Available Communications Platform on AWS
TLC303_Walkthrough Setting up a Highly Available Communications Platform on AWS
 
OPA: The Cloud Native Policy Engine
OPA: The Cloud Native Policy EngineOPA: The Cloud Native Policy Engine
OPA: The Cloud Native Policy Engine
 
NGINX Kubernetes Ingress Controller: Getting Started – EMEA
NGINX Kubernetes Ingress Controller: Getting Started – EMEANGINX Kubernetes Ingress Controller: Getting Started – EMEA
NGINX Kubernetes Ingress Controller: Getting Started – EMEA
 
Programmazione funzionale e Stream in Java
Programmazione funzionale e Stream in JavaProgrammazione funzionale e Stream in Java
Programmazione funzionale e Stream in Java
 

Similar to Keycloak theme customization

Adopt or hack - how to hack a theme in a Drupal way
Adopt or hack - how to hack a theme in a Drupal wayAdopt or hack - how to hack a theme in a Drupal way
Adopt or hack - how to hack a theme in a Drupal way
Marek Sotak
 
Themes and layouts
Themes and layoutsThemes and layouts
Themes and layouts
AbhishekSRC
 
Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016
David Brattoli
 
Jekyll Theming
Jekyll ThemingJekyll Theming
Jekyll Theming
Ryan Brown
 
7 Theming in Drupal
7 Theming in Drupal7 Theming in Drupal
7 Theming in DrupalWingston
 
Writing a WordPress Theme - HighEdWeb 2013 #WRK2
Writing a WordPress Theme - HighEdWeb 2013 #WRK2Writing a WordPress Theme - HighEdWeb 2013 #WRK2
Writing a WordPress Theme - HighEdWeb 2013 #WRK2
Curtiss Grymala
 
Creating custom themes in AtoM
Creating custom themes in AtoMCreating custom themes in AtoM
Creating custom themes in AtoM
Artefactual Systems - AtoM
 
Drupal 7 theme by ayushi infotech
Drupal 7 theme by ayushi infotechDrupal 7 theme by ayushi infotech
Drupal 7 theme by ayushi infotech
Mandakini Kumari
 
Firstborn child theme word camp presentation - atlanta 2013
Firstborn child theme   word camp presentation - atlanta 2013Firstborn child theme   word camp presentation - atlanta 2013
Firstborn child theme word camp presentation - atlanta 2013
Evan Mullins
 
Drupal theming
Drupal themingDrupal theming
Drupal theming
Philip Norton
 
Magento mega menu extension
Magento mega menu extensionMagento mega menu extension
Magento mega menu extension
Bun Danny
 
Designing for magento
Designing for magentoDesigning for magento
Designing for magentohainutemicute
 
Wordpress theme development
Wordpress theme developmentWordpress theme development
Wordpress theme development
Naeem Junejo
 
Drupal 8: frontend development
Drupal 8: frontend developmentDrupal 8: frontend development
Drupal 8: frontend development
sparkfabrik
 
Drupal Theming for Developers
Drupal Theming for DevelopersDrupal Theming for Developers
Drupal Theming for Developers
Ian Carnaghan
 
full-site-editing-theme-presentation.pptx
full-site-editing-theme-presentation.pptxfull-site-editing-theme-presentation.pptx
full-site-editing-theme-presentation.pptx
Plasterdog Web Design
 
A11y Conference Talk: Building an Accessible WordPress Theme
A11y Conference Talk: Building an Accessible WordPress ThemeA11y Conference Talk: Building an Accessible WordPress Theme
A11y Conference Talk: Building an Accessible WordPress Theme
TomAuger
 
DSpace 4.2 XMLUI Theming
DSpace 4.2 XMLUI ThemingDSpace 4.2 XMLUI Theming
DSpace 4.2 XMLUI ThemingDuraSpace
 
Child themes
Child themesChild themes
Child themesbobwlsn
 

Similar to Keycloak theme customization (20)

Adopt or hack - how to hack a theme in a Drupal way
Adopt or hack - how to hack a theme in a Drupal wayAdopt or hack - how to hack a theme in a Drupal way
Adopt or hack - how to hack a theme in a Drupal way
 
Themes and layouts
Themes and layoutsThemes and layouts
Themes and layouts
 
Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016
 
Jekyll Theming
Jekyll ThemingJekyll Theming
Jekyll Theming
 
7 Theming in Drupal
7 Theming in Drupal7 Theming in Drupal
7 Theming in Drupal
 
Writing a WordPress Theme - HighEdWeb 2013 #WRK2
Writing a WordPress Theme - HighEdWeb 2013 #WRK2Writing a WordPress Theme - HighEdWeb 2013 #WRK2
Writing a WordPress Theme - HighEdWeb 2013 #WRK2
 
Creating custom themes in AtoM
Creating custom themes in AtoMCreating custom themes in AtoM
Creating custom themes in AtoM
 
Drupal 7 theme by ayushi infotech
Drupal 7 theme by ayushi infotechDrupal 7 theme by ayushi infotech
Drupal 7 theme by ayushi infotech
 
Readme
ReadmeReadme
Readme
 
Firstborn child theme word camp presentation - atlanta 2013
Firstborn child theme   word camp presentation - atlanta 2013Firstborn child theme   word camp presentation - atlanta 2013
Firstborn child theme word camp presentation - atlanta 2013
 
Drupal theming
Drupal themingDrupal theming
Drupal theming
 
Magento mega menu extension
Magento mega menu extensionMagento mega menu extension
Magento mega menu extension
 
Designing for magento
Designing for magentoDesigning for magento
Designing for magento
 
Wordpress theme development
Wordpress theme developmentWordpress theme development
Wordpress theme development
 
Drupal 8: frontend development
Drupal 8: frontend developmentDrupal 8: frontend development
Drupal 8: frontend development
 
Drupal Theming for Developers
Drupal Theming for DevelopersDrupal Theming for Developers
Drupal Theming for Developers
 
full-site-editing-theme-presentation.pptx
full-site-editing-theme-presentation.pptxfull-site-editing-theme-presentation.pptx
full-site-editing-theme-presentation.pptx
 
A11y Conference Talk: Building an Accessible WordPress Theme
A11y Conference Talk: Building an Accessible WordPress ThemeA11y Conference Talk: Building an Accessible WordPress Theme
A11y Conference Talk: Building an Accessible WordPress Theme
 
DSpace 4.2 XMLUI Theming
DSpace 4.2 XMLUI ThemingDSpace 4.2 XMLUI Theming
DSpace 4.2 XMLUI Theming
 
Child themes
Child themesChild themes
Child themes
 

More from Ravi Yasas

Redis clustering
Redis clusteringRedis clustering
Redis clustering
Ravi Yasas
 
Android OS
Android OSAndroid OS
Android OS
Ravi Yasas
 
Distributed systems
Distributed systemsDistributed systems
Distributed systems
Ravi Yasas
 
Display types (LED, LCD, Plasma, Plotter, Virtual Reality)
Display types (LED, LCD, Plasma, Plotter, Virtual Reality)Display types (LED, LCD, Plasma, Plotter, Virtual Reality)
Display types (LED, LCD, Plasma, Plotter, Virtual Reality)
Ravi Yasas
 
Modern Management Thoughts
Modern Management ThoughtsModern Management Thoughts
Modern Management Thoughts
Ravi Yasas
 
Intel 8086 microprocessor
Intel 8086 microprocessorIntel 8086 microprocessor
Intel 8086 microprocessor
Ravi Yasas
 
Cubic robots
Cubic robotsCubic robots
Cubic robots
Ravi Yasas
 
Software requirement specification
Software requirement specificationSoftware requirement specification
Software requirement specification
Ravi Yasas
 
Example for SDS document in Software engineering
Example for SDS document in Software engineeringExample for SDS document in Software engineering
Example for SDS document in Software engineering
Ravi Yasas
 
Fiber optic cables
Fiber optic cablesFiber optic cables
Fiber optic cables
Ravi Yasas
 
NTFS file system
NTFS file systemNTFS file system
NTFS file system
Ravi Yasas
 
CCNA Exam 640-802 Version 9.3
CCNA Exam 640-802 Version 9.3CCNA Exam 640-802 Version 9.3
CCNA Exam 640-802 Version 9.3Ravi Yasas
 
Windows network administration Basic theories
Windows network administration Basic theoriesWindows network administration Basic theories
Windows network administration Basic theories
Ravi Yasas
 

More from Ravi Yasas (13)

Redis clustering
Redis clusteringRedis clustering
Redis clustering
 
Android OS
Android OSAndroid OS
Android OS
 
Distributed systems
Distributed systemsDistributed systems
Distributed systems
 
Display types (LED, LCD, Plasma, Plotter, Virtual Reality)
Display types (LED, LCD, Plasma, Plotter, Virtual Reality)Display types (LED, LCD, Plasma, Plotter, Virtual Reality)
Display types (LED, LCD, Plasma, Plotter, Virtual Reality)
 
Modern Management Thoughts
Modern Management ThoughtsModern Management Thoughts
Modern Management Thoughts
 
Intel 8086 microprocessor
Intel 8086 microprocessorIntel 8086 microprocessor
Intel 8086 microprocessor
 
Cubic robots
Cubic robotsCubic robots
Cubic robots
 
Software requirement specification
Software requirement specificationSoftware requirement specification
Software requirement specification
 
Example for SDS document in Software engineering
Example for SDS document in Software engineeringExample for SDS document in Software engineering
Example for SDS document in Software engineering
 
Fiber optic cables
Fiber optic cablesFiber optic cables
Fiber optic cables
 
NTFS file system
NTFS file systemNTFS file system
NTFS file system
 
CCNA Exam 640-802 Version 9.3
CCNA Exam 640-802 Version 9.3CCNA Exam 640-802 Version 9.3
CCNA Exam 640-802 Version 9.3
 
Windows network administration Basic theories
Windows network administration Basic theoriesWindows network administration Basic theories
Windows network administration Basic theories
 

Recently uploaded

How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 

Recently uploaded (20)

How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 

Keycloak theme customization

  • 1. Keycloak Theme configurations HOW TO CHANGE DEFAULT KEYCLOAOK THEMEHow to change the default Keycloak theme
  • 2. Page 1 of 6 Content Keycloak themes…………………………………………………..02 Before adding new themes…………………………………..03 Add new themes……………………………………………………03 Create your own theme………………………………………..05 What is theme.property file ?..............................06 Change styles related to your theme……………………06 Change the template structure…………………………….06
  • 3. Page 2 of 6 Keycloak themes • First, configure Keycloak server with Spring Boot application. • Keycloak themes can be changed after login to the Keycloak dashboard as admin. • Go to Realm settings and select Themes tab. • Now you can see some options about themes and language support. • There are several options to change the default theme. • It can be changed the Login theme, Account theme, Admin console theme…etc. • By default, two themes are provided (base and keycloak) for each option.
  • 4. Page 3 of 6 Before adding new themes • Before adding new themes, some configurations need to be done. • According to Keycloak documentation theme caching and template caching can be disabled. This allows user to edit themes without restarting the Keycloak server. • To change this, go to the standalone directory and then go inside configuration. Keycloak -> standalone -> configuration -> standalone.xml • There are several files, but only standalone.xml should be changed. • Please change it as follows. • But please remember the re-enable it in production!!! Add new themes • New themes can be added, where Keycloak server is installed. • Basically, Keycloak server looks like this. Please refer following image.
  • 5. Page 4 of 6 • New themes should be added to themes directory. • By default, three Themes are available (base, keycloak and keycloak-preview) • Base theme consists of basic template files for each page without styles. It acts as the parent. • Keycloak theme extends Base theme and it has some specific styles. • Documentation says not to edit preloaded themes, instead create your own theme and extends the base theme according to your requirements. • You can change themes for account, admin, email, login and welcome pages. Above directory names should be exactly same. You cannot change those directory names.
  • 6. Page 5 of 6 Create your own theme • Let’s create a new theme called “sml”. In this theme I am going customize the login page. • Create a folder inside the Theme directory and that folder name becomes the name of the theme. • Here is the flow. Please use exact words for directories and files. 1. Go to Keycloak -> themes 2. Create a directory called “sml”. This will be the theme name. 3. Go to sml directory 4. Create a directory called login. This specify that you are going to change the login theme. 5. Go inside of login directory 6. Create a directory called resources and create a property file called theme.properties. Resources directory contains all resources files such as styles and images. 7. theme.properties file contains property definitions. 8. Go inside of the resources directory and create two directories called css and img. 9. css directory for style sheets and img directory is for images.
  • 7. Page 6 of 6 What is theme.property file ? • theme.property file consists some basic configuration things. 1. Parent class (parent=keycloak) 2. Where style sheets are located (styles=css/styles.css) 3. Keycloak tags related to Bootstrap tags (kcHtmlClass=login-pf) • Here is the sample theme .property file. parent=keycloak import=common/keycloak styles=lib/patternfly/css/patternfly.css lib/zocial/zocial.css css/login.css css/logo.css css/styles.css kcHtmlClass=login-pf kcContentClass=col-sm-12 col-md-12 col-lg-12 container kcContentWrapperClass=row kcHeaderClass=col-xs-12 col-sm-8 col-md-8 col-lg-7 kcFeedbackAreaClass=col-md-12 kcAlertIconClasserror=pficon pficon-error-circle-o kcFormAreaClass=col-xs-12 col-sm-8 col-md-8 col-lg-7 login kcFeedbackErrorIcon=pficon pficon-error-circle-o Change styles related to your theme • Inside of the css directory you can create style sheets as you preferred. Once you create a stylesheet, it needs to be mentioned in the theme.properties file. styles=css/login.css Change the template structure • If you want to change the structure of the template, you need to change the related freemaker template files. • There are two ways to change the template. 1. Change the Base template – NOT RECOMMENTED 2. Override the template and change it – BEST OPTION • As I mentioned, ‘override the template’ is the best option. • Just what you need to do is, Get a copy from template file (Keycloak -> themes -> base -> login -> login.ftl) Save it in your theme location (Keycloak -> themes -> sml -> login -> login.ftl) • Then you can edit saved template according to your requirements and you can add new styles as mentioned above.