Heimdall/tests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Meta Vens ea804ddbbe R21.1: bind the browser_completion attempt handle to the private plane
The public /v1/oauth/:provider/start route read handoff.attemptId
straight out of the request body and folded it into the signed state
token unconditionally. Since the private command plane's beginAuth
mints an attempt handle server-side and later redeems by that handle
(consumeAuthCompletionByAttempt), anyone who learned a pending handle
could carry it through their own OAuth flow and bind their own
identity to it -- the app's completeAuth(H) would then authenticate
the victim's session as the attacker. Same family as the takeover
chain closed in the prior pass: a caller-chosen identifier trusted as
authority.

normalizeOAuthHandoff now always strips attemptId from a
browser_completion handoff; a public caller has no attempt to
correlate and gets its completion code directly. The only path an
attempt handle can reach the state token is startOAuthFlow's new
trustedBrowserAttemptId option, which is a TypeScript function
argument set by beginAuth from the handle it just minted -- never a
value parsed out of a request body.

Also adds the uniqueness constraint the by-attempt redemption needed:
a partial unique index on (app_slug, attempt_id) WHERE attempt_id IS
NOT NULL AND consumed_at IS NULL, mirrored in InMemoryStore. Without
it, consumeAuthCompletionByAttempt's UPDATE could match more than one
row and silently discard all but the one it returned.

Flips Soul's attempt-handle-binding it.fails to a passing it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-08 14:43:33 +02:00
..
access-plugin.test.ts Tests/docs: promote Soul's two it.fails, update the tripwire and fixtures 2026-09-08 14:23:04 +02:00
app-registry.test.ts Tests/docs: promote Soul's two it.fails, update the tripwire and fixtures 2026-09-08 14:23:04 +02:00
app.test.ts Update tests for uniform caller-identity gating (R5, fork 1B) 2026-09-08 13:53:09 +02:00
browser-adapter.test.ts Resume Heimdall auth from browser return witness 2026-08-22 11:42:28 +02:00
caller-identity-attack-soul.test.ts R21.1: bind the browser_completion attempt handle to the private plane 2026-09-08 14:43:33 +02:00
caller-identity-soul.test.ts Tests/docs: promote Soul's two it.fails, update the tripwire and fixtures 2026-09-08 14:23:04 +02:00
capability-rules.test.ts Make app capability rules data instead of code 2026-09-06 23:58:58 +02:00
idunn-candidate-bind.test.ts Move the private command port with the candidate 2026-09-06 22:15:34 +02:00
idunn-rudp-health.test.ts Publish runtime presence in the contract Odin admits 2026-09-07 22:19:51 +02:00
odin-publication.test.ts Give Heimdall Odin documents unique catalog keys 2026-08-22 03:47:02 +02:00
presence-identity-descriptor.test.ts Assert descriptor selection instead of reading a live descriptor 2026-09-08 13:52:47 +02:00
process-write-lease.test.ts Follow CultLib's package rename and select workspaces by path 2026-09-07 22:26:24 +02:00
security.test.ts Authenticate Heimdall health publications 2026-08-20 19:56:35 +02:00
store.test.ts Add Eve access plugin and private auth plane 2026-08-22 00:44:57 +02:00
verse-runtime.test.ts Retire the Spotiverse profile; keep the spotify provider intact for restore 2026-09-06 01:47:10 +02:00
verse-witness.test.ts Retire the Spotiverse profile; keep the spotify provider intact for restore 2026-09-06 01:47:10 +02:00