Update Authelia configuration to define JWT secret and enhance access control policies

This commit is contained in:
Mohmmed Elfateh Sabry
2025-08-11 13:28:59 +03:00
parent aceeab4cd3
commit 6e192128b9

View File

@@ -25,6 +25,7 @@ theme: 'light'
identity_validation: identity_validation:
reset_password: reset_password:
jwt_secret: '${AUTHELIA_JWT_SECRET}' jwt_secret: '${AUTHELIA_JWT_SECRET}'
# Ensure AUTHELIA_JWT_SECRET is defined in environment (.env/Secrets) or startup will fail.
## TOTP Configuration ## TOTP Configuration
totp: totp:
@@ -100,7 +101,8 @@ authentication_backend:
## Access Control Configuration ## Access Control Configuration
access_control: access_control:
## Default Policy ## Default Policy
default_policy: 'deny' # Baseline policy when no rule matches. Choose two_factor for stronger default.
default_policy: 'two_factor'
## Networks (optional, for IP-based rules) ## Networks (optional, for IP-based rules)
networks: networks:
@@ -112,11 +114,11 @@ access_control:
## Rules ## Rules
rules: rules:
## Authelia itself # Authelia portal itself is bypassed so users can reach the login UI
- domain: 'auth.gate.3launchpad.com' - domain: 'auth.gate.3launchpad.com'
policy: 'bypass' policy: 'bypass'
## Admin access # Admin-only services require 2FA and membership in admins group
- domain: - domain:
- 'traefik.gate.3launchpad.com' - 'traefik.gate.3launchpad.com'
- 'portainer.gate.3launchpad.com' - 'portainer.gate.3launchpad.com'
@@ -124,7 +126,7 @@ access_control:
subject: subject:
- 'group:admins' - 'group:admins'
## General protected services # All other subdomains require at least one factor
- domain: '*.gate.3launchpad.com' - domain: '*.gate.3launchpad.com'
policy: 'one_factor' policy: 'one_factor'
@@ -167,7 +169,7 @@ regulation:
## Storage Configuration ## Storage Configuration
storage: storage:
## Encryption key is required (newer versions). Provide via env var. ## Encryption key is required (newer versions). Provide via env var.
encryption_key: '${AUTHELIA_STORAGE_ENCRYPTION_KEY}' encryption_key: '${AUTHELIA_STORAGE_ENCRYPTION_KEY}' # must be 32+ chars, consistent across restarts
local: local:
path: '/config/db.sqlite3' path: '/config/db.sqlite3'