@namzu/sandbox 26.0.0 → 27.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.
Files changed (83) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/README.md +20 -7
  3. package/dist/backends/firecracker/protocol.d.ts +46 -0
  4. package/dist/backends/firecracker/protocol.d.ts.map +1 -1
  5. package/dist/backends/firecracker/protocol.js +31 -0
  6. package/dist/backends/firecracker/protocol.js.map +1 -1
  7. package/dist/backends/firecracker/transport.d.ts +15 -1
  8. package/dist/backends/firecracker/transport.d.ts.map +1 -1
  9. package/dist/backends/firecracker/transport.js +16 -0
  10. package/dist/backends/firecracker/transport.js.map +1 -1
  11. package/dist/backends/kubernetes/allocation.d.ts +115 -0
  12. package/dist/backends/kubernetes/allocation.d.ts.map +1 -0
  13. package/dist/backends/kubernetes/allocation.js +130 -0
  14. package/dist/backends/kubernetes/allocation.js.map +1 -0
  15. package/dist/backends/kubernetes/egress-policy.d.ts +111 -35
  16. package/dist/backends/kubernetes/egress-policy.d.ts.map +1 -1
  17. package/dist/backends/kubernetes/egress-policy.js +81 -41
  18. package/dist/backends/kubernetes/egress-policy.js.map +1 -1
  19. package/dist/backends/kubernetes/identity.d.ts +129 -0
  20. package/dist/backends/kubernetes/identity.d.ts.map +1 -1
  21. package/dist/backends/kubernetes/identity.js +150 -0
  22. package/dist/backends/kubernetes/identity.js.map +1 -1
  23. package/dist/backends/kubernetes/index.d.ts +23 -1
  24. package/dist/backends/kubernetes/index.d.ts.map +1 -1
  25. package/dist/backends/kubernetes/index.js +22 -3
  26. package/dist/backends/kubernetes/index.js.map +1 -1
  27. package/dist/backends/kubernetes/objects.d.ts +76 -0
  28. package/dist/backends/kubernetes/objects.d.ts.map +1 -1
  29. package/dist/backends/kubernetes/objects.js +61 -0
  30. package/dist/backends/kubernetes/objects.js.map +1 -1
  31. package/dist/backends/kubernetes/per-sandbox-fence.d.ts +194 -0
  32. package/dist/backends/kubernetes/per-sandbox-fence.d.ts.map +1 -0
  33. package/dist/backends/kubernetes/per-sandbox-fence.js +522 -0
  34. package/dist/backends/kubernetes/per-sandbox-fence.js.map +1 -0
  35. package/dist/backends/kubernetes/per-sandbox-policy.d.ts +45 -3
  36. package/dist/backends/kubernetes/per-sandbox-policy.d.ts.map +1 -1
  37. package/dist/backends/kubernetes/per-sandbox-policy.js +98 -8
  38. package/dist/backends/kubernetes/per-sandbox-policy.js.map +1 -1
  39. package/dist/backends/kubernetes/sandbox.d.ts +4 -9
  40. package/dist/backends/kubernetes/sandbox.d.ts.map +1 -1
  41. package/dist/backends/kubernetes/sandbox.js +4 -9
  42. package/dist/backends/kubernetes/sandbox.js.map +1 -1
  43. package/dist/backends/kubernetes/transport.d.ts +108 -1
  44. package/dist/backends/kubernetes/transport.d.ts.map +1 -1
  45. package/dist/backends/kubernetes/transport.js +150 -6
  46. package/dist/backends/kubernetes/transport.js.map +1 -1
  47. package/dist/backends/kubernetes/workspace-allocate.d.ts +206 -0
  48. package/dist/backends/kubernetes/workspace-allocate.d.ts.map +1 -0
  49. package/dist/backends/kubernetes/workspace-allocate.js +332 -0
  50. package/dist/backends/kubernetes/workspace-allocate.js.map +1 -0
  51. package/dist/backends/kubernetes/workspace-observe.d.ts +187 -0
  52. package/dist/backends/kubernetes/workspace-observe.d.ts.map +1 -0
  53. package/dist/backends/kubernetes/workspace-observe.js +343 -0
  54. package/dist/backends/kubernetes/workspace-observe.js.map +1 -0
  55. package/dist/backends/kubernetes/workspace-per-sandbox.d.ts +94 -0
  56. package/dist/backends/kubernetes/workspace-per-sandbox.d.ts.map +1 -0
  57. package/dist/backends/kubernetes/workspace-per-sandbox.js +119 -0
  58. package/dist/backends/kubernetes/workspace-per-sandbox.js.map +1 -0
  59. package/dist/backends/kubernetes/workspace.d.ts +139 -5
  60. package/dist/backends/kubernetes/workspace.d.ts.map +1 -1
  61. package/dist/backends/kubernetes/workspace.js +434 -36
  62. package/dist/backends/kubernetes/workspace.js.map +1 -1
  63. package/dist/index.d.ts +83 -7
  64. package/dist/index.d.ts.map +1 -1
  65. package/dist/index.js +100 -6
  66. package/dist/index.js.map +1 -1
  67. package/package.json +3 -3
  68. package/src/backends/firecracker/protocol.ts +47 -0
  69. package/src/backends/firecracker/transport.ts +31 -0
  70. package/src/backends/kubernetes/allocation.ts +199 -0
  71. package/src/backends/kubernetes/egress-policy.ts +165 -42
  72. package/src/backends/kubernetes/identity.ts +210 -0
  73. package/src/backends/kubernetes/index.ts +61 -2
  74. package/src/backends/kubernetes/objects.ts +98 -0
  75. package/src/backends/kubernetes/per-sandbox-fence.ts +800 -0
  76. package/src/backends/kubernetes/per-sandbox-policy.ts +152 -17
  77. package/src/backends/kubernetes/sandbox.ts +4 -9
  78. package/src/backends/kubernetes/transport.ts +203 -4
  79. package/src/backends/kubernetes/workspace-allocate.ts +607 -0
  80. package/src/backends/kubernetes/workspace-observe.ts +590 -0
  81. package/src/backends/kubernetes/workspace-per-sandbox.ts +179 -0
  82. package/src/backends/kubernetes/workspace.ts +655 -34
  83. package/src/index.ts +193 -3
@@ -430,6 +430,50 @@ export interface KubernetesPerSandboxEgressConfig {
430
430
  * leave `tlsServerNames` off for a domain list.
431
431
  */
432
432
  readonly narrowing?: KubernetesCiliumEgressNarrowing;
433
+ /**
434
+ * The identity the operator's fence bounds, spelled as the API server
435
+ * spells a user: `system:serviceaccount:<namespace>:<name>` for a
436
+ * ServiceAccount. When set, the fence check requires the policy's
437
+ * `matchConditions` to name exactly this identity
438
+ * (`request.userInfo.username == '<identity>'`), and refuses before any
439
+ * write when they name another one or none.
440
+ *
441
+ * Unset (the default), the identity is not checked: the shipped fence
442
+ * names `system:serviceaccount:namzu-sandboxes:namzu-sandbox-host`, and a
443
+ * host that authenticates as something else would otherwise hold the write
444
+ * verbs with a fence that never matches it — which reads exactly like an
445
+ * enforced one. Set it whenever you know who the host is.
446
+ */
447
+ readonly hostIdentity?: string;
448
+ /**
449
+ * The operator-pinned set of hosts and ports a host may grant. Names the
450
+ * `ConfigMap` that holds it; see
451
+ * `k8s/manifests/validatingadmissionpolicy-cilium-permitted-hosts.yaml`
452
+ * for the companion policy that enforces it at admission and the shape of
453
+ * the ConfigMap.
454
+ *
455
+ * Set, three things change and nothing else does:
456
+ *
457
+ * - the fence check additionally proves the companion policy and its
458
+ * binding (the policy name with `-hosts` appended, and its binding),
459
+ * including that the binding's `paramRef` is THIS ConfigMap and denies
460
+ * when it is missing;
461
+ * - every `setNetworkPolicy` call with a non-empty list reads the
462
+ * ConfigMap first and refuses locally, with a named error and nothing
463
+ * written, a host or a port outside it. A narrowing that leaves a
464
+ * host's ports unrestricted is a port outside any list;
465
+ * - a missing or malformed ConfigMap refuses every such call.
466
+ *
467
+ * Unset (the default), none of that runs and behaviour is what it was.
468
+ */
469
+ readonly permittedHostsParam?: KubernetesPermittedHostsParam;
470
+ }
471
+ /** Where the operator-pinned permitted hosts and ports live. */
472
+ export interface KubernetesPermittedHostsParam {
473
+ /** The `ConfigMap`'s name. */
474
+ readonly name: string;
475
+ /** Its namespace. */
476
+ readonly namespace: string;
433
477
  }
434
478
  /**
435
479
  * Default {@link KubernetesEgressConfig.profileLabelKey} — this backend's
@@ -507,10 +551,10 @@ export declare const DEFAULT_PER_SANDBOX_EGRESS_LABEL_KEY = "sandbox.namzu.ai/pe
507
551
  * belongs to.
508
552
  */
509
553
  export declare class KubernetesPerSandboxEgressConfigError extends Error {
510
- readonly field: 'engine' | 'admissionPolicyName' | 'admissionPolicyBindingName' | 'labelKey';
554
+ readonly field: 'engine' | 'admissionPolicyName' | 'admissionPolicyBindingName' | 'labelKey' | 'hostIdentity' | 'permittedHostsParam.name' | 'permittedHostsParam.namespace';
511
555
  readonly value: string;
512
556
  readonly name = "KubernetesPerSandboxEgressConfigError";
513
- constructor(field: 'engine' | 'admissionPolicyName' | 'admissionPolicyBindingName' | 'labelKey', value: string, reason: string);
557
+ constructor(field: 'engine' | 'admissionPolicyName' | 'admissionPolicyBindingName' | 'labelKey' | 'hostIdentity' | 'permittedHostsParam.name' | 'permittedHostsParam.namespace', value: string, reason: string);
514
558
  }
515
559
  /**
516
560
  * The per-sandbox selector label KEY this config asks for, or nothing at all
@@ -535,44 +579,23 @@ export declare function perSandboxEgressLabelKey(egress: KubernetesEgressConfig
535
579
  */
536
580
  export declare function assertPerSandboxEgressIsUsable(egress: KubernetesEgressConfig | undefined): void;
537
581
  /**
538
- * Named refusal for `config.egress.perSandbox` reaching an entry point that
539
- * can never carry the capability it configures: `createKubernetesWorkspace`.
540
- *
541
- * `perSandbox` exists to make `Sandbox.setNetworkPolicy` PRESENT on a TASK
542
- * handle, where the acquire creates the object each policy is named after and
543
- * owned by and stamps the per-sandbox pod label its selector matches, and
544
- * where the RBAC and the admission fence are the ones that bound the write.
545
- * A workspace's create path does none of that — it composes no per-sandbox
546
- * pod label and tracks no owner uid for one — so on that path the option
547
- * would be accepted and mean nothing at all: exactly the "declared and
548
- * silently unused" configuration this module refuses everywhere else. The
549
- * alternative, omitting the method and saying nothing, is how a host comes to
550
- * believe it narrowed a workspace's egress.
551
- *
552
- * NOT a variant of {@link KubernetesPerSandboxEgressConfigError}, which is
553
- * about a `perSandbox` value this backend cannot honour ANYWHERE (an engine
554
- * with no hostname concept, an unnamed fence). This one is about a `perSandbox`
555
- * value it honours perfectly well on the other entry point, so a caller
556
- * catching the sibling for a typo'd value does not also catch a correct
557
- * configuration aimed at the wrong path.
582
+ * Formerly the refusal of `config.egress.perSandbox` on
583
+ * `createKubernetesWorkspace` and `allocateKubernetesWorkspace`, which could
584
+ * not carry the capability. They carry it now: the workspace's pod template
585
+ * gets the per-sandbox selector label, the `Sandbox` owns the policies, and
586
+ * the handle serves `setNetworkPolicy`.
587
+ *
588
+ * Nothing throws this any more. It stays exported so an existing
589
+ * `catch (err) { if (err instanceof KubernetesWorkspacePerSandboxEgressConfigError) … }`
590
+ * keeps compiling and simply never matches; it will be removed in a later
591
+ * major.
592
+ *
593
+ * @deprecated No workspace entry point refuses `egress.perSandbox` any more.
558
594
  */
559
595
  export declare class KubernetesWorkspacePerSandboxEgressConfigError extends Error {
560
596
  readonly name = "KubernetesWorkspacePerSandboxEgressConfigError";
561
597
  constructor();
562
598
  }
563
- /**
564
- * Refuse `config.egress.perSandbox` on the entry point that cannot carry it —
565
- * `createKubernetesWorkspace`. See
566
- * {@link KubernetesWorkspacePerSandboxEgressConfigError}.
567
- *
568
- * Deliberately not {@link assertPerSandboxEgressIsUsable}, which validates the
569
- * same config for the path that DOES honour it: a workspace has nothing to
570
- * validate the option for, whatever its `engine` or `admissionPolicyName` say,
571
- * because it serves no `setNetworkPolicy` at all. Calling that validator here
572
- * instead would be worse than saying nothing — it would report a
573
- * `perSandbox` this deployment can use as if it were in use.
574
- */
575
- export declare function assertWorkspaceCarriesNoPerSandboxEgress(egress: KubernetesEgressConfig | undefined): void;
576
599
  /**
577
600
  * The ONE composer for a sandbox pod's `additionalPodMetadata.labels`.
578
601
  *
@@ -946,6 +969,13 @@ export declare const CONFIG_LEVEL_NARROWING_REFUSAL: HostsFitNarrowingContext;
946
969
  * still, before it reads the fence.
947
970
  */
948
971
  export declare function assertHostsFitNarrowing(allowedHosts: readonly string[], narrowing: KubernetesCiliumEgressNarrowing | undefined, context: HostsFitNarrowingContext): void;
972
+ /**
973
+ * The port list a narrowed translation applies to `host`, before splitting
974
+ * out the TLS subset — see {@link KubernetesCiliumEgressNarrowing.ports}.
975
+ * `undefined` means no port restriction: the host's `toFQDNs` rule carries
976
+ * no `toPorts` at all.
977
+ */
978
+ export declare function narrowedHostPorts(host: string, narrowing: KubernetesCiliumEgressNarrowing): readonly number[] | undefined;
949
979
  /**
950
980
  * One allowlist entry, expanded to the `toFQDNs` entries it means.
951
981
  *
@@ -1187,11 +1217,49 @@ export interface EgressAllowance {
1187
1217
  readonly kind: 'NetworkPolicy' | 'CiliumNetworkPolicy';
1188
1218
  readonly name: string;
1189
1219
  };
1220
+ /**
1221
+ * Further objects whose `spec` was compared to its translation by
1222
+ * {@link verifyEgressPolicyApplied}, and which the union rule therefore
1223
+ * does not judge rule by rule either. Set only by
1224
+ * {@link unionEgressAllowance}: the post-write check of a per-sandbox
1225
+ * policy is a question about TWO named objects, the operator's baseline
1226
+ * and the policy just written.
1227
+ */
1228
+ readonly alsoNamed?: readonly {
1229
+ readonly kind: 'NetworkPolicy' | 'CiliumNetworkPolicy';
1230
+ readonly name: string;
1231
+ }[];
1190
1232
  }
1191
1233
  /**
1192
1234
  * The allowance a translated policy expresses. See {@link EgressAllowance}.
1193
1235
  */
1194
1236
  export declare function egressAllowance(translated: KubernetesTranslatedEgressPolicy): EgressAllowance;
1237
+ /**
1238
+ * What the pod may reach when TWO translated policies both select it: the
1239
+ * operator's baseline and one per-sandbox policy this backend wrote.
1240
+ *
1241
+ * Kubernetes unions every policy that selects a pod, so the boundary a
1242
+ * per-sandbox write is supposed to produce is exactly baseline PLUS the
1243
+ * written policy, and a third policy allowing more than that is what the
1244
+ * post-write check refuses. Each field is the union of the two sides':
1245
+ *
1246
+ * - destinations and `toFQDNs` names concatenate;
1247
+ * - `permitsEverything` is either side's, and `permitsNothing` is both
1248
+ * sides' — a `no-network` baseline permits nothing, and a baseline that
1249
+ * permits nothing plus a per-sandbox policy that permits one name permits
1250
+ * that name, not nothing;
1251
+ * - DNS lookups: a side that permits nothing contributes no names, a side
1252
+ * that does not narrow DNS contributes every name, and the union of name
1253
+ * lists is their concatenation. This is the one field where the naive
1254
+ * union is wrong: a `no-network` baseline reports `'all'` because a core
1255
+ * policy "cannot narrow DNS", and taking that at face value would let any
1256
+ * other policy open the resolver to every name beside a narrowed grant.
1257
+ *
1258
+ * Both objects are marked as named: each had its `spec` compared to its own
1259
+ * translation before this check runs, and neither's `.domain` entries (a
1260
+ * `matchName` plus a `matchPattern`) are expressible in an allowance.
1261
+ */
1262
+ export declare function unionEgressAllowance(baseline: EgressAllowance, added: EgressAllowance): EgressAllowance;
1195
1263
  /** One egress rule, judged against the translation. */
1196
1264
  export interface EgressRuleVerdict {
1197
1265
  readonly beyond: boolean | 'unknown';
@@ -1386,5 +1454,13 @@ export declare class KubernetesEgressPolicyUnionError extends Error {
1386
1454
  * acquire path's cleanup.
1387
1455
  */
1388
1456
  export declare function verifyEgressPolicyUnion(client: KubernetesClient, translated: KubernetesTranslatedEgressPolicy, target: EgressVerificationTarget, signal?: AbortSignal): Promise<void>;
1457
+ /**
1458
+ * {@link verifyEgressPolicyUnion} against an allowance the caller already
1459
+ * built — the entry point for a question about more than one translation,
1460
+ * which is what the post-write check of a per-sandbox policy is: the pod's
1461
+ * boundary is the baseline's allowance plus the written policy's, see
1462
+ * {@link unionEgressAllowance}.
1463
+ */
1464
+ export declare function verifyEgressPolicyUnionAgainst(client: KubernetesClient, allowance: EgressAllowance, target: EgressVerificationTarget, signal?: AbortSignal): Promise<void>;
1389
1465
  export {};
1390
1466
  //# sourceMappingURL=egress-policy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"egress-policy.d.ts","sourceRoot":"","sources":["../../../src/backends/kubernetes/egress-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4EG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAKlD,OAAO,EACN,KAAK,aAAa,EAElB,KAAK,kBAAkB,EAWvB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAA8B,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACnF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAA;AAc5D;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,QAAQ,CAAA;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,MAAM,0BAA0B,GACnC;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;CAAE,GAC/B;IACA,QAAQ,CAAC,IA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E,MAAM;IACxB,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpD,QAAQ,CAAC,UAAU,EAAE,sBAAsB,CAAC,MAAM,CAAC;IACnD,QAAQ,CAAC,QAAQ,EAAE,SAAS,oBAAoB,EAAE;IAElD,iEAAiE;IACjE,QAAQ,CAAC,MAAM,EAAE,SAAS,kBAAkB,EAAE;IAV/C,SAAkB,IAAI,sCAAqC;gBAGjD,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAC3C,UAAU,EAAE,sBAAsB,CAAC,MAAM,CAAC,EAC1C,QAAQ,EAAE,SAAS,oBAAoB,EAAE,EAClD,OAAO,EAAE,MAAM;IACf,iEAAiE;IACxD,MAAM,GAAE,SAAS,kBAAkB,EAAO;CAMpD;AAuCD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,uBAAuB,CAC5C,MAAM,EAAE,gBAAgB,EACxB,UAAU,EAAE,gCAAgC,EAC5C,MAAM,EAAE,wBAAwB,EAChC,MAAM,CAAC,EAAE,WAAW,GAClB,OAAO,CAAC,IAAI,CAAC,CAEf;AAED;;;;;;GAMG;AACH,wBAAsB,8BAA8B,CACnD,MAAM,EAAE,gBAAgB,EACxB,SAAS,EAAE,eAAe,EAC1B,MAAM,EAAE,wBAAwB,EAChC,MAAM,CAAC,EAAE,WAAW,GAClB,OAAO,CAAC,IAAI,CAAC,CAoDf"}
@@ -314,53 +314,40 @@ export function assertPerSandboxEgressIsUsable(egress) {
314
314
  if (perSandbox.narrowing !== undefined) {
315
315
  assertCiliumNarrowingIsUsable(perSandbox.narrowing, 'perSandbox.narrowing');
316
316
  }
317
+ const { hostIdentity, permittedHostsParam } = perSandbox;
318
+ if (hostIdentity !== undefined && (hostIdentity === '' || hostIdentity.trim() !== hostIdentity)) {
319
+ throw new KubernetesPerSandboxEgressConfigError('hostIdentity', hostIdentity, 'is not a user name (an empty or space-padded identity matches nothing, so the fence check would refuse every write)');
320
+ }
321
+ if (permittedHostsParam !== undefined) {
322
+ for (const field of ['name', 'namespace']) {
323
+ const value = permittedHostsParam[field];
324
+ if (typeof value !== 'string' || value === '' || value.trim() !== value) {
325
+ throw new KubernetesPerSandboxEgressConfigError(`permittedHostsParam.${field}`, String(value), 'is not an object name (the parameter ConfigMap is named by both fields, and an empty or space-padded one names nothing, so every write would be refused)');
326
+ }
327
+ }
328
+ }
317
329
  perSandboxEgressLabelKey(egress);
318
330
  }
319
331
  /**
320
- * Named refusal for `config.egress.perSandbox` reaching an entry point that
321
- * can never carry the capability it configures: `createKubernetesWorkspace`.
322
- *
323
- * `perSandbox` exists to make `Sandbox.setNetworkPolicy` PRESENT on a TASK
324
- * handle, where the acquire creates the object each policy is named after and
325
- * owned by and stamps the per-sandbox pod label its selector matches, and
326
- * where the RBAC and the admission fence are the ones that bound the write.
327
- * A workspace's create path does none of that — it composes no per-sandbox
328
- * pod label and tracks no owner uid for one — so on that path the option
329
- * would be accepted and mean nothing at all: exactly the "declared and
330
- * silently unused" configuration this module refuses everywhere else. The
331
- * alternative, omitting the method and saying nothing, is how a host comes to
332
- * believe it narrowed a workspace's egress.
333
- *
334
- * NOT a variant of {@link KubernetesPerSandboxEgressConfigError}, which is
335
- * about a `perSandbox` value this backend cannot honour ANYWHERE (an engine
336
- * with no hostname concept, an unnamed fence). This one is about a `perSandbox`
337
- * value it honours perfectly well on the other entry point, so a caller
338
- * catching the sibling for a typo'd value does not also catch a correct
339
- * configuration aimed at the wrong path.
332
+ * Formerly the refusal of `config.egress.perSandbox` on
333
+ * `createKubernetesWorkspace` and `allocateKubernetesWorkspace`, which could
334
+ * not carry the capability. They carry it now: the workspace's pod template
335
+ * gets the per-sandbox selector label, the `Sandbox` owns the policies, and
336
+ * the handle serves `setNetworkPolicy`.
337
+ *
338
+ * Nothing throws this any more. It stays exported so an existing
339
+ * `catch (err) { if (err instanceof KubernetesWorkspacePerSandboxEgressConfigError) … }`
340
+ * keeps compiling and simply never matches; it will be removed in a later
341
+ * major.
342
+ *
343
+ * @deprecated No workspace entry point refuses `egress.perSandbox` any more.
340
344
  */
341
345
  export class KubernetesWorkspacePerSandboxEgressConfigError extends Error {
342
346
  name = 'KubernetesWorkspacePerSandboxEgressConfigError';
343
347
  constructor() {
344
- super(`kubernetes: config.egress.perSandbox is set, but a KubernetesWorkspace cannot carry the capability it configures: Sandbox.setNetworkPolicy is implemented on a TASK handle, whose acquire creates the object each per-sandbox policy is named after and owned by and stamps the pod label its selector matches, while a workspace's create path composes no per-sandbox pod label and tracks no owner uid for one. Accepting the option here would declare a capability this path never serves — the silent downgrade this backend refuses on every other entry point — so it is refused before anything is sent. Drop egress.perSandbox from the configuration workspaces are created from (a backend serving task sandboxes can keep it), or create a task sandbox with it, where the method is present.`);
348
+ super('kubernetes: config.egress.perSandbox is set on a workspace entry point. This error is no longer thrown: workspaces serve per-sandbox egress.');
345
349
  }
346
350
  }
347
- /**
348
- * Refuse `config.egress.perSandbox` on the entry point that cannot carry it —
349
- * `createKubernetesWorkspace`. See
350
- * {@link KubernetesWorkspacePerSandboxEgressConfigError}.
351
- *
352
- * Deliberately not {@link assertPerSandboxEgressIsUsable}, which validates the
353
- * same config for the path that DOES honour it: a workspace has nothing to
354
- * validate the option for, whatever its `engine` or `admissionPolicyName` say,
355
- * because it serves no `setNetworkPolicy` at all. Calling that validator here
356
- * instead would be worse than saying nothing — it would report a
357
- * `perSandbox` this deployment can use as if it were in use.
358
- */
359
- export function assertWorkspaceCarriesNoPerSandboxEgress(egress) {
360
- if (egress?.perSandbox === undefined)
361
- return;
362
- throw new KubernetesWorkspacePerSandboxEgressConfigError();
363
- }
364
351
  /**
365
352
  * The ONE composer for a sandbox pod's `additionalPodMetadata.labels`.
366
353
  *
@@ -1074,7 +1061,7 @@ export function assertHostsFitNarrowing(allowedHosts, narrowing, context) {
1074
1061
  * `undefined` means no port restriction: the host's `toFQDNs` rule carries
1075
1062
  * no `toPorts` at all.
1076
1063
  */
1077
- function narrowedHostPorts(host, narrowing) {
1064
+ export function narrowedHostPorts(host, narrowing) {
1078
1065
  const explicit = narrowing.hostPorts?.[host] ?? narrowing.ports;
1079
1066
  if (explicit !== undefined)
1080
1067
  return explicit;
@@ -1821,6 +1808,49 @@ export function egressAllowance(translated) {
1821
1808
  namedObject: { kind: translated.kind, name: translated.name },
1822
1809
  };
1823
1810
  }
1811
+ /**
1812
+ * What the pod may reach when TWO translated policies both select it: the
1813
+ * operator's baseline and one per-sandbox policy this backend wrote.
1814
+ *
1815
+ * Kubernetes unions every policy that selects a pod, so the boundary a
1816
+ * per-sandbox write is supposed to produce is exactly baseline PLUS the
1817
+ * written policy, and a third policy allowing more than that is what the
1818
+ * post-write check refuses. Each field is the union of the two sides':
1819
+ *
1820
+ * - destinations and `toFQDNs` names concatenate;
1821
+ * - `permitsEverything` is either side's, and `permitsNothing` is both
1822
+ * sides' — a `no-network` baseline permits nothing, and a baseline that
1823
+ * permits nothing plus a per-sandbox policy that permits one name permits
1824
+ * that name, not nothing;
1825
+ * - DNS lookups: a side that permits nothing contributes no names, a side
1826
+ * that does not narrow DNS contributes every name, and the union of name
1827
+ * lists is their concatenation. This is the one field where the naive
1828
+ * union is wrong: a `no-network` baseline reports `'all'` because a core
1829
+ * policy "cannot narrow DNS", and taking that at face value would let any
1830
+ * other policy open the resolver to every name beside a narrowed grant.
1831
+ *
1832
+ * Both objects are marked as named: each had its `spec` compared to its own
1833
+ * translation before this check runs, and neither's `.domain` entries (a
1834
+ * `matchName` plus a `matchPattern`) are expressible in an allowance.
1835
+ */
1836
+ export function unionEgressAllowance(baseline, added) {
1837
+ const dnsOf = (side) => side.permitsNothing ? [] : side.dnsNarrowedTo;
1838
+ const baselineDns = dnsOf(baseline);
1839
+ const addedDns = dnsOf(added);
1840
+ const dnsNarrowedTo = baselineDns === 'all' || addedDns === 'all'
1841
+ ? 'all'
1842
+ : [...new Set([...baselineDns, ...addedDns])];
1843
+ return {
1844
+ destinations: [...baseline.destinations, ...added.destinations],
1845
+ fqdns: [...baseline.fqdns, ...added.fqdns],
1846
+ dnsNarrowedTo,
1847
+ permitsEverything: baseline.permitsEverything || added.permitsEverything,
1848
+ permitsNothing: baseline.permitsNothing && added.permitsNothing,
1849
+ policyKind: baseline.policyKind,
1850
+ namedObject: baseline.namedObject,
1851
+ alsoNamed: [...(baseline.alsoNamed ?? []), added.namedObject, ...(added.alsoNamed ?? [])],
1852
+ };
1853
+ }
1824
1854
  // ---------------------------------------------------------------------------
1825
1855
  // Is one policy's rule inside the translation
1826
1856
  // ---------------------------------------------------------------------------
@@ -2327,7 +2357,8 @@ function unreadableEgressPolicy(kind, name, detail) {
2327
2357
  * earlier on the create path.
2328
2358
  */
2329
2359
  function isNamedObject(allowance, kind, name) {
2330
- return allowance.namedObject.kind === kind && allowance.namedObject.name === name;
2360
+ const matches = (entry) => entry.kind === kind && entry.name === name;
2361
+ return matches(allowance.namedObject) || (allowance.alsoNamed ?? []).some(matches);
2331
2362
  }
2332
2363
  /** Every core `NetworkPolicy` in the list, reduced to {@link EgressPolicyDocument}. */
2333
2364
  export function readCoreEgressPolicies(items, target, allowance) {
@@ -2663,7 +2694,16 @@ function formatEgressRemedy(refusal, unread) {
2663
2694
  * acquire path's cleanup.
2664
2695
  */
2665
2696
  export async function verifyEgressPolicyUnion(client, translated, target, signal) {
2666
- const allowance = egressAllowance(translated);
2697
+ await verifyEgressPolicyUnionAgainst(client, egressAllowance(translated), target, signal);
2698
+ }
2699
+ /**
2700
+ * {@link verifyEgressPolicyUnion} against an allowance the caller already
2701
+ * built — the entry point for a question about more than one translation,
2702
+ * which is what the post-write check of a per-sandbox policy is: the pod's
2703
+ * boundary is the baseline's allowance plus the written policy's, see
2704
+ * {@link unionEgressAllowance}.
2705
+ */
2706
+ export async function verifyEgressPolicyUnionAgainst(client, allowance, target, signal) {
2667
2707
  const documents = [];
2668
2708
  try {
2669
2709
  documents.push(...readCoreEgressPolicies(await listPolicies(client, networkPolicyCollectionPath(target.namespace), 'networkpolicies', signal), target, allowance));