@namzu/sandbox 14.0.0 → 16.0.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 +924 -0
- package/README.md +369 -14
- package/dist/backends/aci-standby-pool/index.d.ts.map +1 -1
- package/dist/backends/aci-standby-pool/index.js +13 -1
- package/dist/backends/aci-standby-pool/index.js.map +1 -1
- package/dist/backends/docker/index.d.ts +169 -6
- package/dist/backends/docker/index.d.ts.map +1 -1
- package/dist/backends/docker/index.js +499 -85
- package/dist/backends/docker/index.js.map +1 -1
- package/dist/backends/firecracker/index.d.ts.map +1 -1
- package/dist/backends/firecracker/index.js +12 -2
- package/dist/backends/firecracker/index.js.map +1 -1
- package/dist/backends/firecracker/protocol.d.ts +459 -8
- package/dist/backends/firecracker/protocol.d.ts.map +1 -1
- package/dist/backends/firecracker/protocol.js +136 -0
- package/dist/backends/firecracker/protocol.js.map +1 -1
- package/dist/backends/firecracker/transport.d.ts +539 -6
- package/dist/backends/firecracker/transport.d.ts.map +1 -1
- package/dist/backends/firecracker/transport.js +1171 -24
- package/dist/backends/firecracker/transport.js.map +1 -1
- package/dist/backends/kubernetes/egress-policy.d.ts +1181 -13
- package/dist/backends/kubernetes/egress-policy.d.ts.map +1 -1
- package/dist/backends/kubernetes/egress-policy.js +2350 -31
- package/dist/backends/kubernetes/egress-policy.js.map +1 -1
- package/dist/backends/kubernetes/identity.d.ts +193 -0
- package/dist/backends/kubernetes/identity.d.ts.map +1 -0
- package/dist/backends/kubernetes/identity.js +147 -0
- package/dist/backends/kubernetes/identity.js.map +1 -0
- package/dist/backends/kubernetes/index.d.ts +678 -33
- package/dist/backends/kubernetes/index.d.ts.map +1 -1
- package/dist/backends/kubernetes/index.js +1180 -95
- package/dist/backends/kubernetes/index.js.map +1 -1
- package/dist/backends/kubernetes/ingress-policy.d.ts +375 -0
- package/dist/backends/kubernetes/ingress-policy.d.ts.map +1 -0
- package/dist/backends/kubernetes/ingress-policy.js +1050 -0
- package/dist/backends/kubernetes/ingress-policy.js.map +1 -0
- package/dist/backends/kubernetes/k8s-client.d.ts +213 -4
- package/dist/backends/kubernetes/k8s-client.d.ts.map +1 -1
- package/dist/backends/kubernetes/k8s-client.js +359 -52
- package/dist/backends/kubernetes/k8s-client.js.map +1 -1
- package/dist/backends/kubernetes/lease.d.ts +40 -14
- package/dist/backends/kubernetes/lease.d.ts.map +1 -1
- package/dist/backends/kubernetes/lease.js +68 -18
- package/dist/backends/kubernetes/lease.js.map +1 -1
- package/dist/backends/kubernetes/objects.d.ts +423 -3
- package/dist/backends/kubernetes/objects.d.ts.map +1 -1
- package/dist/backends/kubernetes/objects.js +364 -2
- package/dist/backends/kubernetes/objects.js.map +1 -1
- package/dist/backends/kubernetes/per-sandbox-policy.d.ts +219 -0
- package/dist/backends/kubernetes/per-sandbox-policy.d.ts.map +1 -0
- package/dist/backends/kubernetes/per-sandbox-policy.js +375 -0
- package/dist/backends/kubernetes/per-sandbox-policy.js.map +1 -0
- package/dist/backends/kubernetes/rbac.d.ts +153 -0
- package/dist/backends/kubernetes/rbac.d.ts.map +1 -0
- package/dist/backends/kubernetes/rbac.js +177 -0
- package/dist/backends/kubernetes/rbac.js.map +1 -0
- package/dist/backends/kubernetes/sandbox.d.ts +81 -14
- package/dist/backends/kubernetes/sandbox.d.ts.map +1 -1
- package/dist/backends/kubernetes/sandbox.js +149 -15
- package/dist/backends/kubernetes/sandbox.js.map +1 -1
- package/dist/backends/kubernetes/transport.d.ts +935 -9
- package/dist/backends/kubernetes/transport.d.ts.map +1 -1
- package/dist/backends/kubernetes/transport.js +1958 -62
- package/dist/backends/kubernetes/transport.js.map +1 -1
- package/dist/backends/kubernetes/workspace.d.ts +1149 -18
- package/dist/backends/kubernetes/workspace.d.ts.map +1 -1
- package/dist/backends/kubernetes/workspace.js +2825 -186
- package/dist/backends/kubernetes/workspace.js.map +1 -1
- package/dist/backends/remote-execution-controller.d.ts +14 -0
- package/dist/backends/remote-execution-controller.d.ts.map +1 -1
- package/dist/backends/remote-execution-controller.js.map +1 -1
- package/dist/index.d.ts +294 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +280 -10
- package/dist/index.js.map +1 -1
- package/dist/testing/sandbox-conformance.d.ts +39 -5
- package/dist/testing/sandbox-conformance.d.ts.map +1 -1
- package/dist/testing/sandbox-conformance.js +436 -5
- package/dist/testing/sandbox-conformance.js.map +1 -1
- package/package.json +3 -3
- package/src/backends/aci-standby-pool/index.ts +16 -1
- package/src/backends/docker/index.ts +617 -100
- package/src/backends/firecracker/index.ts +14 -2
- package/src/backends/firecracker/protocol.ts +514 -6
- package/src/backends/firecracker/transport.ts +1492 -40
- package/src/backends/kubernetes/egress-policy.ts +3334 -55
- package/src/backends/kubernetes/identity.ts +261 -0
- package/src/backends/kubernetes/index.ts +1785 -127
- package/src/backends/kubernetes/ingress-policy.ts +1344 -0
- package/src/backends/kubernetes/k8s-client.ts +444 -54
- package/src/backends/kubernetes/lease.ts +75 -19
- package/src/backends/kubernetes/objects.ts +626 -6
- package/src/backends/kubernetes/per-sandbox-policy.ts +497 -0
- package/src/backends/kubernetes/rbac.ts +192 -0
- package/src/backends/kubernetes/sandbox.ts +218 -20
- package/src/backends/kubernetes/transport.ts +2733 -124
- package/src/backends/kubernetes/workspace.ts +4476 -222
- package/src/backends/remote-execution-controller.ts +14 -0
- package/src/index.ts +668 -19
- package/src/testing/sandbox-conformance.ts +540 -5
package/README.md
CHANGED
|
@@ -52,6 +52,7 @@ const provider = createSandboxProvider({
|
|
|
52
52
|
image: 'namzu-sandbox:latest',
|
|
53
53
|
network: 'namzu-tasks',
|
|
54
54
|
labels: { 'example.task-id': taskId },
|
|
55
|
+
cpuLimit: 2,
|
|
55
56
|
},
|
|
56
57
|
layout: {
|
|
57
58
|
outputs: { source: { type: 'hostDir', hostPath: `/srv/tasks/${taskId}/outputs` } },
|
|
@@ -63,6 +64,64 @@ const provider = createSandboxProvider({
|
|
|
63
64
|
})
|
|
64
65
|
```
|
|
65
66
|
|
|
67
|
+
## Container hardening baseline
|
|
68
|
+
|
|
69
|
+
`container:docker` confines every container it starts, and the argv it builds is
|
|
70
|
+
pinned by a test (`src/backends/docker/__tests__/hardening.test.ts`) so a change
|
|
71
|
+
to the baseline has to get past it on purpose. Each flag carries its own
|
|
72
|
+
argument in `src/backends/docker/index.ts`; in one line each:
|
|
73
|
+
|
|
74
|
+
| Flag | Why |
|
|
75
|
+
|---|---|
|
|
76
|
+
| `--cap-drop=ALL` | No Linux capability, with no re-add list. `CAP_DAC_OVERRIDE` alone walks past the layout's read-only binds, and `NET_ADMIN` is what would put a default route back on a `deny-all` network. |
|
|
77
|
+
| `--security-opt=no-new-privileges` | A setuid binary inside the image cannot re-escalate. |
|
|
78
|
+
| `--ipc private` | This container's IPC namespace is not joinable. `shareable` (docker's other daemon default) hands every container a namespace of its own as well, but leaves it joinable by name with `--ipc container:<name>`. |
|
|
79
|
+
| `--read-only` | The image is not a place the workload writes; the layout's `outputs` and `scratch` binds are separate mounts and stay writable. |
|
|
80
|
+
| `--tmpfs <path>` | The paths inside the container that do stay writable — see below. |
|
|
81
|
+
| `--memory`, `--pids-limit`, `--cpus` | Bounds the host sets through `defaultMemoryLimitMb`, `defaultMaxProcesses` and `cpuLimit`. All three are unset by default, because the right number is a property of the host's machine and of the workload. |
|
|
82
|
+
|
|
83
|
+
**What stays writable under `--read-only`.** Four paths, all `--tmpfs`:
|
|
84
|
+
`/tmp`, `/var/tmp`, `/workspace` and `/home/namzu`. The first three are where a
|
|
85
|
+
workload's own scratch goes — `/tmp` is `TMPDIR`, where pip builds wheels and
|
|
86
|
+
where a program compiled in the sandbox is run, so these mounts are deliberately
|
|
87
|
+
executable (docker's own `--tmpfs` default is `noexec`, which would turn that
|
|
88
|
+
into `Permission denied` on a file that is plainly executable). `/home/namzu` is
|
|
89
|
+
the reference image's `HOME`: LibreOffice refuses a headless conversion without a
|
|
90
|
+
writable user profile, and matplotlib, fontconfig, npm and `pip install --user`
|
|
91
|
+
all keep caches there. A host that points `image` at its own build says what
|
|
92
|
+
that image needs with `writableRootfsPaths` — the backend cannot read an image's
|
|
93
|
+
writable set, and the alternative to asking is guessing. `readOnlyRootfs: false`
|
|
94
|
+
turns that control off — the container filesystem is writable again — and turns
|
|
95
|
+
off nothing else: `--cap-drop=ALL`, `--security-opt=no-new-privileges` and
|
|
96
|
+
`--ipc private` are applied whatever it says.
|
|
97
|
+
|
|
98
|
+
Because those four paths are tmpfs, they are RAM, not the container's writable
|
|
99
|
+
layer: scratch larger than half the host's RAM (or than `--memory`, the tighter
|
|
100
|
+
of the two when the host sets one) fails with `ENOSPC` rather than spilling onto
|
|
101
|
+
the host's disk. A run that writes temp files bigger than its memory budget does
|
|
102
|
+
not have to give up the baseline over it: `layout.scratch` is a bind to a host
|
|
103
|
+
directory and stays disk-backed, so a host with room on disk mounts one there
|
|
104
|
+
and points the workload at it — `TMPDIR` set to that container path through the
|
|
105
|
+
per-call `env` option — which keeps the read-only root filesystem and the four
|
|
106
|
+
paths above. `readOnlyRootfs: false` is the last resort rather than the first:
|
|
107
|
+
it buys the container's own writable layer back at the cost of the control.
|
|
108
|
+
|
|
109
|
+
**Three controls are deliberately absent.** A seccomp profile: docker applies
|
|
110
|
+
its built-in one to every container and nothing here asks for anything looser,
|
|
111
|
+
so what is missing is a *tighter* profile, and a hand-written one cannot be
|
|
112
|
+
verified here against the reference image's toolchain — a profile that blocks a
|
|
113
|
+
syscall chromium or LibreOffice needs breaks the sandbox, which is worse than
|
|
114
|
+
the gap it closes. Set `seccomp-profile` in the daemon's `daemon.json` if you
|
|
115
|
+
want one. `--userns-remap`: it is a daemon property (`userns-remap` in
|
|
116
|
+
`daemon.json`), not a `docker run` flag — a container only chooses between the
|
|
117
|
+
namespaces the daemon already made (`--userns=host|private`), so whether a
|
|
118
|
+
remapped mapping exists is settled before this backend's argv is read and no
|
|
119
|
+
flag here could settle it. Enable it on the host and every container in this
|
|
120
|
+
tier gets uid 0 mapped to an unprivileged uid outside.
|
|
121
|
+
`--user`: supported through `runAsUser` and unset by default, because `--user`
|
|
122
|
+
overrides the image's own choice and the reference image already ends with
|
|
123
|
+
`USER namzu`.
|
|
124
|
+
|
|
66
125
|
## Protocol readiness and cancellation
|
|
67
126
|
|
|
68
127
|
Pass `SandboxExecOptions.signal` to stop a command on any shipped backend. A
|
|
@@ -76,6 +135,22 @@ microVM; a confirmed stop with an incomplete terminal stream is reported
|
|
|
76
135
|
separately so callers do not mistake partial output for an unknown process
|
|
77
136
|
outcome.
|
|
78
137
|
|
|
138
|
+
**One exception, and it is the only object here that is not disposable.** A
|
|
139
|
+
persistent Kubernetes workspace is not retired on an unconfirmed stop: the
|
|
140
|
+
retirement there is the `operatingMode: Suspended` patch, which makes the
|
|
141
|
+
controller delete the pod, and a workspace is held by more than one process by
|
|
142
|
+
design. Nothing is written, the handle goes on serving, the rejection carries
|
|
143
|
+
`retirement: { accepted: false, reason: 'workspace-kept' }`, and a bounded
|
|
144
|
+
health probe reports through `onCancellationUnconfirmed` whether the guest
|
|
145
|
+
agent is serving, has fenced itself, or could not be reached — so the host
|
|
146
|
+
decides when the live sessions in that pod go down. Because such a workspace
|
|
147
|
+
is held by more than one process, the writes that DO still go to it — suspend,
|
|
148
|
+
resume, adopt, delete — take an optional monotonic holder epoch, stored on the
|
|
149
|
+
object and tested in the same request that writes, so a superseded process's
|
|
150
|
+
late suspend or late delete is refused by the cluster rather than applied.
|
|
151
|
+
A call that passes no epoch sends exactly the requests it always sent. See
|
|
152
|
+
`docs/sdk/kubernetes-sandbox.md`.
|
|
153
|
+
|
|
79
154
|
Remote peers retain terminal ids briefly for idempotent cancellation, but evict
|
|
80
155
|
the oldest terminal history before refusing new work. If a command leader exits
|
|
81
156
|
while descendants remain, the peer fences itself and retires the whole sandbox
|
|
@@ -102,6 +177,114 @@ while still enough for a fast, well-behaved `SIGTERM` handler's own cleanup;
|
|
|
102
177
|
a deployment that genuinely needs a longer cooperative-shutdown window sets
|
|
103
178
|
either variable explicitly.
|
|
104
179
|
|
|
180
|
+
**Retained output, and a command that outlives its connection.** On the
|
|
181
|
+
kubernetes workspace tier a command can be started with a caller-chosen
|
|
182
|
+
`executionId` and `retainOutput`, and then followed — or picked up by a
|
|
183
|
+
different host process — through the additive `attach-execution` op. There is
|
|
184
|
+
ONE retained-output primitive in the guest and every consumer reads it: an
|
|
185
|
+
ordered, size-bounded log of stdout and stderr in a single monotonically
|
|
186
|
+
increasing byte-offset space, so a reader resumes with one number and sees the
|
|
187
|
+
interleaving the command produced. Its bound is bytes, not chunks — a chunk
|
|
188
|
+
larger than the whole budget has its head sliced off rather than being kept
|
|
189
|
+
whole — and eviction advances the log's start offset, so a read from before it
|
|
190
|
+
is answered with a `droppedBytes` count. A gap is reported; output is never
|
|
191
|
+
silently skipped, and offsets are absolute so a stale cursor is always
|
|
192
|
+
answerable. Every delta frame of a retained command carries the byte range it
|
|
193
|
+
occupies — on the `execute` stream as well as on an attach — because a host
|
|
194
|
+
must never derive an offset from what it received: output crosses the wire as
|
|
195
|
+
decoded text, and a chunk that ends inside a multi-byte character does not
|
|
196
|
+
decode to its own byte length. `attach-execution` replays from the requested
|
|
197
|
+
offset, follows the live command, and ends with one terminal frame; it never
|
|
198
|
+
signals the process, and closing an attach connection is a no-op. Ending a
|
|
199
|
+
command stays `cancel-execution`'s job alone. Reserving an id the guest still
|
|
200
|
+
holds reports what it holds rather than minting a second reservation, so a
|
|
201
|
+
retried start runs the command once — a guarantee that ends where the record
|
|
202
|
+
does, at the retention window (`NAMZU_AGENT_EXECUTION_RETAINED_TTL_MS`,
|
|
203
|
+
10 min) and at pod replacement. The cost is bounded twice over, per execution
|
|
204
|
+
(`NAMZU_AGENT_EXECUTION_LOG_BYTES`, 1 MiB) and by how many executions may
|
|
205
|
+
retain at once (`NAMZU_AGENT_MAX_RETAINED_OUTPUT_LOGS`, 32), and only a
|
|
206
|
+
command that asked for retention is kept at all. The guest advertises
|
|
207
|
+
`execution-attach` in `healthz` and a host that asks for a detachable command
|
|
208
|
+
against an image without it is refused before the command is admitted.
|
|
209
|
+
|
|
210
|
+
**Sessions: a terminal or a program that outlives the host process.** On the
|
|
211
|
+
kubernetes workspace tier a terminal can be opened with a caller-chosen
|
|
212
|
+
`sessionId` and `persistent: true`, and a program can be started with no
|
|
213
|
+
terminal at all through the additive `start-detached` op. Both then belong to
|
|
214
|
+
the guest's session registry rather than to the connection that started them:
|
|
215
|
+
closing the connection DETACHES and sends no signal, `attach-session` replays
|
|
216
|
+
from a byte offset and then follows live, `list-sessions` names what is
|
|
217
|
+
running, and `kill-session` ends one. The registry holds the SAME retained-output
|
|
218
|
+
primitive described above — one ring per session, one monotonic offset space,
|
|
219
|
+
eviction reported as `droppedBytes` — rather than a second one, and output is
|
|
220
|
+
read into it whether or not anybody is attached, so a program with no reader
|
|
221
|
+
never blocks on a full PTY. At most one attachment exists per session: a second
|
|
222
|
+
attach ends the first with a named `detached` frame, so two host processes
|
|
223
|
+
cannot interleave keystrokes into one shell. The registry is in memory only,
|
|
224
|
+
so a replaced pod comes back with none. **A teardown now reaches the whole
|
|
225
|
+
session.** The agent's own comment claimed a process-group kill reached "the
|
|
226
|
+
shell and every descendant"; it did not, because util-linux `script` starts the
|
|
227
|
+
shell in a new session, so a job backgrounded with `&` survived every terminal
|
|
228
|
+
teardown and ran until the pod stopped. Both `kill-session` and a
|
|
229
|
+
non-persistent terminal's teardown now signal every process still in that
|
|
230
|
+
kernel session, found through `/proc`. The cost is bounded per session
|
|
231
|
+
(`NAMZU_AGENT_SESSION_LOG_BYTES`, 1 MiB) and by how many may exist
|
|
232
|
+
(`NAMZU_AGENT_MAX_SESSIONS`, 16), with an exited session's record kept for
|
|
233
|
+
`NAMZU_AGENT_SESSION_TERMINAL_TTL_MS` (10 min). The guest advertises `sessions`
|
|
234
|
+
in `healthz` and a host asking for any of it against an image without the
|
|
235
|
+
string is refused rather than served a connection-bound terminal.
|
|
236
|
+
|
|
237
|
+
**Quiesce: stop everything the guest is running, and keep serving.** A
|
|
238
|
+
workspace host that takes a final capture of the disk could not make it exact.
|
|
239
|
+
`suspend()` reaches the terminals THAT handle returned and an execution
|
|
240
|
+
somebody cancelled by id; a terminal another host process opened, a command
|
|
241
|
+
already in flight, and above all a program that moved into a session of its own
|
|
242
|
+
with `setsid` and was then reparented away from the agent all kept running, and
|
|
243
|
+
kept writing, until the pod stopped — and once the pod has stopped there is no
|
|
244
|
+
agent left to read the disk through. The additive `quiesce` op is where a host
|
|
245
|
+
stands instead: it marks every running execution BEFORE it signals anything
|
|
246
|
+
(without that mark, a group leader dying before the rest of its group makes an
|
|
247
|
+
execution's close handler fence the agent, and a fenced agent refuses the
|
|
248
|
+
capture the quiesce was performed for), scans `/proc` rather than its own
|
|
249
|
+
children, skips PID 1, itself and its own kernel session, then signals in
|
|
250
|
+
rounds — `SIGTERM`, `graceMs`, `SIGKILL` on what is left — until a pass finds
|
|
251
|
+
nothing. A process still present after `SIGKILL` FAILS the call and names its
|
|
252
|
+
pid; it never resolves optimistically. Afterwards `execute`, `read-file` and
|
|
253
|
+
`write-file` all still work, which is the whole point. While it runs, every op
|
|
254
|
+
that would start a process answers `quiesce_in_progress`; the reads do not. The
|
|
255
|
+
general scan covers the guest's PID namespace, which in a pod is the container
|
|
256
|
+
and nothing else, and the agent performs it only when it is the init of that
|
|
257
|
+
namespace or was started by it (`k8s/entrypoint.sh` makes `tini` PID 1 and the
|
|
258
|
+
agent its child); anywhere else it narrows itself to the kernel sessions its own
|
|
259
|
+
registries own and reports `scope: "owned-sessions"` rather than being silently
|
|
260
|
+
weaker. The guest advertises `quiesce` in `healthz` and a host asking an image
|
|
261
|
+
without it is refused by name.
|
|
262
|
+
|
|
263
|
+
**A workspace's writes reach its disk on purpose.** Nothing in the agent ever
|
|
264
|
+
called `sync`, `syncfs` or `fsync`: a `write-file` answered `ok` as soon as the
|
|
265
|
+
bytes were in the page cache, and a `suspend()` took the pod away as soon as it
|
|
266
|
+
had stopped — which says nothing is writing any more, not that what was written
|
|
267
|
+
arrived. Both halves are closed. A `write-file` now goes through a temp
|
|
268
|
+
sibling, an `fsync`, a rename and a directory `fsync` before it answers, so the
|
|
269
|
+
reply means the bytes are on the device and a write that fails leaves the
|
|
270
|
+
previous contents rather than a truncated file; one `fsync` per part sequence,
|
|
271
|
+
on the last part, covers the whole file. And the additive `flush` op runs
|
|
272
|
+
`syncfs(2)` over the workspace mount, which is the only thing that can reach
|
|
273
|
+
what a COMMAND wrote — the Kubernetes backend sends it and waits for the reply
|
|
274
|
+
before it patches a workspace to `Suspended`, and the agent runs it itself on
|
|
275
|
+
`SIGTERM`, after stopping every process it owns through the same routine
|
|
276
|
+
`quiesce` uses and before exiting 0. The guest advertises `flush` in `healthz`
|
|
277
|
+
**only if it can run one** — the flush runs `sync -f`, and an image that
|
|
278
|
+
strips coreutils has this code and no `sync` — so a host that does not see the
|
|
279
|
+
string is told the image cannot flush rather than being left to read an
|
|
280
|
+
`unknown_op`, or a refusal it can never get past, as a flush that happened.
|
|
281
|
+
|
|
282
|
+
**The command timeout ceiling is configurable.** The guest agent reads its
|
|
283
|
+
maximum `timeoutMs` from `NAMZU_SANDBOX_MAX_TIMEOUT_MS` — the same variable
|
|
284
|
+
the container worker has always read for the same limit — defaulting to the
|
|
285
|
+
unchanged 30 minutes, and names the variable when it refuses. A request above
|
|
286
|
+
the ceiling is refused, not silently shortened.
|
|
287
|
+
|
|
105
288
|
Every worker and microVM guest publishes its wire-protocol version in the
|
|
106
289
|
readiness response. The host admits only the exact version implemented by its
|
|
107
290
|
release; missing, older, and newer versions fail before a sandbox handle or
|
|
@@ -158,20 +341,71 @@ string is refused at startup in **every** mode: that is the shape a
|
|
|
158
341
|
downward-API injection takes when it resolved to nothing, and honouring it
|
|
159
342
|
would open precisely the hole the variable was set to close.
|
|
160
343
|
|
|
344
|
+
Neither the framed wire nor its version changes when the agent grows a
|
|
345
|
+
capability. `healthz` carries a `features` list instead, and a host uses an op
|
|
346
|
+
or a field only when it sees the string there: `write-file-parts` for a body
|
|
347
|
+
written to a temporary sibling in parts and finished with an atomic rename,
|
|
348
|
+
`flush` for the `syncfs` over the workspace mount, `stream-heartbeat` for the
|
|
349
|
+
per-stream liveness frame, and `guest-boot-id` for the agent process's own
|
|
350
|
+
identity.
|
|
351
|
+
|
|
352
|
+
`guest-boot-id` is a field rather than an op. The agent mints one opaque id at
|
|
353
|
+
startup and stamps it on every reply a caller has already authenticated —
|
|
354
|
+
`reserve-execution`, `cancel-execution` including its `unknown_execution`
|
|
355
|
+
refusal, `read-file`, `write-file`, and the `ready` frame that opens a terminal,
|
|
356
|
+
a session attachment or a `tcp-connect` stream. `healthz`, which is
|
|
357
|
+
unauthenticated, carries only the feature string and no id. It exists because a
|
|
358
|
+
per-instance token cannot answer "is this the same agent": on a container
|
|
359
|
+
orchestrator the token is the pod's uid, and a container restarted in place
|
|
360
|
+
keeps its pod — so the token still works, every call still succeeds, and every
|
|
361
|
+
process the caller started is gone with nothing on the wire saying so. An agent
|
|
362
|
+
that predates the field sends none and a host must read that as "this guest
|
|
363
|
+
cannot tell me", never as a change. A heartbeat is negotiated
|
|
364
|
+
per stream and in both directions — the `terminal` or `tcp-connect` open body
|
|
365
|
+
carries the interval, the agent echoes the interval it will use in its `ready`
|
|
366
|
+
event and only then starts sending, and the host only starts once that echo
|
|
367
|
+
arrived. An agent that predates the field ignores it and echoes nothing, so its
|
|
368
|
+
host behaves exactly as it did; a host that predates it never asks, so it is
|
|
369
|
+
never sent a frame type it would treat as a protocol error. Once negotiated,
|
|
370
|
+
three consecutive intervals with nothing at all arriving end the stream on both
|
|
371
|
+
sides — the same cleanup a closed socket already runs. Both sides count bytes
|
|
372
|
+
rather than whole frames, so a large frame still on its way is proof of life
|
|
373
|
+
like any other; silence while a side has paused reading for backpressure does
|
|
374
|
+
not count; and the echoed interval is honoured only between 100 ms and four
|
|
375
|
+
times what was asked, since each side does its own watchdog arithmetic with
|
|
376
|
+
a number the other sent.
|
|
377
|
+
|
|
161
378
|
Because the credential rides inside the request envelope, the gate cannot run
|
|
162
379
|
until a whole frame has been parsed — so what an unauthenticated peer may spend
|
|
163
380
|
in that window is bounded rather than trusted, and in the token modes only:
|
|
164
381
|
|
|
165
382
|
| Variable | Default | What it bounds |
|
|
166
383
|
|---|---|---|
|
|
167
|
-
| `NAMZU_AGENT_MAX_FRAME_BYTES` | 256 MiB | The largest length any frame header may announce, on every listen mode. The 8-hex prefix otherwise permits 4 GiB, which the reader used to honour. Sized for the largest frame the host legitimately writes: a `write-file` carries the whole base64 body in one envelope. |
|
|
168
|
-
| `NAMZU_AGENT_MAX_PREAUTH_FRAME_BYTES` | 8 MiB | The same ceiling for a connection that has not yet presented the token, clamped to the one above. Token modes only. It is
|
|
384
|
+
| `NAMZU_AGENT_MAX_FRAME_BYTES` | 256 MiB | The largest length any frame header may announce, on every listen mode. The 8-hex prefix otherwise permits 4 GiB, which the reader used to honour. Sized for the largest frame the host legitimately writes: a `write-file` carries the whole base64 body in one envelope when it fits. |
|
|
385
|
+
| `NAMZU_AGENT_MAX_PREAUTH_FRAME_BYTES` | 8 MiB | The same ceiling for a connection that has not yet presented the token, clamped to the one above. Token modes only. It is the ceiling on one `write-file` FRAME on a token path, no longer on a file — see below. |
|
|
169
386
|
| `NAMZU_AGENT_MAX_PREAUTH_CONNECTIONS` | 64 | How many connections may be unauthenticated at once. Token modes only. Every bound above is per connection, so without this one they could be paid again on the next connection. A full pool evicts its **oldest** unauthenticated member and serves the arrival — see below for why that direction. |
|
|
170
387
|
| `NAMZU_AGENT_MAX_PREAUTH_BUFFER_BYTES` | 32 MiB | What all unauthenticated connections may buffer **between them**, never less than one pre-auth frame. Token modes only. The count above bounds sockets; this bounds the heap behind them, and the heap is what runs out first. |
|
|
171
388
|
| `NAMZU_AGENT_PREAUTH_IDLE_TIMEOUT_MS` | 10000 | How long a connection may stay unauthenticated while **quiet**. Every byte received resets it, so it retires the connection that says nothing, not the one that says too little. Token modes only, cleared the moment a connection authenticates. |
|
|
172
389
|
| `NAMZU_AGENT_PREAUTH_DEADLINE_MS` | 10000 | How long a connection may stay unauthenticated **at all**, measured from accept and reset by nothing. Token modes only, cleared the moment a connection authenticates, so no long-lived terminal, `tcp-connect` or streaming `execute` is ever measured against it. |
|
|
173
390
|
| `NAMZU_AGENT_REFUSAL_FLUSH_GRACE_MS` | 1000 | How long a refusal frame may take to reach the wire before the socket is destroyed anyway. Every listen mode. A backstop against a peer that has stopped reading, not a budget anything normally spends. |
|
|
174
391
|
|
|
392
|
+
The `quiesce` op has four bounds and one scope of its own, on every listen mode:
|
|
393
|
+
|
|
394
|
+
| Variable | Default | What it bounds |
|
|
395
|
+
|---|---|---|
|
|
396
|
+
| `NAMZU_AGENT_QUIESCE_GRACE_MS` | 1000 | How long one round waits after `SIGTERM` before escalating to `SIGKILL`. Clamped below `NAMZU_AGENT_CANCEL_CONFIRM_TIMEOUT_MS`, and a caller-supplied `graceMs` at or above that bound is refused: a marked execution's close handler stops waiting there, so a later escalation would fence the agent mid-quiesce. Not the pod's `terminationGracePeriodSeconds`. |
|
|
397
|
+
| `NAMZU_AGENT_QUIESCE_DEADLINE_MS` | 20000 | The whole op, across every round. Kept well under the host transport's 60s read-idle timeout, because nothing is written on the wire while a quiesce runs — so raise it only up to that timeout (itself configurable on the host), never past it: beyond it the host tears down a quiesce that is working and cannot learn that it did. |
|
|
398
|
+
| `NAMZU_AGENT_QUIESCE_MAX_ROUNDS` | 8 | Scan-and-signal passes before the call reports failure. Rounds exist because a process can be forked while a pass is in flight; a workload forking faster than it can be killed is a failure to report, not a loop to run out the deadline. |
|
|
399
|
+
| `NAMZU_AGENT_QUIESCE_SETTLE_MS` | 1000 | How long the op waits, after everything is gone, for a killed child's `close` event to move its session to `exited` and settle its execution. Bookkeeping only — the processes are already gone, so running out of it does not fail the call. |
|
|
400
|
+
| `NAMZU_AGENT_QUIESCE_SCOPE` | derived | `owned-sessions` narrows the scan to the kernel sessions the agent's own registries own. The only accepted value: the general PID-namespace scan is derived from whether this agent is the init of its own PID namespace or was started by it, and there is deliberately no way to force it on. |
|
|
401
|
+
|
|
402
|
+
Termination and the flush have two more, on every listen mode:
|
|
403
|
+
|
|
404
|
+
| Variable | Default | What it bounds |
|
|
405
|
+
|---|---|---|
|
|
406
|
+
| `NAMZU_AGENT_FLUSH_TIMEOUT_MS` | 10000 | One `sync -f` over the workspace mount, whether a host asked for it or the `SIGTERM` handler is running it. Reported unconfirmed rather than abandoned quietly when it expires, because a caller that asked for a flush is usually about to take the pod away. |
|
|
407
|
+
| `NAMZU_AGENT_SHUTDOWN_DEADLINE_MS` | 15000 | The WHOLE `SIGTERM` handler: stop accepting connections, stop every process the guest is running, flush, exit. The agent exits when it expires whatever is still in flight — a process in uninterruptible IO outlives a `SIGKILL` and a `syncfs` takes as long as the device takes, and a handler with no bound would hold the pod open until the kubelet's own `SIGKILL`. Keep it well below the pod's `terminationGracePeriodSeconds`. It is the only bound: a repeat `SIGTERM` is logged and ignored, because in a stopping pod the second one is the kubelet's own (sent as soon as the `preStop` hook returns) rather than anybody asking for a shorter wait. The hook's wait is derived from this number so it outlives it. |
|
|
408
|
+
|
|
175
409
|
So the most an unauthenticated peer can make the agent hold is
|
|
176
410
|
`NAMZU_AGENT_MAX_PREAUTH_BUFFER_BYTES`, spread over at most
|
|
177
411
|
`NAMZU_AGENT_MAX_PREAUTH_CONNECTIONS` sockets, and both are tunable against the
|
|
@@ -214,19 +448,114 @@ this design rests on: the NetworkPolicy ingress rule in front of the agent port
|
|
|
214
448
|
is the boundary that decides who may reach it at all, and the token and these
|
|
215
449
|
bounds are defence in depth behind it, for a peer already inside that rule.
|
|
216
450
|
|
|
217
|
-
One consequence
|
|
218
|
-
credential in the envelope rather than in a handshake: a
|
|
219
|
-
travels in the same first frame as the token, so in a token
|
|
220
|
-
|
|
221
|
-
default, since the body travels base64-encoded.
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
451
|
+
One consequence used to be worth naming as a limit, because it is the price of
|
|
452
|
+
putting the credential in the envelope rather than in a handshake: a
|
|
453
|
+
`write-file` body travels in the same first frame as the token, so in a token
|
|
454
|
+
mode the pre-auth cap bounds that body — about 6 MiB of file content at the
|
|
455
|
+
default, since the body travels base64-encoded. It is still the bound on one
|
|
456
|
+
frame. It is no longer the bound on a **file**.
|
|
457
|
+
|
|
458
|
+
`write-file` takes an optional `part` object, and a body too large for one
|
|
459
|
+
frame arrives as a sequence of them:
|
|
460
|
+
|
|
461
|
+
```jsonc
|
|
462
|
+
// Every part is an ordinary write-file. `path` names a TEMPORARY sibling of
|
|
463
|
+
// the target for the whole sequence, never the target itself.
|
|
464
|
+
{ "op": "write-file", "token": "…", "body": {
|
|
465
|
+
"path": "seed/.namzu-write-<uuid>-repo.tar.part",
|
|
466
|
+
"content": "<base64 of this slice>", "encoding": "base64",
|
|
467
|
+
"part": { "offset": 0, "final": false } } }
|
|
468
|
+
|
|
469
|
+
// …and the last one renames onto the target.
|
|
470
|
+
{ "op": "write-file", "token": "…", "body": {
|
|
471
|
+
"path": "seed/.namzu-write-<uuid>-repo.tar.part",
|
|
472
|
+
"content": "<base64 of the tail>", "encoding": "base64",
|
|
473
|
+
"part": { "offset": 12582912, "final": true, "renameTo": "seed/repo.tar" } } }
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
`offset` must equal the temp file's CURRENT size (`0` creates or truncates
|
|
477
|
+
it), so a part that went missing, arrived twice or arrived out of order is
|
|
478
|
+
refused — `write_part_offset_mismatch` — rather than written in the wrong
|
|
479
|
+
place; a per-temp-path lock refuses an overlapping writer outright
|
|
480
|
+
(`write_part_in_flight`). A part whose bytes did not all reach the disk is
|
|
481
|
+
refused too (`write_part_short_write`): one `pwrite` answers a write that
|
|
482
|
+
crosses the volume's free space or an `RLIMIT_FSIZE` with a short count and
|
|
483
|
+
no error, so the agent checks the count it got and the temp file's size
|
|
484
|
+
against what the part claimed before it renames anything. The temp path and
|
|
485
|
+
`renameTo` go through the same workspace jail every other write does, and the
|
|
486
|
+
target changes exactly once, in the final `rename`: a reader never sees a
|
|
487
|
+
half-written file, and a sequence that dies partway leaves the target exactly
|
|
488
|
+
as it was. A host that abandons a sequence removes what it left behind with
|
|
489
|
+
`part: { "discard": true }`, which is idempotent — a path that is not there,
|
|
490
|
+
in a directory that was never created, answers `discarded` and creates
|
|
491
|
+
nothing on the way — and refuses (`write_part_not_a_temp_file`) any path
|
|
492
|
+
whose name, or whose RESOLVED name, is not one of these part files:
|
|
493
|
+
`write-file` removes an abandoned part, never an arbitrary file. A `part`
|
|
494
|
+
that is present but is not an object is refused outright
|
|
495
|
+
(`write_part_invalid_shape`) rather than served as the plain whole-file write
|
|
496
|
+
it resembles.
|
|
497
|
+
|
|
498
|
+
The guest opts in. `healthz` answers with `features` alongside `ok` and
|
|
499
|
+
`protocolVersion` — `write-file-parts` among them — and a host sends a part
|
|
500
|
+
only to a guest that advertised it: an agent that predates the field would
|
|
501
|
+
ignore `part` and write that slice as a whole file. A deployment that would
|
|
502
|
+
rather send one big frame than several small ones can still raise
|
|
503
|
+
`NAMZU_AGENT_MAX_PREAUTH_FRAME_BYTES`, trading pre-auth buffer budget for
|
|
504
|
+
frame size. Nothing on the Firecracker path is affected either way: no token
|
|
505
|
+
mode is active there, so no pre-auth cap applies and a `write-file` frame of
|
|
506
|
+
any size up to `NAMZU_AGENT_MAX_FRAME_BYTES` is accepted exactly as before.
|
|
507
|
+
|
|
508
|
+
`read-file` has the mirror-image arrangement, for a problem that was never a
|
|
509
|
+
refusal — it just cost more the bigger the file got, until it stopped working.
|
|
510
|
+
The whole-file reply held the file buffer, its base64 string, the JSON string
|
|
511
|
+
and two frame buffers at once, about 7.7x the file: measured against this
|
|
512
|
+
agent over loopback TCP, a 64 MiB read grew it by 405 MiB, and a file of about
|
|
513
|
+
384 MiB or more could not be answered at all because its base64 string is
|
|
514
|
+
longer than V8 permits a string to be. So `read-file` now takes optional
|
|
515
|
+
`offset` and `length` and `pread`s one bounded slice, answering with the WHOLE
|
|
516
|
+
file's `sizeBytes` beside it and with the bytes that exist when the range runs
|
|
517
|
+
past the end; and a new `read-file-stream` op opens the fd once and sends
|
|
518
|
+
`meta`, then base64 `data` frames, then `end`, then the zero-length
|
|
519
|
+
terminator, reusing one read buffer and waiting for the socket to drain
|
|
520
|
+
between chunks. A 1 GiB read grows the agent by about 12 MiB on the same
|
|
521
|
+
measurement.
|
|
522
|
+
|
|
523
|
+
```jsonc
|
|
524
|
+
// One slice, one reply frame. Capped by NAMZU_AGENT_READ_FILE_RANGE_BYTES
|
|
525
|
+
// (1 MiB): a larger range is REFUSED, not shortened.
|
|
526
|
+
{ "op": "read-file", "token": "…", "body": {
|
|
527
|
+
"path": "out/report.bin", "encoding": "base64",
|
|
528
|
+
"offset": 1048576, "length": 262144 } }
|
|
529
|
+
|
|
530
|
+
// The whole file, as an ordered multi-frame reply.
|
|
531
|
+
{ "op": "read-file-stream", "token": "…", "body": { "path": "out/report.bin" } }
|
|
532
|
+
```
|
|
226
533
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
534
|
+
The guest opts into both together: `healthz`'s `features` list carries both
|
|
535
|
+
strings, `write-file-parts` and `read-file-stream` — one entry for the two
|
|
536
|
+
read shapes, because they ship in the same file and no guest can have one
|
|
537
|
+
without the other. A host that does not see it keeps to the single whole-file
|
|
538
|
+
reply and sends neither — an agent that predates them would ignore
|
|
539
|
+
`offset`/`length` and answer with the whole file, which the caller would read
|
|
540
|
+
as its slice, so the
|
|
541
|
+
host throws `AgentReadFileStreamUnsupportedError` instead. Both new shapes go
|
|
542
|
+
through the same workspace jail the old op used.
|
|
543
|
+
|
|
544
|
+
Two rules a host writing to this wire has to know. A range must ask for
|
|
545
|
+
`base64`: a `utf8` slice taken at an arbitrary offset can begin or end inside
|
|
546
|
+
a multi-byte character, so the guest refuses one with
|
|
547
|
+
`read_file_range_requires_base64`, while a whole-file read still serves `utf8`
|
|
548
|
+
because its boundaries are the file's own. And `read-file-stream` serves
|
|
549
|
+
regular files only, refusing a directory, a fifo or a device node with
|
|
550
|
+
`read_file_stream_not_a_regular_file` — a regular file that `stat` reports as
|
|
551
|
+
zero bytes and that still has content, the procfs shape, is read to EOF by
|
|
552
|
+
both new shapes rather than answered as empty.
|
|
553
|
+
|
|
554
|
+
None of this is a wire change. `token`, `part`, `offset` and `length` are
|
|
555
|
+
optional envelope and body fields, `read-file-stream` is a new op nobody is
|
|
556
|
+
obliged to call, and `features` is an additive `healthz` field, so the guest
|
|
557
|
+
protocol version is deliberately unchanged and no host and no golden image
|
|
558
|
+
has to roll together with this release.
|
|
230
559
|
|
|
231
560
|
What the token is not: a boundary against the sandbox's own workload. Once the
|
|
232
561
|
image entrypoint deprivileges, the agent and the workload share a uid, so a
|
|
@@ -282,6 +611,32 @@ that can change egress after admission. A backend must throw when it cannot
|
|
|
282
611
|
enforce a requested live policy; accepting without applying it would erase the
|
|
283
612
|
security boundary the host relied on.
|
|
284
613
|
|
|
614
|
+
## Kubernetes per-sandbox egress
|
|
615
|
+
|
|
616
|
+
The kubernetes backend serves that contract when — and only when —
|
|
617
|
+
`egress.perSandbox` is configured: the method is PRESENT on a task handle
|
|
618
|
+
then and absent otherwise, which is the same omit-rather-than-ignore rule read
|
|
619
|
+
from the other side. A `KubernetesWorkspace` handle never carries it, and
|
|
620
|
+
`createKubernetesWorkspace` refuses a config that sets the option (with
|
|
621
|
+
`KubernetesWorkspacePerSandboxEgressConfigError`, before the first request)
|
|
622
|
+
rather than omitting a method the config asked for. Configured, each
|
|
623
|
+
`setNetworkPolicy` call writes one
|
|
624
|
+
`CiliumNetworkPolicy` for that sandbox alone, named after the claim's uid,
|
|
625
|
+
selecting one per-sandbox pod label, owned by the claim so the cluster
|
|
626
|
+
collects it on `destroy()`, and resolving only once a read-back deep-equals
|
|
627
|
+
what was sent. An empty list deletes that object and leaves the configured
|
|
628
|
+
baseline in force — which is a narrowing only when that baseline denies,
|
|
629
|
+
because cluster policies union.
|
|
630
|
+
|
|
631
|
+
It has two operator prerequisites, and a host that enables the option without
|
|
632
|
+
them is refused by design rather than by accident: an applied
|
|
633
|
+
`ValidatingAdmissionPolicy` and its binding, which the backend proves before
|
|
634
|
+
its first write and which bound what the host may write, and a separate RBAC
|
|
635
|
+
file granting the policy-write verbs the default Role deliberately withholds.
|
|
636
|
+
Whether such a policy is ENFORCED is a property of the cluster's CNI and is
|
|
637
|
+
not measured anywhere in this repository. See
|
|
638
|
+
`docs/sdk/kubernetes-sandbox.md`.
|
|
639
|
+
|
|
285
640
|
## Documentation
|
|
286
641
|
|
|
287
642
|
- [Namzu docs](https://github.com/cogitave/namzu/tree/main/docs)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/backends/aci-standby-pool/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,KAAK,EAEX,8BAA8B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/backends/aci-standby-pool/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,KAAK,EAEX,8BAA8B,EAU9B,MAAM,YAAY,CAAA;AAGnB,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AAc3E;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,CAAA;AAEpD,MAAM,WAAW,mCAAmC;IACnD,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB;;;;OAIG;IACH,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAA;IACtC;;;OAGG;IACH,QAAQ,CAAC,+BAA+B,EAAE,MAAM,CAAA;IAChD;;;OAGG;IACH,QAAQ,CAAC,6BAA6B,CAAC,EAAE,MAAM,CAAA;IAC/C;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,8BAA8B,CAAA;IAC/C;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAA;IACtC;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAA;IACrC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAA;IACrC,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAA;IAChC;;OAEG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAA;IAC/B;;;;;;OAMG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAA;CACrC;AASD;;;;GAIG;AACH,wBAAgB,0BAA0B,CACzC,MAAM,EAAE,mCAAmC,GACzC,cAAc,CAiBhB;AAoMD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,CActE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC5B,GAAG,IAAI,CAOP"}
|
|
@@ -411,12 +411,24 @@ async function spawnAciSandbox(config, options, readiness) {
|
|
|
411
411
|
throw new Error(`write-file failed: HTTP ${res.status} ${await res.text()}`);
|
|
412
412
|
}
|
|
413
413
|
},
|
|
414
|
-
|
|
414
|
+
/**
|
|
415
|
+
* Refused rather than answered whole when a range is asked for —
|
|
416
|
+
* the worker has no range op, and {@link Sandbox.readFile} says a
|
|
417
|
+
* backend that takes `offset`/`length` and hands back everything
|
|
418
|
+
* has given a wrong answer, not a degraded one. `options.signal`
|
|
419
|
+
* is honoured — one HTTP request is the whole read, so the signal
|
|
420
|
+
* goes to `fetch`.
|
|
421
|
+
*/
|
|
422
|
+
async readFile(path, options) {
|
|
415
423
|
assertActive();
|
|
424
|
+
if (options?.offset !== undefined || options?.length !== undefined) {
|
|
425
|
+
throw new Error('readFile: the standby-pool worker serves whole files only, so offset/length cannot be honoured. Read the file whole, or use a backend that streams.');
|
|
426
|
+
}
|
|
416
427
|
const res = await fetch(`${baseUrl}/read-file`, {
|
|
417
428
|
method: 'POST',
|
|
418
429
|
headers: { 'content-type': 'application/json' },
|
|
419
430
|
body: JSON.stringify({ path, encoding: 'base64' }),
|
|
431
|
+
signal: options?.signal,
|
|
420
432
|
});
|
|
421
433
|
if (!res.ok) {
|
|
422
434
|
throw new Error(`read-file failed: HTTP ${res.status} ${await res.text()}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/backends/aci-standby-pool/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAcH,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAGhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EACN,iBAAiB,EACjB,wBAAwB,EACxB,eAAe,EACf,uBAAuB,EACvB,iBAAiB,GACjB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACN,8BAA8B,EAC9B,mBAAmB,GACnB,MAAM,mCAAmC,CAAA;AA+E1C,MAAM,qBAAqB,GAAG,GAAG,CAAA;AACjC,MAAM,wBAAwB,GAAG,MAAM,CAAA;AACvC,MAAM,mBAAmB,GAAG,IAAI,CAAA;AAChC,MAAM,uBAAuB,GAAG,oBAAoB,CAAA;AACpD,MAAM,QAAQ,GAAG,8BAA8B,CAAA;AAC/C,MAAM,6BAA6B,GAAG,YAAY,CAAA;AAElD;;;;GAIG;AAC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AC7B,CAAC;IACD,OAAO,OAAO,CAAA;AACf,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/backends/aci-standby-pool/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAeH,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAGhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EACN,iBAAiB,EACjB,wBAAwB,EACxB,eAAe,EACf,uBAAuB,EACvB,iBAAiB,GACjB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACN,8BAA8B,EAC9B,mBAAmB,GACnB,MAAM,mCAAmC,CAAA;AA+E1C,MAAM,qBAAqB,GAAG,GAAG,CAAA;AACjC,MAAM,wBAAwB,GAAG,MAAM,CAAA;AACvC,MAAM,mBAAmB,GAAG,IAAI,CAAA;AAChC,MAAM,uBAAuB,GAAG,oBAAoB,CAAA;AACpD,MAAM,QAAQ,GAAG,8BAA8B,CAAA;AAC/C,MAAM,6BAA6B,GAAG,YAAY,CAAA;AAElD;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CACzC,MAA2C;IAE3C,MAAM,SAAS,GAAG,uBAAuB,CACxC,kBAAkB,EAClB,MAAM,CAAC,cAAc,EACrB,MAAM,CAAC,mBAAmB,EAC1B;QACC,SAAS,EAAE,wBAAwB;QACnC,cAAc,EAAE,qBAAqB;KACrC,CACD,CAAA;IACD,OAAO;QACN,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,kBAAkB;QACxB,KAAK,CAAC,MAAM,CAAC,OAA8B;YAC1C,OAAO,MAAM,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,CAAA;QACzD,CAAC;KACD,CAAA;AACF,CAAC;AAQD;;;;;;;;;;;GAWG;AACH,SAAS,eAAe,CACvB,MAAmC,EACnC,KAAa;IAEb,I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