Skip to content

feat: mission binding verification and AAuth-Mission coverage enforcement - #9

Merged
marcofanti merged 1 commit into
mainfrom
mission-binding
Aug 6, 2026
Merged

feat: mission binding verification and AAuth-Mission coverage enforcement#9
marcofanti merged 1 commit into
mainfrom
mission-binding

Conversation

@marcofanti

Copy link
Copy Markdown
Owner

Two mission-shaped additions that belong in the library because both the person server and mission-aware resources need them (lifecycle/state stays in the person server):

  • MissionBindings256(bytes) matching the PS reference encoding (unpadded base64url SHA-256 of the canonical mission JSON), matchesDocument(mission, bytes), and matchesClaim(mission, tokenMissionClaim).
  • RequestVerifier — the Result record now carries the parsed AAuth-Mission header (result.mission()), and a request bearing AAuth-Mission without aauth-mission among the signature-covered components is rejected (aauth-mission header not covered by signature). Stricter than the Python reference — an uncovered header could be swapped after signing; documented under deviations.

Tests: s256 reference vector, document/claim matching, mission surfaced when covered, injected-after-signing header rejected, missionless requests unchanged. 207 tests green, all gates met.

🤖 Generated with Claude Code

@marcofanti
marcofanti merged commit 4aed976 into main Aug 6, 2026
1 check passed
@marcofanti
marcofanti deleted the mission-binding branch August 6, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant