Sandbox host runtime for plugin iframes #73
Labels
No Label
area:auth
area:docs
area:export
area:ops
area:storage
area:supply-chain
auth
backend
blocked
collab
deployment
docs
effort:L
effort:M
effort:S
frontend
plugins
qa
vs-nfd
vs-nfd:blocker
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: stwaidele/dorfteich#73
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Code plugins execute in opaque-origin iframes with a capability-filtered RPC bridge — the security core of the plugin system (ADR 0008).
Scope
Implement the host runtime in
apps/web: iframe factory (sandbox="allow-scripts", noallow-same-origin, per-frame CSP via srcdoc/headers per plugin-architecture.md), RPC router binding SDK protocol to host services with capability filtering against the manifest (undeclared capability → rejected + logged), per-request timeouts and frame health (hung plugin → error placeholder, never a frozen app), resize protocol, and teardown on navigation.Acceptance criteria
Technical notes
Dependencies
Depends on #70.
Size: ~2 days
Conventions: English code/comments, clear human-readable code, no hard-coded UI strings (ADR 0012, add
deanden), permission checks only via the shared guard (docs/architecture/permissions.md). Read the referenced ADRs before starting.Done in
0875e2a. Pipeline fully green (all 8 contexts incl. the new plugin sandbox e2e pack running against the Test stage).Sandbox host runtime (ADR 0008 security core):
sandbox="allow-scripts", neverallow-same-origin) via a new per-plugin frame document served with a CSP that pins every load to the plugin's own asset path and setsconnect-src 'none'(no network). The CSP origin comes fromAPP_BASE_URL, not the requestHost, so a Host-rewriting proxy can't break it.Acceptance criteria (all met, security pack
e2e/plugins.spec.ts):capability_not_permitted)fetchboth fail)Note: the first parallel CI run flaked on the fidelity gate (cold action-cache extraction race at runner capacity 4, unrelated to this change); the job passed on re-run with a warm cache.