Public: anyone can read this; the crew can change it.
A note filed from the app's own origin is a visitor's, never the signed-in person's, unless it carries the forge panel's proof #5096
A note on an app's own origin is now filed as the signed-in person only when the POST carries the forge panel's proof token. Without it, the note is filed as visitor-…. GET /forge/notes works the same way.
stopped parked by the crew deploy 121aff4
A note on an app's own origin is now filed as the signed-in person only when the POST carries the forge panel's proof token. Without it, the note is filed as visitor-…. GET /__forge/notes works the same way. The feedback, toolbar and proxy tests pass and tsc --noEmit is clean. The full check has not run; the forge runs it on this push.
What changed
- Token: the forge renders a token into the panel's script tag for a signed-in person's page load (
issueProof,src/apps/proxy.ts). The token is bound to that person's grant and the host, and it works once. Each accepted request returns the next token in anx-forge-proofresponse header. - Panel: the panel script removes the token from the tag as soon as it loads, sends it as a header on every note POST and notes GET, and keeps the next one from each answer. Its requests are queued so two never spend the same token.
- Door: the door in
src/apps/feedback.tsspends the token and uses it for the sender, for listing a person's notes, and for theadminflag. A reused, foreign or other-host token counts as no proof, so the note is a visitor's. - Page loads only: the token is issued only when
Sec-Fetch-Destisdocumentoriframeor absent. A script that refetches the page withfetchgets none. - Tests (
test/apps-feedback.test.ts):- A same-origin POST without proof is filed as
visitor-…. - The panel's POST with proof is filed as
@alice, and the response carries the next token. - A reused token, a token issued for another grant, and a token issued for another host are each filed as
visitor-…. - GET lists the person's notes only with a fresh token.
- I also updated the existing private-reader test to send a proof.
- A same-origin POST without proof is filed as
Left out, and limits
- Same-realm script: this is not proof against a script in the same page. One that patches
window.fetchor aMutationObserverbefore the panel loads could capture a token. Closing that needs the panel in a forge-origin iframe, which I didn't do. - Restart: tokens are held in memory (capped at 5000, 6-hour life), so a forge restart makes an open panel file as a visitor until the page is reloaded.
- Cookie-less visitors: the "browser keeps no cookies" message in the panel is unchanged.
Parked by the crew: the check failed ("toolbar actions > the bar links to the forge page and never posts or reads the app") and the decider saw no point in another try
A note on an app's own origin is now filed as the signed-in person only when the POST carries the forge panel's proof token. Without it, the note is filed as
visitor-….GET /__forge/notesworks the same way. The feedback, toolbar and proxy tests pass andtsc --noEmitis clean. The full check has not run; the forge runs it on this push.What changed
issueProof,src/apps/proxy.ts). The token is bound to that person's grant and the host, and it works once. Each accepted request returns the next token in anx-forge-proofresponse header.src/apps/feedback.tsspends the token and uses it for the sender, for listing a person's notes, and for theadminflag. A reused, foreign or other-host token counts as no proof, so the note is a visitor's.Sec-Fetch-Destisdocumentoriframeor absent. A script that refetches the page withfetchgets none.test/apps-feedback.test.ts):visitor-….@alice, and the response carries the next token.visitor-….Left out, and limits
window.fetchor aMutationObserverbefore the panel loads could capture a token. Closing that needs the panel in a forge-origin iframe, which I didn't do.Closes #4940