Inbox: allow embedding the Inbox window in a trusted host (configurable frame-ancestors)

Aperta
#3,299 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
electron, typescript
Ambito
backend, security

Direzione di ricerca

Start with the Inbox server's response headers, where X-Frame-Options: DENY and frame-ancestors 'none' are set, and with the existing buildFrameAncestorsPolicy in the preview proxy as the pattern to follow. Add an opt-in value from PLANNOTATOR_INBOX_FRAME_ANCESTORS or --frame-ancestors, leaving the default unchanged. Done means that with the setting unset the headers are identical to today, and with it set frame-ancestors is sent and X-Frame-Options is dropped, while the same-origin write checks still pass.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

The Inbox server answers every page with X-Frame-Options: DENY and frame-ancestors 'none'. That is the right default, but it blocks a legit setup: showing the Inbox (and the Board, #board) inside a local agent desktop app, next to the chat that writes to it. Today the only way is a local reverse proxy that strips those headers and rewrites Origin/Host so the Inbox's same-origin check still passes. It works, but every user who wants this has to rebuild the Inbox's CSRF and DNS-rebinding checks in the proxy, which is easy to get wrong.

Plannotator already does this for editors: the preview proxy sets frame-ancestors <editor origins> (buildFrameAncestorsPolicy). The Inbox has no equivalent.

Proposal

An opt-in setting, for example PLANNOTATOR_INBOX_FRAME_ANCESTORS (env) or plannotator inbox --frame-ancestors "<origins>":

  • when unset, nothing changes (DENY / 'none');
  • when set, the Inbox sends frame-ancestors <value> and drops X-Frame-Options, and nothing else changes: the cross-origin check on writes stays as it is, because the framed page is still same-origin with the server.

Use case

Hermes desktop (Electron) plugin: an "Inbox" and a "Board" page that load http://plannotator.localhost:61738/#board in an iframe, so the person answers threads and moves cards without leaving the agent app. The UI stays the Inbox's own bundle, so it keeps up with plannotator update.

Happy to send a PR if the shape looks right.

Lingua principale
TypeScript
Stelle
8.7k
Fork
649
Merge medio
10h 45m
PR unite (30g)
830

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di backnotprop/plannotator

Tutte le issue di backnotprop/plannotator

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.