dorfteich/packages/shared/src
Claude Fable 5 5796b7a5dd
Some checks failed
CI / Lint, typecheck, test (pull_request) Failing after 14s
CI / Import/export fidelity gate (pull_request) Has been skipped
CI / Build container images (pull_request) Has been skipped
CI / Auth e2e pack (pull_request) Has been skipped
#214: OIDC Authorization Code with PKCE, Keycloak as reference IdP
External authentication (ADR 0021) built on jose (#188's vetted library)
plus fetch — no new dependency enters the supply chain for a security
base function. Discovery-configured; ID tokens validate against the
IdP's JWKS under an explicit RS256/ES256 allowlist with issuer,
audience, expiry and nonce binding. State, nonce and the PKCE verifier
travel in a signed HttpOnly Lax cookie keyed by a dedicated HKDF
purpose (oidc-state, ADR 0020).

Deploy-level configuration (OIDC_ISSUER/CLIENT_ID/CLIENT_SECRET/SCOPES/
PROVIDER_LABEL): who authenticates users is a platform decision. The
login page discovers the provider via GET /auth/methods and renders the
SSO button (i18n de+en).

Identities use the existing slot (provider oidc:<issuer>, subject from
the token). First login creates the account just-in-time — ACTIVE and
mail-verified only when the IdP asserts a verified address. An existing
local account is NEVER adopted silently by e-mail (account-takeover
path): login refuses with oidc_link_required and the owner links
explicitly via GET /auth/oidc/link (audited auth.identity_linked,
catalogue v1.3). Sessions come from the one existing session service.

Tests run the full flow against a protocol-faithful fake IdP: PKCE
verifier at the token endpoint, JIT creation incl. personal pond,
invalid state/nonce/signature/issuer/audience/expiry each rejected, the
linking refusal and the explicit link flow. Verified end-to-end against
a real Keycloak 26.0 (repeatable procedure documented in security.md
§External authentication).

Refs #214.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AUtYMxwTCMHG9mVHnwbFg8
2026-07-31 12:44:52 +02:00
..
editor-schema #169: Nicht-Text-Inhalte — Task-Checkboxen, Wissensgraph 2026-07-21 14:35:16 +02:00
permissions #205: classification inherits down the tree; lowering is a guarded, audited act 2026-07-31 06:12:26 +02:00
admin-users.ts Add Site-Admin user management (#59) 2026-07-10 00:31:41 +02:00
api-error.ts Add NestJS API skeleton with config, logging, and /healthz 2026-07-04 19:10:07 +02:00
api-tokens.ts Public REST API v1: personal access tokens, instance switch + per-pond opt-in (#104) 2026-07-12 11:17:03 +02:00
auth.test.ts Add user, identity, session, and auth-support data model 2026-07-05 00:42:22 +02:00
auth.ts #214: OIDC Authorization Code with PKCE, Keycloak as reference IdP 2026-07-31 12:44:52 +02:00
backup-set.ts Nextcloud backup target: admin-configured, manual + scheduled uploads, in-app restore (#103) 2026-07-12 10:39:18 +02:00
backup-status.ts Backup mirror to BASEL: rsync of the sets after every successful run (#84) 2026-07-12 12:20:32 +02:00
backup-target-policy.test.ts #192: deploy-level backup target allowlist 2026-07-30 12:17:14 +02:00
backup-target-policy.ts #192: deploy-level backup target allowlist 2026-07-30 12:17:14 +02:00
collab-token.test.ts #188: purpose-bound token keys via HKDF, jose replaces the homegrown JWT 2026-07-30 06:41:11 +02:00
collab-token.ts #188: purpose-bound token keys via HKDF, jose replaces the homegrown JWT 2026-07-30 06:41:11 +02:00
comments.ts Add threaded page comments: data model, API, and comment policy (#91) 2026-07-11 21:42:29 +02:00
conversion.ts Obsidian vault import: endpoint, job orchestration, rollback (#117) 2026-07-14 17:13:11 +02:00
env.test.ts Add Prisma with PostgreSQL, automatic migrations, and /readyz 2026-07-04 19:16:44 +02:00
env.ts #214: OIDC Authorization Code with PKCE, Keycloak as reference IdP 2026-07-31 12:44:52 +02:00
favorites.ts Favorites: personal page stars, golden icons, sidebar filter (#132) 2026-07-16 12:03:55 +02:00
feed-tokens.ts #149: Atom-Feeds für Teiche und Seiten, privat via Feed-Token 2026-07-20 00:49:53 +02:00
files.ts Add non-image attachments with allowlist, SVG policy, and file managers (#61) 2026-07-10 02:52:40 +02:00
fonts.test.ts Add per-pond fonts: catalog, build, application, and admin UI (#66) 2026-07-10 11:16:29 +02:00
fonts.ts CSP: data:-Fonts erlauben (eingebettete Fonts in Excalidraw-SVGs) 2026-07-19 22:27:17 +02:00
health.test.ts Scaffold pnpm monorepo with lint, format, and test tooling 2026-07-04 19:06:27 +02:00
health.ts Scaffold pnpm monorepo with lint, format, and test tooling 2026-07-04 19:06:27 +02:00
home.ts Editable landing page for the Site Admin 2026-07-12 23:50:16 +02:00
i18n-tools.test.ts Add i18n with i18next, German and English, and a key-parity check 2026-07-04 19:23:45 +02:00
i18n-tools.ts Add i18n with i18next, German and English, and a key-parity check 2026-07-04 19:23:45 +02:00
index.ts #192: deploy-level backup target allowlist 2026-07-30 12:17:14 +02:00
labels.test.ts Add label UI: tree management, page assignment, and sidebar filter (#44) 2026-07-09 11:41:42 +02:00
labels.ts Page hierarchy: parentId, create-under-parent, reparent (#106) 2026-07-14 09:57:47 +02:00
legal.ts Add instance legal pages with public rendering and footer links (#82) 2026-07-11 16:40:04 +02:00
links.ts Pond-wide wikilink graph endpoint (#111) 2026-07-14 10:21:25 +02:00
members.ts Add pond member management UI (#54) 2026-07-09 20:22:52 +02:00
notifications.ts #151: Mention-Benachrichtigungen über die Glocke 2026-07-20 01:25:16 +02:00
pages.ts #212: mark attachment downloads by filename prefix and companion file 2026-07-31 07:29:16 +02:00
plugins.ts Add pageTool plugins with toc and page-index references (#77) 2026-07-11 13:27:30 +02:00
ponds.ts #186: pond accent theming — scoped derivation, cascade pond > user > default 2026-07-29 09:09:36 +02:00
public-api.ts #211: classification through feeds, public API, search and the no-JS shell 2026-07-31 07:23:53 +02:00
quotas.ts Add Site-Admin quota override management UI (#58) 2026-07-10 00:14:28 +02:00
search.test.ts Add SearchProvider interface with PostgreSQL FTS (#49) 2026-07-09 13:25:05 +02:00
search.ts #211: classification through feeds, public API, search and the no-JS shell 2026-07-31 07:23:53 +02:00
secret-store.ts Add backup sidecar: nightly dump, volume archive, prune, status, restore (#83) 2026-07-11 17:29:15 +02:00
setup.ts Add the first-run setup wizard UI (#81) 2026-07-11 16:05:01 +02:00
system.ts #224: read-trail storage — partitioning, retention, admin query path 2026-07-31 12:21:45 +02:00
text-diff.test.ts Add version history UI: list, view, diff, restore (#42) 2026-07-09 08:53:42 +02:00
text-diff.ts Add version history UI: list, view, diff, restore (#42) 2026-07-09 08:53:42 +02:00
theme.test.ts #184: shared accent engine — WCAG-conforming tokens by construction 2026-07-29 08:59:27 +02:00
theme.ts #184: shared accent engine — WCAG-conforming tokens by construction 2026-07-29 08:59:27 +02:00
token-crypto.crossruntime.test.ts #188: purpose-bound token keys via HKDF, jose replaces the homegrown JWT 2026-07-30 06:41:11 +02:00
token-crypto.ts #214: OIDC Authorization Code with PKCE, Keycloak as reference IdP 2026-07-31 12:44:52 +02:00
tree.ts Page hierarchy: parentId, create-under-parent, reparent (#106) 2026-07-14 09:57:47 +02:00
users.ts #150: @-Mentions — Inline-Node, instanzweite User-Suche, Autocomplete 2026-07-20 00:56:07 +02:00
watches.ts Add watches: follow pages and ponds with auto-watch preferences (#93) 2026-07-11 22:59:11 +02:00
webdav.test.ts Nextcloud backup target: admin-configured, manual + scheduled uploads, in-app restore (#103) 2026-07-12 10:39:18 +02:00
webdav.ts Nextcloud backup target: admin-configured, manual + scheduled uploads, in-app restore (#103) 2026-07-12 10:39:18 +02:00