docs/content/configuration/prologue/security-sensitive-values.md
Authelia contains several security sensitive values which are documented as such and are also generally are named
secret, key, password, token, or certificate_chain; alternatively they may be suffixed with a _ followed by one
of the previous values.
We generally recommend not leaving these values directly in the configuration itself, as this often leads to accidentally leaking the values when getting support and is generally slightly less secure.
There are three special ways to achieve this goal:
template file filter system which:
This explains option 2 in the context of using it specifically for secret values. For more information on templating see the Reference Guide.
This example shows how to do a single-line value. The single quotes are only relevant if the value is a string and can be excluded for other value types.
identity_providers:
oidc:
hmac_secret: '{{ secret "/config/secrets/absolute/path/to/hmac_secret" }}'
Alternatively you can use the special m variants of the indent and squote functions to automatically adjust the
layout depending on if the file has multiple lines, msquote will automatically single quote the value if it's not
multiple lines, see Multi-Line Value for more information on mindent.
identity_providers:
oidc:
hmac_secret: {{ secret "/config/secrets/absolute/path/to/hmac_secret" | mindent 10 "|" | msquote }}
This example shows how to do a multi-line value. QuotiThng is not possible in this scenario as such it's excluded.
It's important to note the use of mindent:
10 indicates the value should be indented with 10 spaces:
jwks key name key is indented exactly
8 characters, so the value 10 is correct.| indicates what multiline prefix to use.identity_providers:
oidc:
jwks:
- key: {{ secret "/config/secrets/absolute/path/to/jwks/rsa.2048.pem" | mindent 10 "|" | msquote }}