Customizing Dex branding
SD Auth Module can be configured to use Dex as Identity Provider.
Dex comes with its own frontend, which is composed of files that are bundled within their own container image.
As such, one way to customize the fronted is to create a volume that overwrites specific files with our custom ones using a custom patch.
As an example, here is a step-by-step guide to change the default logo:
-
Create a SD cluster configuration file with one of the supported providers.
-
Create a
dex-patch.yamlfile with this content:apiVersion: apps/v1kind: Deploymentmetadata:name: dexnamespace: kube-systemspec:template:spec:containers:- name: dexvolumeMounts:- name: dex-custom-logomountPath: /app/web/themes/dark/logo.pngsubPath: logo.png- name: dex-custom-logomountPath: /app/web/themes/light/logo.pngsubPath: logo.pngvolumes:- name: dex-custom-logoconfigMap:name: dex-custom-logo -
Insert in your
furyctl.yamlconfiguration file the following section:spec:...distribution:...customPatches:patchesStrategicMerge:- /path/to/dex-patch.yamlconfigMapGenerator:- name: dex-custom-logonamespace: kube-systemfiles:- "/path/to/custom/logo.png"options:disableNameSuffixHash: true... -
Apply the configuration:
furyctl apply
Basically we create a new ConfigMap with our logo, then mount it inside Dex's container and replace the default logo.
Done! Now Dex will show your custom logo.
You can see the default content of the /app/web folder in Dex's GitHub repository