Skip to content

feat(duckfleet): enforce dataset isolation (#1129) - #1136

Merged
athvin merged 3 commits into
mainfrom
issue/1129-duckfleet-isolation
Nov 21, 2026
Merged

athvin merged 3 commits into
mainfrom
issue/1129-duckfleet-isolation

Conversation

@athvin

@athvin athvin commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

Closes #1129

🚧 Claimed by an agent session — 2026-11-21T00:56:51.631676+00:00, session 01a1fb62-5950-78d2-982c-5ecb2cd40d30 on brians-MacBook-Pro.local.
The claim is this open draft PR: closing it releases the ticket.

Post-merge is part of this pull request. The ledger below records whether
the follow-up work actually happened. /land-pr closes it.

What

Add dataset-scoped DuckFleet bindings, storage identities and a Helm namespace/network boundary. Missing, revoked, expired or generation-mismatched bindings refuse admission, and callers cannot supply resource locations.

Why

DuckFleet trusts principals within a deployment. The controlled pilot therefore needs a separate deployment and storage identity for each dataset, including datasets in the same org.

Proof

Eight Rust isolation tests, nine Python probe tests, eight Terraform mock-plan tests and rendered Helm boundary assertions pass. Three disposable deployments passed all six cross-dataset credential/write/session/history refusals and independent catalog/artifact checks. make check passed locally. Corrected CI passed: Rust run 44849180403 and infra run 44849180413, including Helm lint/render/schema validation. All four Terraform plans reported no changes. All 15 required contexts and successful detect jobs were checked on exact head e6e3afd before squash merge.

Risk & rollback

No dataset is enrolled or remote execution enabled by this PR. The HTTP adapter and executor integration consume this boundary in #1130/#1132; live AWS/EKS isolation is a qualification gate in #1134. Revert the merge commit to remove these unused integration foundations.

Post-merge ledger

Closed by: Codex · session 01a1fb62-5950-78d2-982c-5ecb2cd40d30 on brians-MacBook-Pro.local · 2026-11-21T01:51:45.838511+00:00

  • main is green with this change on it — the merge SHA, and the run
    that proves it. A later head SHA with this commit as an ancestor counts;
    a cancelled run with zero jobs does not: merge b1c370e2350908da525885fb5a6439da8b4e286c confirmed on origin/main; Rust 44849684899, infra 44849684848, frontend 44849684824 and devcontainer 44849685003 succeeded. The post-merge watch is complete below.
  • images — 44849684777 built the API image successfully; web correctly skipped.
  • deploy — 44850118084 logged deployment of this exact SHA and succeeded for dev and prod. Dev service selector is green; web-api-green-7bb8b75fcc-pjbpb emitted er-server listening at 01:26:47.472294Z. Prod web-api-blue-cd48798dc-vvzj9 emitted the same startup line at 01:26:32.044523Z, verified in /er/prod/containers via Logs Insights query c9ba37df-a692-402b-9432-ceda431693a0. Prod cluster access is not granted to the read-only role; CloudWatch supplied the process evidence.
  • push-only surface — deploy 44850118084 succeeded in dev and prod; latest kind 44690221398 and cluster-objects 42907888432 succeeded. Drift 44684951112 failed before this merge on the known missing alert subscription, tracked in The er-alerts SNS email subscription has never been confirmed — 19 armed alarms reach nobody #1107. No new attributable failure appeared during the watch.
  • the board card — live board shows Done; issue timeline records PR feat(duckfleet): enforce dataset isolation (#1129) #1136 as the closer at 01:21:21Z.
  • follow-ups — existing dependent tickets DuckFleet: execute generated dataset reads through HTTP and Arrow #1130–DuckFleet: qualify the full API workflow and decide production rollout #1134 own query/task integration and live AWS/EKS qualification. No datasets are enrolled by this PR; no new unowned deferral.
  • what was learned is written down — security skill links references/duckfleet-isolation.md and the synthetic evidence JSON: boundary choice, cost tradeoff, credential lifecycle, retention, upstream pin and evidence limits.

Specific to this change

  • Completed the 30-minute watch through 2026-11-21T01:51:19Z: main remained at b1c370e, all six merge workflows succeeded, and no new attributable failure appeared.
Context — plan, discoveries, measurements, files

Plan

Implementation, local validation and CI complete. Squash merged as b1c370e at 2026-11-21T01:21:19Z; main and both deployments verified; post-merge watch and ledger complete.

  1. Add an operator-owned, strictly validated dataset binding registry for remote execution. Resolve immutable org/dataset IDs to derived deployment, catalog, credential-mount and storage boundaries; reject missing, expired, revoked or generation-mismatched bindings.
  2. Reuse DuckFleet's pinned namespace isolation implementation. Add the host-owned dataset Pod Identity/storage policy module and test its boundaries; do not enroll production datasets before qualification.
  3. Exercise negative cases for same-org and cross-org binding substitution, shared credentials, stale generations and artifact prefixes. Add a disposable multi-deployment integration probe for catalog, session and history credential boundaries.
  4. Record provisioning, rotation, revocation, deprovisioning, history retention and the per-dataset idle-cost tradeoff in the owning skill reference, distinguishing local evidence from live cloud qualification.
  5. Run the targeted isolation tests, Terraform checks, make check, and the relevant integration probe; land only when acceptance evidence is complete. Remote query execution and task integration remain in their dependent tickets.

Discoveries

  • Reuse pinned DuckFleet namespace/catalog/history separation at 672b3e3e82b61122c9647dd5dc85d32a3cedf09d; this project supplies the missing dataset-scoped storage IAM and ER gateway admission boundary.
  • Per-dataset idle capacity and lifecycle overhead are explicit tradeoffs. The decision and operating sequence live in the security skill reference.
  • A negative-control mutation removing the generation guard made the rotation test fail; the guard was restored before validation.
  • Local direct Helm commands were rejected by the session command guard, including read-only lint/template. The rendered-policy assertion script passed, and CI run 44848577646 supplied successful lint and schema-validation evidence.
  • The first full gate regenerated the new crate-map entry and refused its stale reference. CI also caught Terraform test formatting and the generated infrastructure coverage index. Both generated references, the formatter fix and script-only CI routing are committed; make check passed on e6e3afd.

Measurements

  • Local Compose evidence is committed in .claude/skills/security/references/duckfleet-isolation-evidence.json. It does not prove live AWS IAM or EKS NetworkPolicy enforcement.
  • The disposable probe used the existing image built from the pinned upstream source after a Docker frontend fetch stalled. Image ID and source revision are recorded; every owned test container/volume was removed.

Files

@github-actions

Copy link
Copy Markdown
Contributor

terraform plan

93e0713 · run log and full plans

env add change destroy
state-backend (plan only) 0 0 0
core 0 0 0
dev 0 0 0
prod 0 0 0

Planned with -refresh=false, so this is the config-versus-state diff and
not out-of-band drift. That is a security choice, not a speed one: a refreshing
plan reads secret values, and the plan role is assumable from any PR branch —
which can edit the workflow it runs under. Drift is caught at apply time, which
refreshes fully.

@athvin
athvin marked this pull request as ready for review November 21, 2026 01:19
@athvin
athvin merged commit b1c370e into main Nov 21, 2026
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DuckFleet: define and enforce dataset isolation for remote execution

2 participants