Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7066230
D3534.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
D3534.diff
View Options
diff --git a/data/defaults.yaml b/data/defaults.yaml
--- a/data/defaults.yaml
+++ b/data/defaults.yaml
@@ -2745,6 +2745,11 @@
sentry::vhost::ssl_cipher: "%{hiera('apache::ssl_cipher')}"
sentry::vhost::hsts_header: "%{hiera('apache::hsts_header')}"
+keycloak::version: 8.0.1
+
+keycloak::swh_theme::repo_url: https://forge.softwareheritage.org/source/swh-keycloak-theme.git
+keycloak::swh_theme::tag: v0.1.1
+
keycloak::vhost::name: auth.softwareheritage.org
keycloak::vhost::ssl_protocol: "%{hiera('apache::ssl_protocol')}"
@@ -2770,6 +2775,9 @@
internationalization_enabled: true
supported_locales:
- en
+ account_theme: swh
+ admin_theme: swh
+ login_theme: swh
keycloak::resources::clients::common_settings:
public_client: true
diff --git a/site-modules/profile/manifests/keycloak/primary.pp b/site-modules/profile/manifests/keycloak/primary.pp
--- a/site-modules/profile/manifests/keycloak/primary.pp
+++ b/site-modules/profile/manifests/keycloak/primary.pp
@@ -1,6 +1,11 @@
# Definition for the primary keycloak server
class profile::keycloak::primary {
+ $version = lookup('keycloak::version')
+
+ $swh_theme_repo_url = lookup('keycloak::swh_theme::repo_url')
+ $swh_theme_tag = lookup('keycloak::swh_theme::tag')
+
$backend_port = lookup('keycloak::backend::port')
$postgres_host = lookup('keycloak::postgres::host')
@@ -13,6 +18,9 @@
$admin_password = lookup('keycloak::admin::password')
class {'::keycloak':
+ # Version number
+ version => $version,
+
# Virtual Host settings
proxy_https => true,
@@ -34,5 +42,21 @@
manage_datasource => false,
}
+ # Install Software Heritage theme for Keycloak
+ vcsrepo { '/opt/swh-keycloak-theme':
+ ensure => present,
+ provider => git,
+ source => $swh_theme_repo_url,
+ revision => $swh_theme_tag,
+ # keycloak service needs to be restarted when updating themes
+ # as they are cached
+ notify => Service['keycloak'],
+ }
+
+ file { "/opt/keycloak-${version}/themes/swh":
+ ensure => link,
+ target => '/opt/swh-keycloak-theme/swh',
+ }
+
include ::profile::keycloak::resources
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Nov 5 2024, 2:35 AM (10 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3220402
Attached To
D3534: keycloak: Add swh theme configuration and deployment
Event Timeline
Log In to Comment