From b92dc235572dbadb34c223555bd85e0e79c9f8c7 Mon Sep 17 00:00:00 2001 From: Evilham Date: Thu, 10 Nov 2022 17:02:46 +0100 Subject: [PATCH] [sso] Allow for Keycloak login footer customisation This enables more advanced customisation by allowing for administrators to fully replace the footer of the login theme. We try to take into account maintainability, at the same time mention that it is the administrators' responsibility to keep their customisations compatible with newer versions of DD. --- .gitignore | 1 + dd-sso/docker-compose-parts/keycloak.yml | 1 + .../dd-custom.sample/login/dd-footer.ftl | 31 +++++++++++++++++++ .../dd-custom.sample/login/theme.properties | 1 + .../docker/keycloak/themes/dd-custom/.gitkeep | 0 .../keycloak/themes/dd/login/dd-footer.ftl | 14 ++++----- docs/customising.ca.md | 26 ++++++++++++++++ mkdocs.yml | 1 + 8 files changed, 68 insertions(+), 7 deletions(-) create mode 100644 dd-sso/docker/keycloak/themes/dd-custom.sample/login/dd-footer.ftl create mode 100644 dd-sso/docker/keycloak/themes/dd-custom.sample/login/theme.properties create mode 100644 dd-sso/docker/keycloak/themes/dd-custom/.gitkeep create mode 100644 docs/customising.ca.md diff --git a/.gitignore b/.gitignore index 5956991..8f918f9 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ docs.built/ .env dd-sso/docker/api/src/api/static/templates/*.html dd-sso/docker/api/src/api/static/templates/*.json +dd-sso/docker/keycloak/themes/dd-custom .idea/ *.log # External, unmodified files diff --git a/dd-sso/docker-compose-parts/keycloak.yml b/dd-sso/docker-compose-parts/keycloak.yml index aa3c00c..3b53ff3 100644 --- a/dd-sso/docker-compose-parts/keycloak.yml +++ b/dd-sso/docker-compose-parts/keycloak.yml @@ -31,6 +31,7 @@ services: - ${BUILD_SSO_ROOT_PATH}/init/keycloak/jsons:/opt/jboss/keycloak/imports - ${BUILD_SSO_ROOT_PATH}/init/keycloak/scripts/:/opt/jboss/startup-scripts/ - ${CUSTOM_PATH}/custom/img:/opt/jboss/keycloak/themes/dd/login/resources/custom-img + - ${BUILD_SSO_ROOT_PATH}/docker/keycloak/themes/dd-custom:/opt/jboss/keycloak/themes/dd-custom - ${BUILD_SSO_ROOT_PATH}/docker/keycloak/extensions/avatar-minio-extension-bundle-1.0.1.0-SNAPSHOT.ear:/opt/jboss/keycloak/standalone/deployments/avatar-minio-extension-bundle-1.0.1.0-SNAPSHOT.ear environment: - AVATARS_SERVER_URL=http://dd-sso-avatars:9000 diff --git a/dd-sso/docker/keycloak/themes/dd-custom.sample/login/dd-footer.ftl b/dd-sso/docker/keycloak/themes/dd-custom.sample/login/dd-footer.ftl new file mode 100644 index 0000000..279983f --- /dev/null +++ b/dd-sso/docker/keycloak/themes/dd-custom.sample/login/dd-footer.ftl @@ -0,0 +1,31 @@ + diff --git a/dd-sso/docker/keycloak/themes/dd-custom.sample/login/theme.properties b/dd-sso/docker/keycloak/themes/dd-custom.sample/login/theme.properties new file mode 100644 index 0000000..de62ddd --- /dev/null +++ b/dd-sso/docker/keycloak/themes/dd-custom.sample/login/theme.properties @@ -0,0 +1 @@ +parent=dd diff --git a/dd-sso/docker/keycloak/themes/dd-custom/.gitkeep b/dd-sso/docker/keycloak/themes/dd-custom/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/dd-sso/docker/keycloak/themes/dd/login/dd-footer.ftl b/dd-sso/docker/keycloak/themes/dd/login/dd-footer.ftl index e6cf3cd..08e8c47 100644 --- a/dd-sso/docker/keycloak/themes/dd/login/dd-footer.ftl +++ b/dd-sso/docker/keycloak/themes/dd/login/dd-footer.ftl @@ -2,25 +2,25 @@
+