As of my knowledge cutoff date in September 2021, Keycloak, an open-source Identity and Access Management solution, doesn't provide a direct configuration option to add a custom footer to the login page. However, you can achieve this by customizing the Keycloak theme.
Keycloak allows you to create and customize themes for its login pages, including the login page footer. Here's a step-by-step guide to adding a custom footer to the Keycloak login page:
Create a New Theme Directory: In your Keycloak installation directory, navigate to the
themes
folder. Create a new folder for your custom theme. For example, you can create a folder namedmy-custom-theme
.Copy Existing Theme Files: To get started, copy the files from an existing Keycloak theme that closely resembles the look you want. For example, you can copy files from the
base
theme.Modify the Theme Files: Inside your custom theme folder (
my-custom-theme
), locate the appropriate HTML or template file that represents the login page. In this file, add your custom footer HTML.For example, in the file
login.ftl
(if using Freemarker templates) orlogin.html
(if using HTML templates), add your footer HTML like this:html<div id="footer"> <p>This is a custom footer.</p> </div>
Configure Your Custom Theme: Next, you need to configure Keycloak to use your custom theme. Open the
standalone.xml
(for standalone mode) ordomain.xml
(for domain mode) configuration file of your Keycloak server.Look for the
<theme>
element and configure it to use your custom theme:xml<theme> <staticMaxAge>2592000</staticMaxAge> <cacheThemes>true</cacheThemes> <cacheTemplates>true</cacheTemplates> <dir>${jboss.home.dir}/themes/my-custom-theme</dir> <module>my-custom-theme</module> </theme>
The
<dir>
element should point to the absolute path of your custom theme folder. Replacemy-custom-theme
with the name of your custom theme.Restart Keycloak Server: After making these changes, restart your Keycloak server for the new custom theme to take effect.
Now, when you access the Keycloak login page, it should display your custom footer.
Please note that this guide is based on the information available up to September 2021. Since software may undergo updates and changes, it's possible that newer versions of Keycloak may provide different or more streamlined methods for customizing the login page. Always refer to the official Keycloak documentation and community resources for the most up-to-date information.