diff --git a/authentik/lib/config.py b/authentik/lib/config.py index 7bc86b16e..51d16902d 100644 --- a/authentik/lib/config.py +++ b/authentik/lib/config.py @@ -3,7 +3,8 @@ import os from collections.abc import Mapping from contextlib import contextmanager from glob import glob -from json import dumps +from json import dumps, loads +from json.decoder import JSONDecodeError from time import time from typing import Any from urllib.parse import urlparse @@ -123,6 +124,11 @@ class ConfigLoader: if dot_part not in current_obj: current_obj[dot_part] = {} current_obj = current_obj[dot_part] + # Check if the value is json, and try to load it + try: + value = loads(value) + except JSONDecodeError: + pass current_obj[dot_parts[-1]] = value idx += 1 if idx > 0: diff --git a/authentik/lib/default.yml b/authentik/lib/default.yml index e3310b989..fa88ee2c7 100644 --- a/authentik/lib/default.yml +++ b/authentik/lib/default.yml @@ -72,7 +72,6 @@ disable_startup_analytics: false avatars: env://AUTHENTIK_AUTHENTIK__AVATARS?gravatar geoip: "./GeoLite2-City.mmdb" -# Can't currently be configured via environment variables, only yaml footer_links: - name: Documentation href: https://goauthentik.io/docs/?utm_source=authentik diff --git a/website/docs/installation/configuration.md b/website/docs/installation/configuration.md index bef22847e..76ba8f7f1 100644 --- a/website/docs/installation/configuration.md +++ b/website/docs/installation/configuration.md @@ -165,6 +165,20 @@ Requires authentik 2021.10.5 Enable the ability for users to change their Usernames, defaults to `true`. +### AUTHENTIK_FOOTER_LINKS + +:::info +Requires authentik 2021.10.5 +::: + +This option configures the footer links on the flow executor pages. + +The setting can be used as follows: + +``` +AUTHENTIK_FOOTER_LINKS='[{"name": "Link Name","href":"https://goauthentik.io"}]' +``` + ## Debugging To check if your config has been applied correctly, you can run the following command to output the full config: