99 lines
7.9 KiB
YAML
99 lines
7.9 KiB
YAML
project:
|
|
name: Heimdall
|
|
status: active
|
|
phase: discord_launch
|
|
premise: >
|
|
Build Heimdall as one reusable GameCult auth authority service for OAuth,
|
|
linked identities, local sessions, grants, and capability claims without
|
|
mixing in app-domain audience or product data.
|
|
|
|
objective:
|
|
primary: >
|
|
Create a shared auth authority service that Repixelizer, StreamPixels, and
|
|
future GameCult-hosted experiments can consume.
|
|
current: >
|
|
Verify the first live Discord-backed Repixelizer auth flow in a real
|
|
browser session now that Heimdall and Repixelizer are deployed and wired on
|
|
Yggdrasil.
|
|
|
|
constraints:
|
|
- Heimdall owns auth/control-plane authority; app-domain data stays app-owned by default.
|
|
- Prefer a same-host Heimdall service on Yggdrasil over duplicated per-app provider stacks.
|
|
- Host apps verify signed claims locally for routine guarded routes.
|
|
- App profiles stay thin; the shared architecture note owns the main model.
|
|
- StreamPixels audience and creator data must not be absorbed into a shared auth store.
|
|
|
|
invariants:
|
|
- The map is canonical and slow-changing.
|
|
- Scratch is temporary and disposable.
|
|
- Evidence is durable and distilled; routine activity logs belong in git history and commit messages.
|
|
- Heimdall owns OAuth, local sessions, grants, entitlement refresh, capability evaluation, and audit surfaces.
|
|
- App-domain data stays with the host app unless there is a deliberate, source-grounded reason to share it.
|
|
- Host apps verify signed claims locally and keep resource ownership checks local.
|
|
- StreamPixels can reuse shared auth authority without centralizing streamer-audience data.
|
|
- Persistent state cruft is the same failure class as architecture cruft.
|
|
|
|
data_flow:
|
|
observe:
|
|
- task request
|
|
- shared architecture note
|
|
- app profile bindings
|
|
- current app/runtime seams in Repixelizer and StreamPixels
|
|
- Yggdrasil host topology and nginx/service shape
|
|
process:
|
|
- rehydrate from canonical state
|
|
- choose one bounded architecture or implementation slice
|
|
- keep auth authority and app-domain data boundaries explicit
|
|
- keep routine route auth local after claim verification
|
|
- record only belief-changing evidence
|
|
- commit or backtrack
|
|
cut:
|
|
- reject shared-data creep
|
|
- reject duplicated auth blobs per app
|
|
- reject per-request auth round-trip chatter
|
|
|
|
active_subgoals:
|
|
- Keep the shared architecture explicit and separate from app profiles.
|
|
- Preserve the default boundary that app-domain data remains app-owned.
|
|
- Align the plan to Heimdall as a Yggdrasil-hosted authority service.
|
|
- Verify the Discord-only Repixelizer auth path with real provider credentials, stable signing, persistent storage, and live browser callback verification.
|
|
- Keep Patreon/GitHub/Twitch/YouTube as catalogued but not implemented until their runtime adapters land.
|
|
|
|
accepted_design:
|
|
- `docs/architecture.md` is the canonical shared architecture note.
|
|
- `docs/service-contract.md` records the concrete HTTP/JWKS contract of the landed service slice.
|
|
- `docs/app-profiles/*.md` are thin app bindings, not duplicate brains.
|
|
- Heimdall owns provider OAuth, identity linking, signed local sessions, grants, entitlement refresh, capability evaluation, and audit events.
|
|
- Host apps own their domain data, runtime state, and product-specific resources.
|
|
- Host apps verify signed claims locally for routine route authorization.
|
|
- A shared Heimdall store, if it exists, should hold auth/control-plane truth only.
|
|
- Repixelizer is the first auth-blank hosted-app binding.
|
|
- StreamPixels is the migration case that proves shared authority must not imply audience-data centralization.
|
|
- The first service skeleton is a standalone TypeScript/Fastify app with Ed25519 JWT signing, JWKS discovery, signed OAuth `state`, and app-profile-driven shared capability evaluation.
|
|
- The first stateful slice adds durable auth/control-plane storage plus a real Discord callback path for Repixelizer.
|
|
- Repixelizer has consumed the Heimdall backend-callback flow in its hosted web layer; Heimdall no longer needs to wait on Repixelizer refactoring before live Discord launch work.
|
|
- Heimdall is deployed on Yggdrasil at `https://heimdall.gamecult.org` with nginx/TLS, Postgres storage, file-backed signing-key bootstrap, configured token custody, and passing public health/discovery/JWKS checks.
|
|
- Repixelizer is deployed on Yggdrasil at `https://repixelizer.gamecult.org` with `GC_ACCESS_MODE=heimdall`, `GC_ACCESS_ALLOWED_PROVIDERS=discord`, required access, queue protection enabled, and app-owned Discord guild/role policy sent to Heimdall during backend-callback OAuth start.
|
|
|
|
landed_baseline:
|
|
- Shared architecture extracted into its own repo and renamed to Heimdall.
|
|
- Repixelizer and StreamPixels app-profile notes created.
|
|
- Repo-local state, handoff, and compaction scaffolding created.
|
|
- Initial Heimdall service skeleton landed with discovery, JWKS, OAuth start/callback contract surfaces, and claim issuance scaffolding.
|
|
- Durable auth persistence landed for accounts, linked identities, sessions, grants, entitlement snapshots, and audit events.
|
|
- The first real provider slice landed for Discord callback exchange, identity resolution, entitlement evaluation, and session/claim issuance for Repixelizer.
|
|
- Signing-key persistence/bootstrap, managed token encryption at rest, and a local verifier seam landed for the first real consumer integration pass.
|
|
- Direct backend callback handoff landed as the preferred same-host app-consumer path, with browser completion-code exchange retained as fallback.
|
|
- Repixelizer's hosted web layer now creates Heimdall auth attempts, receives direct backend callbacks, verifies Heimdall Ed25519 access tokens locally, and adopts httpOnly local sessions.
|
|
|
|
rejected_paths:
|
|
- name: per_app_auth_copy_paste
|
|
reason: duplicates the same provider/session sludge across every experiment
|
|
- name: per_request_auth_round_trip
|
|
reason: turns shared auth into a noisy bottleneck instead of local claim verification
|
|
- name: shared_user_data_swamp
|
|
reason: reusing auth mechanics does not justify centralizing app-domain audience or product data
|
|
|
|
current_status:
|
|
summary: Heimdall has a live first Yggdrasil deployment for the Discord-only Repixelizer path: TypeScript/Fastify runtime behind nginx/TLS at `https://heimdall.gamecult.org`, Ed25519 JWT signing with bootstrapped file-backed key support, JWKS/discovery exposure, signed OAuth start-state handling, Postgres-backed auth/control-plane persistence, a real Discord callback path, AES-256-GCM token sealing for managed provider credentials at rest, direct backend callback delivery for Repixelizer, and the older one-time completion-code exchange retained as fallback. Repixelizer is deployed at `https://repixelizer.gamecult.org` in Heimdall mode with Discord as the only public provider, required access enabled, queue protection enabled, and app-owned Discord guild/role policy sent to Heimdall in trusted backend-callback OAuth starts. Public health/discovery/JWKS/config checks pass, and public auth-start returns a Discord authorization URL using the Heimdall callback plus Repixelizer backend handoff. Patreon, GitHub, Twitch, and YouTube are catalogued providers but their callback runtimes are still not implemented. The key boundary still holds: Heimdall owns auth/control-plane authority and credential custody; app-domain bindings and runtime behavior remain app-owned.
|
|
next_action: Run the real browser OAuth flow end to end from `https://repixelizer.gamecult.org/app/` with a Discord account that has the `KLTST` role or the Patreon-synced `Inner Sanctum` role, confirm Repixelizer sends its caller-owned Discord role policy, Heimdall receives the Discord callback, confirms guild role entitlement, delivers the backend callback to Repixelizer, Repixelizer adopts a local httpOnly session, and hosted/queue routes are gated correctly. The public OAuth start URL should request only `identify guilds.members.read`.
|