Stable app ingress and node rollouts for redeploys/scaling #408
Labels
No labels
Compat/Breaking
Component/Enclave-Builder
Component/Infrastructure
Deploy/BYOC
Deploy/Full-managed
Deploy/Self-hosted
Interface/API
Interface/CLI
Interface/Git
Interface/Web
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
Reviewed/Confirmed
Reviewed/Duplicate
Reviewed/Invalid
Reviewed/Won't Fix
Status/Abandoned
Status/Blocked
Status/Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
public/platform#408
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Executive summary
activeandcandidatePCR profiles; activate and retire profiles atomically, never mix PCR slots or use TOFU as rollout authorization.Problem
Redeploying an app can replace the underlying enclave/instance and change its public endpoint. That breaks DNS records, allowlists, webhook callbacks, and customer integrations that depend on a stable endpoint.
The product requirement is broader than preserving a single Elastic IP: Caution should model an application as having a stable public ingress and one or more backing nodes. Redeploys should add a new node behind that stable ingress, prove/prepare it, move traffic to it only after it is ready, and then drain/terminate the old node.
This also gives us the right foundation for future horizontal scaling: multiple healthy/reconstituted enclave nodes can sit behind the same application ingress instead of treating every redeploy as a single-instance replacement.
Desired behavior
Use an app-level load-balancing ingress, preferably an AWS ALB for managed AWS deployments, rather than making the public endpoint equal to a replaceable instance address.
High-level rollout model:
Rollout authorization and verified target state
A valid Nitro attestation alone is insufficient: it proves what is running, not that the node matches the intended deployment.
Before a candidate node receives secrets or traffic:
caution verify;During blue/green overlap, ingress and STEVE v2 clients may accept only complete PCR profiles for the current active identity and explicitly authorized candidate identities. Policy activation and retirement must be atomic: never mix PCR slots across versions, use TOFU as rollout authorization, or accept an arbitrary valid enclave. Retire the old profile only after the rollback window closes.
Failed or revoked rollouts must not alter the active identity policy or release application secrets to an unapproved candidate.
Suggested node statuses:
provisioning: cloud resources are being created.booting: host/enclave is starting.attesting: enclave evidence/metadata is being produced or checked.awaiting_secret: node is healthy enough to receive the app secret/quorum material but is not allowed to serve yet.warming: secret has been reconstituted and app health checks are passing, but traffic has not fully shifted.active: node is registered for traffic.draining: node is no longer receiving new traffic and is waiting for shutdown.terminated: node resources have been removed.failed: node rollout failed; the previous active node remains serving if one existed.Static endpoint / EIP implications
For DNS-based customers, an ALB gives the application a stable managed endpoint and supports blue/green registration/draining cleanly.
For customers that require a literal static IPv4 address or firewall allowlisting, ALB alone may not satisfy the requirement because ALBs expose DNS names rather than fixed EIPs. The implementation should explicitly choose one of these policies:
Do not silently promise a stable IP if the actual managed endpoint is only an ALB DNS name.
TLS / enclave ingress interaction
This issue should compose with the enclave-terminated TLS work:
active.UI / CLI expectations
The application detail view and CLI should show node-level rollout state, for example:
Users should be able to tell:
Scaling implications
The same node model can support scaling later:
desired_nodes/ min-max capacity can create multiple active nodes behind the same app ingress.Scaling does not have to ship in the first blue/green implementation, but the data model and UI naming should avoid assuming exactly one live instance forever.
Implementation notes
There is already some EIP-related machinery in the deployment path, including
eip_allocation_idTerraform output handling andassociate_eip_with_instance(...)insrc/api/src/deployment.rs. This issue should evolve that product/API/state behavior from “remember an instance IP” into “remember a stable app ingress and tracked backing nodes.”Likely platform state additions:
Acceptance criteria
activeuntil health, attestation, and secret reconstitution requirements pass.Non-goals / follow-ups