Status: Accepted (2026-11-27). Refines 0023 items 2 and 4. 0905 adds host-scoped non-Secure cookies for listed plain-HTTP LAN origins, and makes the prod-like edge forward Host (the same-origin check below never matched through it before). Cookie and header names updated by 0028 (2026-11-30).
ADR 0023 requires a double-submit X-CSRF-Token, but does not say how the web app gets the token. MeRes has no field for it, and the contract is frozen. PATs are bearer credentials for agents and scripts. If a PAT could mint PATs, one leaked files:read token could escalate to projects:admin.
csrf_secret.
X-CSRF-Token response header of signup, login and GET /v1/me (exposed to CORS-allowed origins), and in a readable linora_csrf cookie (__Host-linora_csrf in production).X-CSRF-Token. It is compared in constant time with the stored secret, so this is a synchronizer token, stronger than a pure double-submit.Origin that is in LINORA_ALLOWED_ORIGINS or same-origin with Host.Origin when present (login CSRF).logout, listTokens, createToken and revokeToken refuse PATs with 403. PATs are minted and revoked from a browser session only.cred_revoked with the credential id (s. + 12-byte hash prefix, or p. + token id) that realtime tokens carry as sid.csrfToken to MeRes (a contract change for something a header carries fine).csrf_secret).The web shell (WP-D) reads X-CSRF-Token after signup, login or me and sends it on every mutation. In dev it proxies /v1 through Vite, so requests are same-origin. Agents need a human to create their PAT in the UI. That is the intended trust boundary.