-
Notifications
You must be signed in to change notification settings - Fork 84
oidc authentik
This guide sets up Muximux to authenticate against Authentik, including emitting Authentik group memberships in the ID token so they're available to admin_groups and per-app allowed_groups.
The end state: users sign in with their Authentik account, Muximux receives their groups as groups: ["Engineering", "Muximux-Admins"], and admins land on Settings automatically.
- A running Authentik instance (any 2024.x release works; older versions also do, but the UI labels here come from current Authentik).
- An admin account on the Authentik side.
- Muximux on a stable URL (HTTPS recommended).
- In Authentik admin, open Applications > Providers and click Create.
- Select OAuth2/OpenID Provider and click Next.
- Name:
Muximux Provider. -
Authorization flow: pick
default-provider-authorization-implicit-consent(or any flow that suits your consent policy). -
Protocol settings:
- Client type: Confidential
- Client ID: leave the auto-generated value or override (e.g.
muximux). - Client Secret: copy this value, you'll paste it into
config.yaml. - Redirect URIs / Origins:
https://muximux.example.com/api/auth/oidc/callback. Use Strict matching mode if available. - Signing Key: pick
authentik Self-signed Certificateunless you've configured your own.
- Under Advanced protocol settings:
- Subject mode:
Based on the User's username(orBased on the User's UPNif your users come from a directory).
- Subject mode:
- Save.
- Open Applications > Applications and click Create.
- Name:
Muximux. Slug:muximux. -
Provider: pick the
Muximux Provideryou just created. - Optional: launch URL
https://muximux.example.com/. - Save.
You can now bind policies to this application if you want to restrict who can authenticate (Authentik > Applications > muximux > Policy / Group / User Bindings). This works the same way for any OIDC client and is independent of Muximux.
By default, Authentik includes a groups claim in the userinfo endpoint via the goauthentik.io/providers/oauth2/scope-openid-userinfo property mapping. Verify or add it:
- Open the Muximux Provider (Applications > Providers > Muximux Provider).
- Scroll to Scopes and confirm the following scopes are in the Selected list:
emailopenidprofile
- Open the property mapping list and confirm a
groupsmapping is selected. If you don't see one, create a new one under Customisation > Property Mappings > Create > Scope Mapping:- Name:
OAuth2 Groups - Scope name:
groups - Expression:
return {"groups": [group.name for group in user.ak_groups.all()]}
- Add
groupsto the provider's scope list.
- Name:
- Save.
If you'd rather use the full Authentik group path (rare), use group.path instead of group.name in the expression and adjust your admin_groups to match.
For Muximux to promote anyone to admin, Authentik needs a group whose name you'll list in admin_groups. Either reuse one you already have or create a new one:
- Directory > Groups > Create.
- Name:
Muximux-Admins. - Add members on the Users tab.
auth:
method: oidc
oidc:
enabled: true
issuer_url: https://authentik.example.com/application/o/muximux/
client_id: <client id from Step 1>
client_secret: ${AUTHENTIK_CLIENT_SECRET}
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-AdminsThe Authentik issuer_url is application-scoped, hence the /application/o/<application-slug>/ suffix. The trailing slash matters; copy the OpenID Configuration Issuer value from the provider's overview page if you want to be sure.
Set AUTHENTIK_CLIENT_SECRET in the environment. Restart Muximux.
- Visit
https://muximux.example.com/loginand click Login with SSO. - Authentik prompts for sign-in (and consent the first time, depending on the flow you chose). Approving redirects you back to Muximux.
- Sign in as a member of
Muximux-Adminsand confirm the Settings gear is visible. - To inspect what Muximux actually receives: open Authentik admin > Events > Logs after signing in. The
Token issuedevent shows the claims that were placed into the ID token, includinggroups.
| Symptom | Cause | Fix |
|---|---|---|
invalid_redirect_uri from Authentik |
Redirect URI not on the provider's allow list. | Add https://muximux.example.com/api/auth/oidc/callback exactly to Redirect URIs / Origins on the provider. |
| Sign-in works but admin promotion doesn't | Either the groups scope isn't being requested by Muximux, or the property mapping isn't producing groups. |
Confirm scopes: in config.yaml includes groups. Then check Events > Logs for the latest Token issued event and look for the groups claim. |
error: unauthorized_client |
The client type or client authentication setting on the provider doesn't match what Muximux is sending. | Set the provider to Confidential and use the client secret. |
Failed to fetch discovery document in Muximux logs |
Wrong issuer URL. | Use the OpenID Configuration Issuer from the provider overview page; this is the canonical value Muximux should use. |
| Admin works for some users but not others | Some users are in groups whose names contain spaces or special characters that don't match admin_groups exactly. |
Group matching is case-insensitive but otherwise literal. Make sure admin_groups matches the exact name Authentik reports. |
-
Authentication overview for the rest of
auth.oidc. - Other identity providers: Microsoft Entra ID, Keycloak, Pocket ID, Zitadel, Google, Authelia, 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