You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Network policy for compute-to-data access — VPC routing to external research endpoints #10
The in-place (compute-to-data) access pattern for NIH/AnVIL/Terra requires SRE VPCs to have controlled outbound access to specific external endpoints. ground currently deploys VPC endpoints for AWS services only. It needs to support routing to external research data endpoints conditioned on compliance posture.
Required work
Approved endpoint list in ground.yaml: Declare approved external data endpoints under external_services or a new data_endpoints: section:
VPC endpoint policy generator: ground deploy generates VPC endpoint policies that include aws:PrincipalTag conditions for the declared endpoints. Researchers without attest:nih-approval=true cannot reach approved NIH S3 prefixes even from inside the SRE.
Network ACL / Security Group rules: For non-AWS endpoints (Terra/GCP), generate Security Group rules allowing outbound HTTPS to specific CIDRs, conditioned on SRE type.
Integration with attest scan: attest scan should verify network policies match the declared data endpoints and approved researchers.
Design constraint
The VPC endpoint policy is the last line of defense — Cedar evaluates the user's approval status, but the network policy ensures even Cedar-bypassed traffic (e.g., direct AWS CLI calls) is blocked for unapproved principals.
Related
attest#100 (compute-to-data Cedar policies — this issue provides the network layer)
ground#8 (provision-sre — new SREs of type nih-genomics automatically get these policies)
Dependency (post-kernel roadmap, #11):blocked by attest#100 (the Cedar compute-to-data policy this enforces at the network layer). This is the VPC/network half of the compute-to-data span.
This issue is Decision 3 (the network half): extend NetworkConfig with data_endpoints (name, service/FQDN, sre_types, authorized_ous); render (a) VPC routing to the external endpoint and (b) a new coarse policies/data_endpoint_access_scp.json denying egress unless the account carries the right posture tag (reuse attest:data-classes/compliance-tier — no new tag namespace); include declared endpoints in GroundMeta for attest init.
The SCP is the coarse outer gate (mirrors the nitro_attestation_scp pattern); attest's dataset-scoped Cedar policy (attest#100) is the fine per-request decision — same two-layer model as AMI gating (#13).
Honest prerequisite flagged in the ADR:internal/stack/network is a stub today — the VPC-routing half can't ship until that template generation is built. The config + SCP surface is mechanical; the network stack is the real work here.
policies/data_endpoint_access_scp.json: deny in-place data-access actions unless the principal carries an attest:data-classes posture tag (Null check, not StringNotEquals — data-classes is multi-valued).
ground export-metadata emits endpoints in ground-meta.json.
Pairs with attest#100 (dataset-scoped Cedar PDP) — coarse SCP + fine Cedar, mirroring AMI gating (#13).
Remaining for this issue: the VPC-routing half. internal/stack/network is still a stub — ground declares, gates, and exports the endpoints but does not yet render VPC routes/endpoints to reach them. Keeping this issue open for that network-stack implementation.
ground#22 shipped the policy/config/metadata surface; the VPC-routing half needs ground's network stack (a stub today), so I designed it first. Decisions:
hub-and-spoke — shared hub holds centralized org-conditioned interface endpoints; per-tier spoke VPCs; segregated TGW route tables make the ground:tier/attest:data-classes isolation a routing fact.
deterministic CIDR carve from NetworkConfig.CIDRBlock (pure, unit-testable, never renumbers).
compute-to-data egress per DataEndpoint — S3 gateway endpoint for dbGaP, PrivateLink/peering for AnVIL/Terra, never a public IGW for controlled data. The network path is the third gate beside the SCP + attest's Cedar policy.
4-step build order (each its own PR): CIDR allocator → single-VPC template → hub-and-spoke+TGW → compute-to-data egress. Steps 1–2 also deliver the long-promised network foundation independently of this issue's routing (step 4). Implementation begins at the CIDR allocator.
ADR 0001 step 2 shipped: single-VPC foundation (#25).
network.Stack.Template() now emits a private-only VPC (no IGW) on the deterministic hub /16, per-AZ /20 private subnets (region-portable via Fn::GetAZs), gateway endpoints for S3/DynamoDB + interface endpoints with an org-conditioned policy (allow same-org aws:PrincipalOrgID vs a deploy-time OrgId param, deny external). Built as a cfn.Template like the other four stacks (native CloudFormation; CDK stays an optional --output cdk export). Template-as-data tested; surfaced in --dry-run.
Build order remaining: step 3 (hub-and-spoke + segregated Transit Gateway route tables — the tier isolation) → step 4 (compute-to-data egress per DataEndpoint — this issue's routing). Also pending: wiring the network stack into the live numbered deploy phases (dry-run only today).
Template() now builds a shared hub VPC (centralized endpoints), one private spoke VPC per org.workload_ous tier, and a TGW with segregated per-tier route tables — each spoke routes to the hub but not to sibling spokes, so tier isolation is a routing fact. TGW default association/propagation disabled so new attachments can't silently join a shared table. Single-VPC path (step 2) is the unchanged degrade. Tested incl. the no-cross-spoke-route invariant; verified via --dry-run.
Remaining for this issue: step 4 — compute-to-data egress per DataEndpoint (S3 gateway endpoint for dbGaP, PrivateLink/peering for AnVIL/Terra, never a public IGW). The topology it rides on now exists.
The compute-to-data egress lands: per network.data_endpoints, the hub-and-spoke template renders a hub-side scoped egress path inferred from the URL — S3 host → S3 gateway endpoint (reusing the foundation one), com.amazonaws.* → interface endpoint, public host → no route (declaration-only; never a public IGW for controlled data).
The three-layer compute-to-data gate is complete: SCP (data_endpoint_access_scp) + attest dataset-scoped Cedar (attest#100) + this network egress path. The network foundation (ADR 0001) is also fully built: CIDR allocator → single-VPC → hub-and-spoke+TGW → egress.
One unrelated follow-up remains (tracked separately, not this issue): wiring the network stack into the live numbered deploy phases — it's --dry-run-visible today. Closing ground#10 as done.
Activity
scttfrdmn commentedon Jun 8, 2026
Triage cross-link: network half of the compute-to-data capability. Pairs with attest#100 (Cedar-gated access) and qualify#36 (approval workflow).
scttfrdmn commentedon Jun 9, 2026
Dependency (post-kernel roadmap, #11): blocked by attest#100 (the Cedar compute-to-data policy this enforces at the network layer). This is the VPC/network half of the compute-to-data span.
scttfrdmn commentedon Jun 11, 2026
Design recorded: ADR 0002 — Compute-to-data access (provabl umbrella).
This issue is Decision 3 (the network half): extend
NetworkConfigwithdata_endpoints(name, service/FQDN,sre_types,authorized_ous); render (a) VPC routing to the external endpoint and (b) a new coarsepolicies/data_endpoint_access_scp.jsondenying egress unless the account carries the right posture tag (reuseattest:data-classes/compliance-tier— no new tag namespace); include declared endpoints inGroundMetaforattest init.The SCP is the coarse outer gate (mirrors the nitro_attestation_scp pattern); attest's dataset-scoped Cedar policy (attest#100) is the fine per-request decision — same two-layer model as AMI gating (#13).
Honest prerequisite flagged in the ADR:
internal/stack/networkis a stub today — the VPC-routing half can't ship until that template generation is built. The config + SCP surface is mechanical; the network stack is the real work here.feat: compute-to-data endpoint declarations + egress-gating SCP (grou…
scttfrdmn commentedon Jun 12, 2026
Coarse half shipped: #22 (ADR 0002 Decision 3).
NetworkConfig.data_endpointsdeclarations (url,data_class,sre_types,authorized_ous).policies/data_endpoint_access_scp.json: deny in-place data-access actions unless the principal carries anattest:data-classesposture tag (Nullcheck, notStringNotEquals—data-classesis multi-valued).ground export-metadataemits endpoints inground-meta.json.TestDataEndpointAccessSCPRequiresDataClassPosture.Pairs with attest#100 (dataset-scoped Cedar PDP) — coarse SCP + fine Cedar, mirroring AMI gating (#13).
Remaining for this issue: the VPC-routing half.
internal/stack/networkis still a stub — ground declares, gates, and exports the endpoints but does not yet render VPC routes/endpoints to reach them. Keeping this issue open for that network-stack implementation.docs(adr): 0001 network foundation design (ground#10 routing half) (#23)
scttfrdmn commentedon Jun 12, 2026
Routing half now designed: ADR 0001 — network foundation.
ground#22 shipped the policy/config/metadata surface; the VPC-routing half needs ground's network stack (a stub today), so I designed it first. Decisions:
ground:tier/attest:data-classesisolation a routing fact.NetworkConfig.CIDRBlock(pure, unit-testable, never renumbers).DataEndpoint— S3 gateway endpoint for dbGaP, PrivateLink/peering for AnVIL/Terra, never a public IGW for controlled data. The network path is the third gate beside the SCP + attest's Cedar policy.4-step build order (each its own PR): CIDR allocator → single-VPC template → hub-and-spoke+TGW → compute-to-data egress. Steps 1–2 also deliver the long-promised network foundation independently of this issue's routing (step 4). Implementation begins at the CIDR allocator.
feat(network): deterministic CIDR allocator (ADR 0001 step 1, ground#…
feat(network): single-VPC foundation stack (ADR 0001 step 2, ground#1…
scttfrdmn commentedon Jun 12, 2026
ADR 0001 step 2 shipped: single-VPC foundation (#25).
network.Stack.Template()now emits a private-only VPC (no IGW) on the deterministic hub /16, per-AZ /20 private subnets (region-portable viaFn::GetAZs), gateway endpoints for S3/DynamoDB + interface endpoints with an org-conditioned policy (allow same-orgaws:PrincipalOrgIDvs a deploy-timeOrgIdparam, deny external). Built as acfn.Templatelike the other four stacks (native CloudFormation; CDK stays an optional--output cdkexport). Template-as-data tested; surfaced in--dry-run.Build order remaining: step 3 (hub-and-spoke + segregated Transit Gateway route tables — the tier isolation) → step 4 (compute-to-data egress per
DataEndpoint— this issue's routing). Also pending: wiring the network stack into the live numbered deploy phases (dry-run only today).feat(network): hub-and-spoke + segregated Transit Gateway (ADR 0001 s…
scttfrdmn commentedon Jun 13, 2026
ADR 0001 step 3 shipped: hub-and-spoke + segregated Transit Gateway (#26).
Template()now builds a shared hub VPC (centralized endpoints), one private spoke VPC perorg.workload_oustier, and a TGW with segregated per-tier route tables — each spoke routes to the hub but not to sibling spokes, so tier isolation is a routing fact. TGW default association/propagation disabled so new attachments can't silently join a shared table. Single-VPC path (step 2) is the unchanged degrade. Tested incl. the no-cross-spoke-route invariant; verified via--dry-run.Remaining for this issue: step 4 — compute-to-data egress per
DataEndpoint(S3 gateway endpoint for dbGaP, PrivateLink/peering for AnVIL/Terra, never a public IGW). The topology it rides on now exists.feat(network): compute-to-data egress per DataEndpoint (ADR 0001 step…
scttfrdmn commentedon Jun 13, 2026
Fully implemented — ADR 0001 step 4 shipped (#27).
The compute-to-data egress lands: per
network.data_endpoints, the hub-and-spoke template renders a hub-side scoped egress path inferred from the URL — S3 host → S3 gateway endpoint (reusing the foundation one),com.amazonaws.*→ interface endpoint, public host → no route (declaration-only; never a public IGW for controlled data).The three-layer compute-to-data gate is complete: SCP (
data_endpoint_access_scp) + attest dataset-scoped Cedar (attest#100) + this network egress path. The network foundation (ADR 0001) is also fully built: CIDR allocator → single-VPC → hub-and-spoke+TGW → egress.One unrelated follow-up remains (tracked separately, not this issue): wiring the network stack into the live numbered deploy phases — it's
--dry-run-visible today. Closing ground#10 as done.feat(deploy): wire network stack into ground deploy; unify deploy pha…