@botiverse/porthole 0.14.18 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -0
- package/dist/check/page-source.js +1 -1
- package/dist/conformance/harness-source.js +1 -1
- package/dist/isolation/served.d.ts +9 -0
- package/dist/isolation/served.js +23 -0
- package/dist/server/host.d.ts +7 -0
- package/dist/server/host.js +1 -0
- package/dist/server/pages.d.ts +39 -12
- package/dist/server/pages.js +85 -37
- package/dist/server/server.js +168 -40
- package/dist/server/types.d.ts +30 -0
- package/dist/shell/annotate.js +3 -2
- package/dist/shell/find.js +2 -1
- package/dist/shell/frame.d.ts +3 -34
- package/dist/shell/frame.js +26 -14
- package/dist/shell/runtime.d.ts +3 -2
- package/dist/shell/runtime.js +12 -6
- package/docs/ADOPTING.md +18 -4
- package/docs/DECISIONS.md +191 -2
- package/docs/DESIGN.md +4 -0
- package/docs/THREAT_MODEL.md +35 -2
- package/package.json +1 -1
- package/src/isolation/served.ts +25 -0
- package/src/server/host.ts +8 -0
- package/src/server/pages.ts +129 -56
- package/src/server/server.ts +237 -40
- package/src/server/types.ts +30 -0
- package/src/shell/annotate.ts +3 -2
- package/src/shell/find.ts +2 -1
- package/src/shell/frame.ts +33 -14
- package/src/shell/runtime.ts +12 -6
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,51 @@
|
|
|
4
4
|
section); the reasons for every change are in [docs/DECISIONS.md](docs/DECISIONS.md), by the
|
|
5
5
|
P-numbers below.
|
|
6
6
|
|
|
7
|
+
## 0.15.0
|
|
8
|
+
|
|
9
|
+
- **Embedded documents (P143): `Grant.embed`.** A public artifact page any site may frame, with no
|
|
10
|
+
host: the host's own outer page (no host itself) frames it, and any site frames that page.
|
|
11
|
+
`createServer({ embeds: true })` and `createContentHost({ embeds: true })` opt in (default off);
|
|
12
|
+
then `issue` takes `{ anonymous: true, embed: true }`, for an artifact's page that isn't nested,
|
|
13
|
+
with no `level` or `user` (anything else throws, as do `enterBy` and `doorAnswer` with it). The
|
|
14
|
+
flag is signed into the session (and the sealed files' address), its cookie has a name of its own
|
|
15
|
+
(`__Host-porthole-e-<key>`), and `authorize.check` is told `embed: true`. Every answer of such a
|
|
16
|
+
session says `frame-ancestors *`; its plan names no host, so the shell asks no host, ends its
|
|
17
|
+
handshake at once (`data-porthole-host="none"`), says nothing to any parent and hears no one; no
|
|
18
|
+
door is minted and `issue` says `reports: false`. `statusPage` and `doorStatusResponse` take
|
|
19
|
+
`embed: true` for a content Worker's own answers before such a session exists. With `embeds` off,
|
|
20
|
+
an embed ticket, cookie or address opens nothing.
|
|
21
|
+
- **Security (P143):** a loosening, bounded: `*` for an embed session's answers alone, a session
|
|
22
|
+
the host minted on purpose, with no viewer, no level, no host function and no channel to any
|
|
23
|
+
parent. Every other session's answers are as before, byte for byte, on the same server while an
|
|
24
|
+
embed session of the same artifact exists; cookies stay host-only (`__Host-`, never `Domain=`).
|
|
25
|
+
Negative controls `embed-ancestors`, `embed-handshake`, `embed-origins`.
|
|
26
|
+
- **`framedBy` after Ferryman's audit of 0.14.17 and 0.14.18 (P144, amends P141).** No P0 and no
|
|
27
|
+
new egress; four fixes:
|
|
28
|
+
- *Without `framedBy`, 0.14.16's scripts again, byte for byte.* 0.14.17 kept every
|
|
29
|
+
`frame-ancestors` and behaviour without `framedBy`, but the status, entry and door pages'
|
|
30
|
+
scripts and the nested page's shell carried its strict check on every path, so their bytes and
|
|
31
|
+
`script-src` hashes changed, against 0.14.17's "every response is as before". Now without
|
|
32
|
+
`framedBy` (and without an embed) they are 0.14.16's, and a test pins their hashes to 0.14.16's.
|
|
33
|
+
A page whose parent may be an outer page loads `/__porthole/status-strict.js` or
|
|
34
|
+
`/__porthole/enter-strict.js` (0.14.17's scripts); a door and a nested shell carry the strict
|
|
35
|
+
script inline as before.
|
|
36
|
+
- *The nesting `framedBy` is for, documented.* With the outer page above your app's page above
|
|
37
|
+
content, content can `postMessage` the outer page and every frame in its tree and learn the
|
|
38
|
+
outer page's origin (Chromium, Firefox). **If an outer page frames your app**, its authors must
|
|
39
|
+
check `event.source` and `event.origin` in every message listener, on the outer page and in
|
|
40
|
+
its frames; THREAT_MODEL's S7 egress rule (a page's egress is the union of its frames') now
|
|
41
|
+
covers the outer page's frames too.
|
|
42
|
+
- *Origins compared as browsers serialize them.* A host origin given again as `framedBy` with
|
|
43
|
+
or without its default port (`https://app.example.com:443`) now throws ("a host origin
|
|
44
|
+
already"), in `createServer`, the host kit and every helper that takes `framedBy`; an outer page
|
|
45
|
+
named twice so is named once.
|
|
46
|
+
- *ADOPTING's nested-page rows* (the page, its files, an ended token) name `<framedBy>` in
|
|
47
|
+
`frame-ancestors`: a content Worker copied from them showed a blank frame below the outer page.
|
|
48
|
+
- **Security (P144):** nothing is loosened. The default path is 0.14.16's again; with `framedBy`,
|
|
49
|
+
the scripts and rules are 0.14.17's, and a host origin is now refused as `framedBy` under a
|
|
50
|
+
second spelling.
|
|
51
|
+
|
|
7
52
|
## 0.14.18
|
|
8
53
|
|
|
9
54
|
- **A set's pages without the Navigation API, and links within a page (P142).** In Safari before 26
|