Skip to content

Commit cecce4c

Browse files
author
adpa-ms
committed
docs: align state-aware design + GA networking docs with iso network policy
The cross-backend state-aware design docs and the v2 GA networking scope doc still described IsolationSession as honoring filesystem (not network) at provision, and showed provision examples using network.allowedHosts -- all now rejected by the backend. Align them with shipped behavior and the SDK type: provision honors only the canonical unrestricted-network acknowledgment ({ defaultPolicy: 'allow', allowLocalNetwork: true }); filesystem policy is rejected and ui is ignored. - networking.md: reword the IsolationSession network-scope line (requires the canonical ack; rejects everything else). - mxc-state-aware-sandbox-api.md / -overview.md: fix the 10.3 honor matrix (iso filesystem applied->rejected, ui applied->ignored), the SDK-exposure prose, the IsolationSessionProvisionConfig type (required network literal; drop filesystem and ui), and the provision examples (drop filesystem, allowedHosts->allowLocalNetwork). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 47662115-cf22-4564-8930-370dfbee63fb
1 parent 8505781 commit cecce4c

3 files changed

Lines changed: 24 additions & 27 deletions

File tree

docs/sandbox-policy/v2/networking.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ Same model and enforcement as WSLc (model 2 achievable; iptables/nftables on the
317317
### Other backends
318318

319319
- **Windows Sandbox:** Guest-side firewall only, with hardcoded rules. In GA for development/testing scenarios where network isolation is not critical.
320-
- **Isolation Session:** No network configuration support (all network/proxy fields rejected at validation time). In GA for process isolation only (filesystem, identity, lifecycle).
320+
- **Isolation Session:** No network filtering or denial is possible — outbound is open and a process inside can listen on a localhost-reachable port. Provision therefore requires the canonical unrestricted-network acknowledgment (`network.defaultPolicy=allow` + `network.allowLocalNetwork=true`) and rejects every other network/proxy policy at validation time. In GA for process isolation only (identity, lifecycle).
321321
- **Hyperlight, Nanvix:** Not in this GA scope doc. Additional follow up is needed to confirm their capabilities and whether they align with this doc.
322322

323323
## Gaps and limitations

docs/state-aware-lifecycle/mxc-state-aware-sandbox-api-overview.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,7 @@ Provision and exec — the two most distinctive shapes. Reference §7.4 has all
290290

291291
```typescript
292292
const config: IsolationSessionProvisionConfig = {
293-
filesystem: { readwritePaths: ['C:\\workspace'] },
294-
network: { defaultPolicy: 'allow', allowedHosts: ['api.anthropic.com'] },
293+
network: { defaultPolicy: 'allow', allowLocalNetwork: true },
295294
};
296295
const { sandboxId } = await provisionSandbox(
297296
'isolation_session',
@@ -306,8 +305,7 @@ const { sandboxId } = await provisionSandbox(
306305
"version": "0.6.0-alpha",
307306
"containment": "isolation_session",
308307
"phase": "provision",
309-
"filesystem": { "readwritePaths": ["C:\\workspace"] },
310-
"network": { "defaultPolicy": "allow", "allowedHosts": ["api.anthropic.com"] }
308+
"network": { "defaultPolicy": "allow", "allowLocalNetwork": true }
311309
}
312310
```
313311

@@ -370,8 +368,9 @@ Cross-backend exec fields flow through top-level `process`. Cross-cutting fields
370368
(`filesystem` / `network` / `ui`) on the per-(backend, phase) Config map directly to
371369
top-level wire fields (backend declares per-phase honor per reference §10.3). The
372370
SDK Config exposes only the cross-cutting fields the runtime currently honors —
373-
for IsolationSession at provision today that's `filesystem`; `network` and `ui` are
374-
added when the runtime honors them.
371+
for IsolationSession at provision that's `network` — the required unrestricted-network
372+
acknowledgment (`{ defaultPolicy: 'allow', allowLocalNetwork: true }`); `filesystem` is
373+
rejected.
375374

376375
## Error codes
377376

docs/state-aware-lifecycle/mxc-state-aware-sandbox-api.md

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,10 @@ type StateAwareContainmentBackend = Extract<ContainmentBackend, 'isolation_sessi
268268

269269
interface IsolationSessionProvisionConfig {
270270
version?: string;
271-
filesystem?: FilesystemConfig;
272-
network?: NetworkConfig;
273-
ui?: UiConfig;
271+
// IsolationSession cannot filter or deny the container network, so provision
272+
// requires the canonical unrestricted-network acknowledgment — the only accepted
273+
// value. filesystem policy is rejected by this backend (§10.3).
274+
network: { defaultPolicy: 'allow'; allowLocalNetwork: true };
274275
}
275276

276277
interface IsolationSessionStartConfig {
@@ -500,18 +501,14 @@ import {
500501
execInSandboxAsync,
501502
stopSandbox,
502503
deprovisionSandbox,
503-
getAvailableToolsPolicy,
504504
IsolationSessionProvisionConfig,
505505
SandboxSpawnOptions,
506506
} from '@microsoft/mxc-sdk';
507507

508-
const tools = getAvailableToolsPolicy();
509508
const provisionConfig: IsolationSessionProvisionConfig = {
510-
filesystem: {
511-
readwritePaths: ['C:\\workspace', ...tools.readwritePaths],
512-
readonlyPaths: tools.readonlyPaths,
513-
},
514-
network: { defaultPolicy: 'allow', allowedHosts: ['api.anthropic.com'] },
509+
// IsolationSession cannot filter or deny the container network, so provision
510+
// requires the canonical unrestricted-network acknowledgment (the only accepted value).
511+
network: { defaultPolicy: 'allow', allowLocalNetwork: true },
515512
};
516513

517514
// IsolationSession is experimental, so every call carries `experimental: true`.
@@ -570,8 +567,10 @@ The existing policy-discovery helpers (`getAvailableToolsPolicy`,
570567
`getUserProfilePolicy`, `getTemporaryFilesPolicy`) compose with state-aware Configs
571568
unchanged. They produce `FilesystemPolicyResult` fragments — `{ readonlyPaths,
572569
readwritePaths }` — whose shape matches `FilesystemConfig`'s readonly / readwrite path
573-
arrays. Consumers merge the fragments directly into a state-aware Config's `filesystem`
574-
field, as in the §6.3 example.
570+
arrays. Consumers merge the fragments directly into the `filesystem` field of a
571+
state-aware Config for a backend that honors filesystem policy at provision (e.g.
572+
WindowsSandbox); IsolationSession rejects filesystem policy, so its provision Config
573+
omits it.
575574

576575
## 7. Wire contract
577576

@@ -777,8 +776,7 @@ shape, across all five phases.
777776

778777
```typescript
779778
const config: IsolationSessionProvisionConfig = {
780-
filesystem: { readwritePaths: ['C:\\workspace'] },
781-
network: { defaultPolicy: 'allow', allowedHosts: ['api.anthropic.com'] },
779+
network: { defaultPolicy: 'allow', allowLocalNetwork: true },
782780
};
783781
const { sandboxId } = await provisionSandbox(
784782
'isolation_session',
@@ -793,8 +791,7 @@ const { sandboxId } = await provisionSandbox(
793791
"version": "0.6.0-alpha",
794792
"containment": "isolation_session",
795793
"phase": "provision",
796-
"filesystem": { "readwritePaths": ["C:\\workspace"] },
797-
"network": { "defaultPolicy": "allow", "allowedHosts": ["api.anthropic.com"] }
794+
"network": { "defaultPolicy": "allow", "allowLocalNetwork": true }
798795
}
799796
```
800797

@@ -1530,9 +1527,9 @@ documented in the backend's plan doc):
15301527

15311528
| Field | provision | start | exec | stop | deprovision |
15321529
|---|---|---|---|---|---|
1533-
| `filesystem` | applied | rejected | rejected | rejected | rejected |
1530+
| `filesystem` | rejected | rejected | rejected | rejected | rejected |
15341531
| `network` | applied | rejected | rejected | rejected | rejected |
1535-
| `ui` | applied | rejected | rejected | rejected | rejected |
1532+
| `ui` | ignored | ignored | ignored | ignored | ignored |
15361533

15371534
For WindowsSandbox, filesystem policy (readwrite/readonly/denied HOST paths) is
15381535
applied at provision and frozen for the life of the sandbox; later phases reject it.
@@ -1556,8 +1553,9 @@ unconditionally by the in-guest agent). WindowsSandbox has no Entra `user` bundl
15561553
the backend does not honor at that phase, and also fields the matrix would mark as
15571554
`applied` but the runtime does not yet implement. For IsolationSession's matrix
15581555
above, `IsolationSessionProvisionConfig` is the only Config that carries any
1559-
cross-cutting fields. The SDK currently exposes `filesystem` only; `network` and
1560-
`ui` will be added at provision when the IsolationSession runtime honors them.
1556+
cross-cutting fields. The SDK exposes `network` at provision — the required
1557+
unrestricted-network acknowledgment (`{ defaultPolicy: 'allow', allowLocalNetwork:
1558+
true }`), the only value the backend accepts; `filesystem` is rejected.
15611559
The start, exec, stop, and deprovision Configs carry none of these fields. Callers
15621560
cannot accidentally pass them.
15631561
- **Runtime enforcement at Rust.** The backend's `validate_<phase>` hooks reject

0 commit comments

Comments
 (0)