Register Krautwatch as an OIDC client - #489
Open
ChrisonSimtian wants to merge 2 commits into
Open
Conversation
Krautwatch gained OIDC support (Chrison-dev/Krautwatch#48), so its web UI can stop carrying its own single-admin login. This adds the provider, application and policy bindings, following the Pangolin entry — including its grant_types lesson, which fails identically and just as opaquely when omitted. Admins only: Krautwatch drives the download client and writes the media library, which is machinery rather than something Family or Guests consume. Two redirect URIs, because the UI is LAN-only today and would move to a hostname the day it is fronted; registering both now keeps that a compose edit. Nothing switches over yet — krautwatch-web keeps its local login until the client pair exists in Bitwarden Secrets Manager.
ChrisonSimtian
force-pushed
the
feat/krautwatch-oidc
branch
from
August 23, 2026 07:45
d28844c to
8901ce4
Compare
The blueprint entry was inert as written. authentik.lxc.yaml's `secrets:` block creates the podman secret; injecting it as an environment variable takes a `Secret=…,type=env,target=…` line in the server and worker quadlets, and the worker is what applies blueprints. Without it `!Env` resolves null and authentik rejects the entire file — #497, with the collateral being whatever else happens to be in it. The runner also never saw the pair: _deploy-stack.yml has no secrets.env and falls back to process env, so every secret a stack declares has to be listed explicitly. Same class as #446/#471/#490. Both found in review by the Homelab session. The shape and the quadlet each looked correct in isolation, which is exactly what made #497 hard to see.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Self-contained as of the latest commits — the three pieces a working client needs are all here or
already done. Recorded because the failure mode is silent-adjacent and the pieces look independent:
_deploy-stack.ymlenvSecret=…,type=env,target=…in the authentik server + worker quadletsDeclaring the pair in
authentik.lxc.yamlonly creates the podman secret. Without the quadletlines it is never injected,
!Envresolves null, and authentik rejects the entire blueprint file— #497, whose collateral is whatever else is in that file at the time. The worker is what applies
blueprints, so it is the one that must have it; both carry it for symmetry.
Krautwatch gained OIDC support (Chrison-dev/Krautwatch#48), so its web UI can stop carrying a single-admin login of its own. This registers it, following the Pangolin entry.
What is here
!Envfrom Bitwarden Secrets Manager,include_claims_in_id_token: true(Krautwatch reads the groups claim itself), and an explicitgrant_typesallow-list. That last one is copied deliberately: omitted, it fails exactly as opaquely as it did for Pangolin.krautwatch.Homelab AdminsandMedia Adminsonly. Krautwatch drives the download client and writes into the media library — machinery, not something Family or Guests consume. Plex is the output they want.authentik.lxc.yaml, matching the Pangolin pattern.Two redirect URIs, strict rather than regex — ASP.NET Core's handler uses one fixed callback path, so there is nothing variable to match:
Registering the second now means fronting the UI later is a compose edit rather than an identity change.
Nothing switches over in this PR
krautwatch-webkeepsAuth:Provider=local. Flipping it needs two things that are not mine to do:AUTHENTIK_KRAUTWATCH_CLIENT_ID/_SECRETin Bitwarden Secrets Manager, before a converge — the blueprint's!Envtags resolve to nothing otherwise, and a provider with an empty client id is a provider that rejects every request.krautwatch-web, plus:RequiredGroupsduplicates the bindings above on purpose — two independent checks, so a binding lost to a careless converge does not silently open the UI.Worth knowing while you are in there
krautwatch-web.containeris pinned to:0.1.1, and the OIDC support ships in v0.7.0 — the whole Krautwatch stack there is many releases behind. Bumping it is a separate job: v0.4.0 migrates timestamp columns in place, so the Migrator does real work on that upgrade and the database wants a backup first.