[VS-NfD] Implement OIDC Authorization Code with PKCE, Keycloak as reference IdP #214
Labels
No Label
area:auth
area:docs
area:export
area:ops
area:storage
area:supply-chain
auth
backend
blocked
collab
deployment
docs
effort:L
effort:M
effort:S
frontend
plugins
qa
vs-nfd
vs-nfd:blocker
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: stwaidele/dorfteich#214
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Plan reference:
20-massnahmenplan.md-> P1-1ADR: ADR 0021
Effort: L (5–6 AT)
Depends on: #188
Context
Authentication is a security base function §52 VSA assigns to the
platform. Delegating it to the operator's IdP is the single most important
step in keeping Dorfteich out of the certification obligation under §51
VSA.
Current state
model UserIdentity(
apps/api/prisma/schema.prisma:562–577) — "provideris 'password'today and 'oidc:' later",
@@unique([provider, subject]),credentialholds the Argon2id hash for password identities.oidcacrossapps/api/srcandpackages/shared/srcreturns nothing outside thatcomment. ADR 0007 declares the readiness, not the feature.
Acceptance criteria
discovery-based configuration, and JWKS-based token validation using
the vetted library from #188 — no hand-rolled JWT verification.
provider = "oidc:<issuer>",subjectfrom the token; an existing local user islinked by a documented, deliberate rule (not silently by e-mail).
decision against it) and session creation reuse the existing session
service — no parallel session mechanism.
the test is repeatable.
nonce, signature, issuer and audience each rejected; expired token
rejected.
docs/architecture/security.mdand #227 document configuration;ADR 0021 records the decisions.
Out of scope
SAML and LDAP, claim-to-role mapping (#217), and disabling local
authentication (#216).
Implemented in PR #282 (commit
5796b7a); merged via the fast-forward chain PRs #283-#285 (runs 602-604 green over the cumulative diffs; #282 own run 601 failed only on the known action-cache runner signature). CD 609 green, readyz test+int ok; GET /auth/methods live answers {local:true, oidc:null} (OIDC deploy-level unconfigured on the stages, as intended). OIDC Authorization Code + PKCE on jose+fetch (no new dependency), discovery + JWKS validation (RS256/ES256 allowlist, issuer/audience/expiry/nonce), signed state cookie with a dedicated HKDF purpose, JIT accounts (verified-mail required), NO silent adoption by e-mail (oidc_link_required + explicit link flow, audited, catalogue v1.3). 5 e2e tests against a protocol-faithful fake IdP; verified end-to-end against real Keycloak 26.0 via curl (repeatable procedure in security.md, section External authentication).