tidy up notes
This commit is contained in:
15 files changed
+669
-2078
No files matched your search
@@ -4,213 +4,90 @@ id: home-server.authentication
|
||||
type: reference
|
||||
scope: [jupiter, authentik, oidc, forward-auth, per-user-access, secrets]
|
||||
sensitivity: private-infrastructure
|
||||
last_reviewed: "2026-10-26"
|
||||
last_reviewed: "2026-10-27"
|
||||
sources:
|
||||
- kind: owner-report
|
||||
reference: "Public qbittorrent.umbra.mom UI working through Mercury/Traefik/Authentik with native qBittorrent login retained, 2026-10-26; does not establish broader per-user migration completion"
|
||||
- kind: owner-report
|
||||
reference: "Requested removal of custom service-access groups, manual per-user application access and retained Jay administration, 2026-10-26; repository prepared, deployment unconfirmed"
|
||||
- kind: owner-report
|
||||
reference: "Requested Authentik-only Homarr login and read-only Docker socket proxy; deployment not confirmed, 2026-10-18"
|
||||
- kind: owner-report
|
||||
reference: "Homarr Authentik login created a separate account; requested linking to existing jay account, 2026-10-18"
|
||||
reference: "Authentik deployed/Authelia retired 2026-10-16; Homarr login 2026-10-18; per-user policy and account linking still unconfirmed 2026-10-26"
|
||||
- kind: repository
|
||||
repository: jupiter-stacks
|
||||
revision: 026cfa58b601165342b278401183c5fed5a50db2
|
||||
paths:
|
||||
- stacks/homarr/docker-compose.yml
|
||||
- stacks/homarr/.env.example
|
||||
- stacks/authentik/docker-compose.yml
|
||||
- stacks/authentik/blueprints/jupiter.yaml
|
||||
- stacks/authentik/.env.example
|
||||
- kind: owner-report
|
||||
reference: "Authentik fully deployed, all listed app integrations complete and Authelia retired; OIDC and three-group motivation, 2026-10-16"
|
||||
- kind: owner-report
|
||||
reference: "Six-directory Backrest plan including Authentik and Wardrowbe; deployed Authentik container names confirmed, 2026-10-16"
|
||||
- kind: owner-report
|
||||
reference: "All stack environment values/secrets managed in Portainer; GitHub access uses PAT, 2026-10-06"
|
||||
- kind: owner-report
|
||||
reference: "Independent credential recovery unchanged: only restic key has independent custody, 2026-10-16"
|
||||
- kind: repository
|
||||
repository: jupiter-stacks
|
||||
revision: d09df456ad331b8beb9a40615114ea8aae2dced5
|
||||
paths:
|
||||
- stacks/authentik/docker-compose.yml
|
||||
- stacks/authentik/blueprints/jupiter.yaml
|
||||
- stacks/authentik/.env.example
|
||||
- stacks/beszel/docker-compose.yml
|
||||
- stacks/dozzle/docker-compose.yml
|
||||
- stacks/gitea/docker-compose.yml
|
||||
- stacks/immich/docker-compose.yml
|
||||
- stacks/paperless-ngx/docker-compose.yml
|
||||
- stacks/portainer/portainer_start.sh
|
||||
- stacks/wardrowbe/docker-compose.yml
|
||||
- stacks/backrest/docker-compose.yml
|
||||
- stacks/notes/docker-compose.yml
|
||||
- stacks/prowlarr/docker-compose.yml
|
||||
- stacks/radarr/docker-compose.yml
|
||||
- stacks/sonarr/docker-compose.yml
|
||||
related: [home-server.reference, home-server.networking, home-server.portainer, home-server.backups, home-server.deployment]
|
||||
update_triggers: [access-policy-change, authentication-change, secret-rotation, middleware-change]
|
||||
unknowns:
|
||||
- deployed-per-user-bindings-and-jay-superuser-membership
|
||||
- per-application-local-login-and-account-linking-settings
|
||||
- retired-authelia-data-retention
|
||||
revision: 12fb1b96e01fc062fdce4c216f11eb5d7ce716ed
|
||||
paths: [stacks/authentik/docker-compose.yml, stacks/authentik/blueprints/jupiter.yaml, stacks/authentik/.env.example, stacks/homarr/docker-compose.yml]
|
||||
related: [home-server.networking, home-server.deployment, home-server.backups, home-server.portainer]
|
||||
update_triggers: [access-policy-change, authentication-change, secret-rotation]
|
||||
unknowns: [deployed-per-user-bindings-and-jay-superuser-membership, per-application-local-login-and-account-linking, retired-authelia-data-retention]
|
||||
---
|
||||
|
||||
# Authentication
|
||||
|
||||
Authentik replaces Authelia. The original setup used native OIDC and forward-auth
|
||||
with three access groups. On 2026-10-26 the owner requested direct per-user
|
||||
service access instead; the repository now prepares that migration, with `jay`
|
||||
allowed into every configured application. Deployment is unconfirmed.
|
||||
The owner reports the earlier Authentik migration
|
||||
fully deployed as of 2026-10-16 and Authelia retired. Homarr OIDC login was
|
||||
reported working on 2026-10-18; linking to the existing account is configured
|
||||
in the repository but has not been confirmed successful.
|
||||
Configuration details below are repository evidence, not live inspection.
|
||||
|
||||
| Component | Configuration |
|
||||
| --- | --- |
|
||||
| Portal | `https://auth.umbra.mom` |
|
||||
| Identity service | Authentik server + worker; image `2026.8.4` |
|
||||
| Database | PostgreSQL 16; database/user `authentik` |
|
||||
| Configuration | `stacks/authentik/blueprints/jupiter.yaml`; worker-mounted custom blueprint |
|
||||
| Application MFA | `jupiter-app-authorization`; TOTP or WebAuthn; prompts for setup if none configured |
|
||||
| Recent MFA | Five-minute reuse threshold avoids an immediate duplicate challenge |
|
||||
| Host setup access | Loopback `127.0.0.1:9000` -> server `9000` |
|
||||
- **Deployed:** Authentik replaces Authelia; portal `https://auth.umbra.mom`.
|
||||
- **Repository intent, deployment unconfirmed:** direct per-user access and Homarr account linking.
|
||||
- Backend: server + worker + PostgreSQL 16 (`authentik` DB/user).
|
||||
- Blueprint: `stacks/authentik/blueprints/jupiter.yaml`; host copy must be applied separately.
|
||||
- MFA: `jupiter-app-authorization`; TOTP/WebAuthn; setup if absent; five-minute reuse.
|
||||
- Proxy transport/trust: [Networking](networking.md#listener-and-trust-boundaries).
|
||||
|
||||
## Per-user application access
|
||||
|
||||
Every one of the 15 configured applications has a direct binding for the
|
||||
**existing** Authentik user `jay`, at order `0`. Applications use
|
||||
`policy_engine_mode: any`: Jay **or** another explicitly added user may pass.
|
||||
Unassigned users are denied, and the shared application-MFA flow remains.
|
||||
The blueprint does not create users or change passwords, MFA devices or
|
||||
application-native administrator roles.
|
||||
|
||||
Add other users in the application's **Policy / Group / User Bindings** tab,
|
||||
using a **User** binding with order `10` or higher, enabled and not negated.
|
||||
Keep ANY mode and retain Jay's order-0 binding. Manual bindings at other orders
|
||||
are not removed by blueprint reapplication. Admission does not itself grant
|
||||
administrator privileges inside a service.
|
||||
|
||||
The blueprint deletes only the custom `admins`, `development` and `clients`
|
||||
groups after replacing their bindings; their memberships and group-based grants
|
||||
are removed. **Retain Jay's built-in superuser group membership**, normally
|
||||
`authentik Admins`: Authentik derives administrator status from a superuser
|
||||
group, so removing every group would lock out administration.
|
||||
|
||||
Before applying, back up Authentik, confirm Jay is still a superuser, and redeploy
|
||||
Trek with its username-based admin mapping. Copy the updated blueprint into the
|
||||
host's `/data/authentik/blueprints/jupiter.yaml` and apply it, then individually
|
||||
assign the other users you want to retain. See the
|
||||
[access-management runbook](https://github.com/jayo60013/jupiter-stacks/blob/main/stacks/authentik/README.md)
|
||||
for rollout and rollback. Existing application sessions/API keys need separate
|
||||
revocation when removing access.
|
||||
- All 15 applications bind existing user `jay` at order `0`; `policy_engine_mode: any`.
|
||||
- Add others under **Policy / Group / User Bindings**: enabled, non-negated **User** binding, order `10+`. Unassigned users are denied; manual higher-order bindings survive reapplication.
|
||||
- Blueprint replaces custom `admins`, `development`, `clients` groups; does not create users or change passwords/MFA/app-native roles.
|
||||
- **Keep Jay in the built-in superuser group** (`authentik Admins`); application admission is not administration.
|
||||
- Before applying: back up Authentik, verify Jay's superuser membership, redeploy Trek's username-based admin mapping, copy/apply the host blueprint, assign retained users.
|
||||
- Revoke existing application sessions/API keys separately when removing access.
|
||||
|
||||
## Native OIDC
|
||||
|
||||
Each client uses a confidential authorization-code provider, strict redirect URIs,
|
||||
per-provider issuer and the shared application-MFA authorization flow.
|
||||
Issuer pattern: `https://auth.umbra.mom/application/o/<client-id>/`.
|
||||
- Confidential authorization-code clients; strict callbacks; shared MFA flow.
|
||||
- Issuer: `https://auth.umbra.mom/application/o/<client-id>/`.
|
||||
|
||||
| Client ID | Application hostname | Integration configuration |
|
||||
| Client ID | Host under `umbra.mom` | Configuration |
|
||||
| --- | --- | --- |
|
||||
| `beszel` | `beszel.umbra.mom` | Database/UI provider; password-auth disable flag in Compose |
|
||||
| `dozzle` | `logs.umbra.mom` | Compose OIDC settings; no forward-auth middleware |
|
||||
| `gitea` | `gitea.umbra.mom` | Database/UI authentication source; Compose requires login for account linking and disables automatic registration |
|
||||
| `homarr` | `umbra.mom` | Compose OIDC settings; Authentik-only login configured; verified-email linking to existing password accounts enabled |
|
||||
| `immich` | `photos.umbra.mom` | Database/UI OAuth settings; web and mobile callbacks registered |
|
||||
| `paperless` | `paperless.umbra.mom` | Compose OpenID Connect/allauth configuration; PKCE enabled; signups disabled |
|
||||
| `portainer` | `portainer.umbra.mom`, `portainer.local.umbra.mom` | Database/UI OAuth settings; both callback hosts registered |
|
||||
| `trek` | `holidays.umbra.mom` | Compose OIDC settings; `preferred_username == jay` grants the app admin role |
|
||||
| `wardrowbe` | `wardrobe.umbra.mom` | Compose OIDC settings for frontend and backend/workers |
|
||||
| `beszel` | `beszel` | Database/UI provider; password-disable flag in Compose |
|
||||
| `dozzle` | `logs` | Compose OIDC; `dozzle_roles: ["none"]`; read-only Docker proxy |
|
||||
| `gitea` | `gitea` | Database/UI source; login required for linking; auto-registration disabled |
|
||||
| `homarr` | Apex | Compose OIDC; verified-email linking |
|
||||
| `immich` | `photos` | Database/UI OAuth; web + mobile callbacks |
|
||||
| `paperless` | `paperless` | Compose allauth/OIDC; PKCE; signups disabled |
|
||||
| `portainer` | `portainer`, `portainer.local` | Database/UI OAuth; both callback hosts |
|
||||
| `trek` | `holidays` | Compose; `preferred_username == jay` grants app admin |
|
||||
| `wardrowbe` | `wardrobe` | Compose frontend/backend/workers |
|
||||
|
||||
Dozzle's custom profile mapping emits `dozzle_roles: ["none"]` for any user
|
||||
admitted by its direct application bindings. Its Docker proxy stays read-only.
|
||||
The email mapping asserts `email_verified` only when the user has
|
||||
an email and their `email_verified` attribute is explicitly true.
|
||||
|
||||
OIDC integration does not prove local password login is disabled or application
|
||||
roles are synchronized. Beszel and Paperless retain migration-safe local-login
|
||||
defaults in Compose; deployed overrides and account-linking details were not
|
||||
supplied. Application permissions and existing sessions remain app-managed.
|
||||
- Beszel/Paperless retain migration-safe local-login defaults; deployed overrides unconfirmed.
|
||||
- OIDC does not synchronise native app roles or prove local login disabled.
|
||||
- Email mapping emits `email_verified` only for an existing email with explicit boolean `true`.
|
||||
|
||||
### Homarr
|
||||
|
||||
Homarr uses native OIDC, not a Traefik forward-auth gate. Its Authentik provider
|
||||
is `jupiter-homarr`, with the shared application-MFA flow.
|
||||
|
||||
| Setting | Value |
|
||||
| --- | --- |
|
||||
| Login providers | `AUTH_PROVIDERS=oidc` (Authentik only) |
|
||||
| Issuer | `https://auth.umbra.mom/application/o/homarr/` |
|
||||
| Client ID / display name | `homarr` / `Authentik` |
|
||||
| Callback | `https://umbra.mom/api/auth/callback/oidc` (strict match) |
|
||||
| Requested scopes | `openid email profile` |
|
||||
| Client secret | `OIDC_HOMARR_SECRET` in both the Homarr and Authentik stack environments |
|
||||
| Existing-account linking | `AUTH_OIDC_ENABLE_DANGEROUS_CREDENTIALS_LINKING=true` |
|
||||
| Provider / login | `jupiter-homarr`; `AUTH_PROVIDERS=oidc` |
|
||||
| Callback | `https://umbra.mom/api/auth/callback/oidc` |
|
||||
| Scopes | `openid email profile` |
|
||||
| Shared secret | `OIDC_HOMARR_SECRET` in Homarr + Authentik |
|
||||
| Linking | `AUTH_OIDC_ENABLE_DANGEROUS_CREDENTIALS_LINKING=true` |
|
||||
|
||||
An OIDC login initially created a separate user instead of signing into the
|
||||
existing `jay` password account. Linking is now enabled in Compose; it matches
|
||||
email addresses, not usernames, and preserves the existing account's username,
|
||||
password credentials, permissions, boards, settings and API keys. Password
|
||||
credentials are retained but cannot be used while only OIDC is enabled.
|
||||
- Linking matches **email**, not username; applies to all matching password accounts.
|
||||
- Preserve `SECRET_ENCRYPTION_KEY`; password credentials remain stored but unusable with OIDC-only login.
|
||||
|
||||
To complete linking:
|
||||
1. Back up `/data/homarr/appdata`; ensure existing `jay` email matches the intended identity.
|
||||
2. Independently verify ownership, then set that user's `email_verified` to boolean `true`; never mark all users verified.
|
||||
3. Preserve/transfer duplicate-account data, then delete **only the duplicate OIDC account**, not `jay`; an existing link otherwise wins.
|
||||
4. Confirm login reaches `jay`, admin permissions and existing boards before disabling credentials. Temporarily use `AUTH_PROVIDERS=credentials,oidc` if needed.
|
||||
|
||||
1. Before deploying Authentik-only login, back up `/data/homarr/appdata`, then
|
||||
sign in with the local administrator account and ensure `jay`'s email exactly
|
||||
matches the intended Authentik user's.
|
||||
2. Independently verify ownership of that email before setting the Authentik
|
||||
user's `email_verified` attribute to boolean `true`, not string `"true"`.
|
||||
The existing email scope mapping requires this before issuing
|
||||
`email_verified: true`; do not mark every user's email verified.
|
||||
3. Preserve or transfer anything owned by the duplicate OIDC account, then
|
||||
delete only that duplicate through Homarr's user management. Do not delete
|
||||
`jay`. An existing OIDC link otherwise continues using the duplicate.
|
||||
4. Confirm Authentik login links to `jay` with administrator access and the
|
||||
existing boards and permissions before disabling password login. If linking
|
||||
still needs setup, temporarily use `AUTH_PROVIDERS=credentials,oidc` and
|
||||
redeploy. Once working, pull/redeploy with `AUTH_PROVIDERS=oidc`.
|
||||
|
||||
The linking setting applies to all matching password accounts, not just `jay`.
|
||||
Only trusted administrators should mark Authentik emails verified. Password login
|
||||
is disabled in the current Compose configuration; successful deployment and
|
||||
account linking have not been confirmed. For recovery if Authentik is unavailable,
|
||||
temporarily restore `AUTH_PROVIDERS=credentials,oidc` and redeploy Homarr.
|
||||
That recovery setting bypasses Authentik MFA and application-access policies
|
||||
for password logins. Keep `SECRET_ENCRYPTION_KEY` unchanged.
|
||||
|
||||
Homarr also has a read-only Docker socket proxy on an internal `docker-api`
|
||||
network. Only the proxy mounts `/var/run/docker.sock`; its API port is not
|
||||
published or connected to Traefik. Homarr's `Jupiter` endpoint permits inventory
|
||||
and logs, while the proxy blocks writes (`POST=0`). Container lifecycle controls
|
||||
are disabled. Redeploy the whole stack to create the proxy alongside Homarr.
|
||||
- Credential fallback bypasses Authentik MFA/access policy for password logins.
|
||||
- Internal `docker-api` proxy: only proxy mounts socket; no published API/Traefik attachment; inventory/logs allowed, `POST=0`, lifecycle controls disabled. Redeploy the whole stack.
|
||||
|
||||
## Forward-auth
|
||||
|
||||
Backrest (`backups.umbra.mom`), Notes, Prowlarr, Radarr and Sonarr retain
|
||||
proxy-based protection. Their routers attach `authentik@docker`:
|
||||
- Protected apps: Backrest (`backups`), Notes, Prowlarr, Radarr, Sonarr, qBittorrent.
|
||||
- Router middleware: `authentik@docker`; `trustForwardHeader=true`.
|
||||
- Endpoint: `http://authentik-server:9000/outpost.goauthentik.io/auth/traefik`.
|
||||
- Six embedded `forward_single` providers; explicit external hosts, empty `skip_path_regex`.
|
||||
- Priority **1000** callback router: `/outpost.goauthentik.io/` goes directly to Authentik, bypassing forward-auth.
|
||||
- qBittorrent keeps native login; internal Arr API traffic bypasses this browser gate.
|
||||
- Only attached routers are protected; published ports, SSH and API tokens are separate boundaries.
|
||||
|
||||
```text
|
||||
Traefik -> http://authentik-server:9000/outpost.goauthentik.io/auth/traefik
|
||||
```
|
||||
|
||||
The blueprint now includes a sixth `forward_single` provider for
|
||||
`qbittorrent.umbra.mom`, with a direct `jay` user binding and the shared MFA flow.
|
||||
The owner confirms its public UI and both authentication layers are working
|
||||
on 2026-10-26. This confirmation is specific to qBittorrent, not proof that the
|
||||
broader per-user access migration is complete. qBittorrent retains its own password login, and internal Arr API
|
||||
connections do not pass through Authentik. See [Local downloads](downloads.md).
|
||||
|
||||
The embedded-outpost blueprint lists six `forward_single` providers, each with an
|
||||
explicit external host and empty `skip_path_regex`. A priority-1000 router
|
||||
on those hosts sends `/outpost.goauthentik.io/` directly to Authentik,
|
||||
bypassing forward-auth so callbacks can complete.
|
||||
|
||||
`trustForwardHeader=true`; forwarded response headers:
|
||||
Forwarded response headers:
|
||||
|
||||
```text
|
||||
X-authentik-username, X-authentik-groups, X-authentik-entitlements,
|
||||
@@ -219,50 +96,16 @@ X-authentik-meta-jwks, X-authentik-meta-outpost, X-authentik-meta-provider,
|
||||
X-authentik-meta-app, X-authentik-meta-version
|
||||
```
|
||||
|
||||
Forward-auth applies only to attached routers. Authentik is not a global gate
|
||||
for every service, directly published port, SSH connection or API token.
|
||||
|
||||
## State / secrets
|
||||
|
||||
| Host path | Container use |
|
||||
| --- | --- |
|
||||
| `/data/authentik/postgres` | PostgreSQL `/var/lib/postgresql/data`; identity, policy and MFA state |
|
||||
| `/data/authentik/data` | Server + worker `/data`; persistent files |
|
||||
| `/data/authentik/blueprints` | Worker `/blueprints/custom:ro`; host copy of repository blueprint |
|
||||
| `/data/authentik/postgres` | PostgreSQL `/var/lib/postgresql/data` |
|
||||
| `/data/authentik/data` | Server + worker `/data` |
|
||||
| `/data/authentik/blueprints` | Worker `/blueprints/custom:ro` |
|
||||
|
||||
Stack variable overrides/secrets are managed in Portainer; Compose retains
|
||||
non-secret configuration. Required Authentik stack secrets:
|
||||
|
||||
```text
|
||||
AUTHENTIK_SECRET_KEY
|
||||
AUTHENTIK_DB_PASSWORD
|
||||
OIDC_BESZEL_SECRET
|
||||
OIDC_DOZZLE_SECRET
|
||||
OIDC_GITEA_SECRET
|
||||
OIDC_HOMARR_SECRET
|
||||
OIDC_IMMICH_SECRET
|
||||
OIDC_PAPERLESS_SECRET
|
||||
OIDC_PORTAINER_SECRET
|
||||
OIDC_WARDROWBE_SECRET
|
||||
```
|
||||
|
||||
Client secrets are independently generated plaintext credentials, not old
|
||||
Authelia password hashes. The worker passes them to blueprint `!Env` entries.
|
||||
Keep each provider secret matched to its application configuration:
|
||||
Homarr uses `OIDC_HOMARR_SECRET`, Dozzle uses `DOZZLE_OIDC_CLIENT_SECRET`, Paperless
|
||||
`PAPERLESS_OIDC_CLIENT_SECRET`, and Wardrowbe `WARDROWBE_OIDC_CLIENT_SECRET`.
|
||||
Other clients store provider configuration in their databases/UIs.
|
||||
|
||||
Public Traefik routing defaults off (`AUTHENTIK_PUBLIC_ROUTING=false`) for
|
||||
private initial setup; enable only after securing the administrator account.
|
||||
The owner reports public deployment complete; this default is not deployed state.
|
||||
See [deployment](deployment.md) for the configuration surfaces and order.
|
||||
|
||||
`/data/authentik` and [Portainer state](portainer.md) are included in
|
||||
[Backrest](backups.md). Backups stop Authentik server/worker and PostgreSQL;
|
||||
new OIDC logins and forward-auth access are unavailable during that stop.
|
||||
Recovery remains untested, with no independent admin/MFA or stack-secret
|
||||
recovery arrangement; only the restic key has independent custody.
|
||||
Retention/deletion of retired `/data/authelia` data is unconfirmed.
|
||||
GitHub repository access uses a PAT; host SSH keys and tunnel credential files
|
||||
are separate from stack environment variables.
|
||||
- `authentik-data`: internal DB/server/worker network; worker also uses `authentik-egress`, server uses `traefik`. Internal DB network does not imply full egress isolation.
|
||||
- Secret inventory: `stacks/authentik/.env.example`; values in Portainer, consumed through `!Env`. Do not reuse Authelia hashes as client secrets.
|
||||
- Match provider/application credentials: Homarr `OIDC_HOMARR_SECRET`; Dozzle `DOZZLE_OIDC_CLIENT_SECRET`; Paperless `PAPERLESS_OIDC_CLIENT_SECRET`; Wardrowbe `WARDROWBE_OIDC_CLIENT_SECRET`.
|
||||
- Initial setup: `AUTHENTIK_PUBLIC_ROUTING=false`, SSH-forwarded `127.0.0.1:9000`; secure admin/MFA before public routing, prove OIDC before disabling local logins.
|
||||
- Backup coverage, login downtime and credential recovery: [Backups](backups.md).
|
||||
Reference in new issue
Block a user