Consent: optional at registration, a consent page, CSRF-guarded accept/withdraw, notice v2 #58

Merged
heimdall merged 4 commits from heimdall/consent-optional into main 2026-11-11 12:11:03 +00:00

2026-11-11

Heimdall
Docs: training notice v2 rulings, optional consent, consent page, version-bump behavior
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-11 11:34:50 +00:00
Heimdall
Consent page: Withdraw whenever any live receipt exists, Agree whenever none is live for the version in force
An account on an older receipt sees both buttons.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-11 11:33:51 +00:00
Heimdall
Consent tests: a live receipt for the version in force outranks an older live one
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-11 11:26:10 +00:00
Heimdall
Consent: optional at registration, a consent page with accept and withdraw, notice version 2
Registration without acceptedNoticeVersion (JSON) or with the box unticked (form) creates the account with no receipt; a version sent must still equal the one in force. GET /auth/bifrost/consent shows the notice and the account's state with the one applicable button. POST accept and withdraw are forms behind the strict RequestOriginGuard.Allows (403 before any read or write), idempotent, and withdraw is no longer JSON. The ConsentReceipt unique index becomes filtered to live rows so a person can agree again after withdrawing. TrainingNotice.Version = 2 with the ruled text.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-11 11:22:22 +00:00