-
Notifications
You must be signed in to change notification settings - Fork 84
forward auth authelia
Authelia can sit in front of Muximux as either a forward-auth provider or an OIDC provider. This guide covers both. Forward auth is the original Authelia integration model and is the most common; OIDC is the more recent, more portable approach.
If you're not sure which to pick:
- Pick forward auth if Authelia is already protecting other apps in your stack via your reverse proxy (Traefik, Nginx, Caddy). It's the lighter setup.
- Pick OIDC if you want Muximux to authenticate against Authelia the same way it would authenticate against Keycloak or Entra ID, independent of your reverse proxy.
In this mode, your reverse proxy calls Authelia on every request. Authelia decides whether to allow the request and adds headers like Remote-User and Remote-Groups. Muximux trusts those headers.
If you already have Authelia protecting other apps, you only need to add a rule for Muximux's host. In configuration.yml:
access_control:
default_policy: deny
rules:
- domain: muximux.example.com
policy: two_factor # or one_factor; pick what suits your risk modelNo special Authelia config is required for the headers themselves; Authelia emits Remote-User, Remote-Email, Remote-Name, and Remote-Groups by default.
The exact syntax depends on your proxy. The pattern is the same: forward Muximux's traffic to Authelia's /api/verify endpoint and copy the auth headers into the upstream request.
Traefik (file provider):
http:
routers:
muximux:
rule: "Host(`muximux.example.com`)"
service: muximux
middlewares: [authelia]
tls:
certResolver: default
services:
muximux:
loadBalancer:
servers:
- url: "http://muximux:8080"
middlewares:
authelia:
forwardAuth:
address: "http://authelia:9091/api/verify?rd=https://auth.example.com"
trustForwardHeader: true
authResponseHeaders:
- Remote-User
- Remote-Groups
- Remote-Email
- Remote-NameNginx: see Authelia's official Nginx integration page for the verbatim snippet, then point the protected location at Muximux.
Caddy: Authelia's Caddy integration page covers forward_auth directives.
auth:
method: forward_auth
trusted_proxies:
- 172.16.0.0/12 # whatever subnet your reverse proxy lives in
headers:
user: Remote-User
email: Remote-Email
groups: Remote-Groups
name: Remote-Name
logout_url: https://auth.example.com/logouttrusted_proxies is required: Muximux only honours auth headers that arrived from a trusted hop. Setting it to 0.0.0.0/0 defeats the protection; restrict it to your reverse proxy's actual address or subnet.
For admin promotion via groups, Authelia by default puts your group memberships into Remote-Groups as a comma-separated list. Muximux looks for any of admin, admins, or administrators (case-insensitive). If your admin group has a different name, set forward_auth_admin_groups on the auth block to name it instead:
auth:
method: forward_auth
forward_auth_admin_groups:
- dashboard-admins- Open
https://muximux.example.com/. You should be redirected to Authelia's login page. - After you sign in (and complete 2FA if required), you should land on the Muximux dashboard.
- Sign in as a user whose
groupsfield in Authelia includesadmin(oradmins/administrators). The Settings gear should appear.
Authelia can also act as an OIDC provider. In that mode you don't need any forward-auth wiring; Muximux talks to Authelia directly.
Add a client to Authelia's configuration.yml:
identity_providers:
oidc:
hmac_secret: <a long random string>
issuer_private_key: |
-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----
clients:
- id: muximux
description: Muximux dashboard
secret: '<bcrypt-hashed secret, see Authelia docs>'
public: false
authorization_policy: two_factor
redirect_uris:
- https://muximux.example.com/api/auth/oidc/callback
scopes:
- openid
- profile
- email
- groups
userinfo_signing_algorithm: noneAuthelia stores client secrets as hashes; use authelia hash-password '<secret>' to generate one.
auth:
method: oidc
oidc:
enabled: true
issuer_url: https://auth.example.com
client_id: muximux
client_secret: ${AUTHELIA_CLIENT_SECRET} # the plaintext, not the hash
redirect_url: https://muximux.example.com/api/auth/oidc/callback
scopes:
- openid
- profile
- email
- groups
username_claim: preferred_username
email_claim: email
groups_claim: groups
display_name_claim: name
admin_groups:
- Muximux-Adminsissuer_url is the public base URL of your Authelia instance, no trailing path. Authelia exposes the OIDC discovery document at https://auth.example.com/.well-known/openid-configuration.
Same as the OIDC case in any other provider: visit /login, click Login with SSO, sign in to Authelia, get redirected back to Muximux. Members of the group listed in admin_groups see the Settings gear.
| Symptom | Cause | Fix |
|---|---|---|
Forward auth: Remote-User empty |
The reverse proxy isn't forwarding the header, or the rule that protects Muximux didn't match. | Check the reverse-proxy logs for the response headers from /api/verify. They should include Remote-User. |
| Forward auth: requests bypass Authelia | A request reached Muximux from outside the trusted-proxy range. | Lock down access at the reverse proxy so direct connections to Muximux's port aren't possible from outside the proxy network. |
| Forward auth: admin gear missing for known admin user | Authelia is sending Remote-Groups: foo and Muximux's check is for admin/admins/administrators. |
Either rename the admin group in Authelia, or set forward_auth_admin_groups in Muximux to your group's name. |
OIDC: unauthorized_client from Authelia |
Client secret in config.yaml doesn't match Authelia's stored hash. |
Regenerate the hash with authelia hash-password and verify the plaintext you put in Muximux's environment matches. |
OIDC: no groups claim in token |
groups not in the client's scopes list in Authelia. |
Add groups to both Authelia's client config (Step 1) and Muximux's scopes:. |
-
Authentication overview for the rest of
auth.oidcandauth.method: forward_auth. - Other identity providers: Microsoft Entra ID, Keycloak, Authentik, Pocket ID, Zitadel, Google, Cloudflare Access.
Getting Started
Features
- Apps
- HTTP Actions
- Reverse Proxy
- Docker Discovery
- Navigation
- Split View
- Themes
- Keyboard Shortcuts
- Health Monitoring
- Icons
- Translations
Security
Identity provider guides
Operations