Repository navigation
Integrate MASQUE with Galactic Edge provider attachments #975
Description
Parent: #970
Deliverable
The MASQUE provider adapter that obtains and consumes authorized Edge attachments, with lifecycle and recovery owned by #992.
Dependencies
#972, #974; foundation #994, #995, #996 and the published #993 contract.
Galactic Edge integration (#992)
Implement this milestone as a consumer of the Galactic Edge provider contract. #992 owns provider authorization, host attachment lifecycle, shared-state fencing and maintenance, independently enforced forwarding expiry, prefix conflict arbitration/publication, and gVPC traffic policy. MASQUE owns client authentication, connector /96 assignment and retention, session packet checks, transport behavior and its provider adapter. Use the foundation's versioned contract and existing provider helpers; do not introduce a second host-networking controller, lease store or BGP publisher. Any required foundation change must be tracked and qualified under #992 before this milestone claims integrated acceptance.
Work
- Supply scoped provider registration, approval, authority-managed test grants, RBAC and pod-bound credentials; request the supported PacketAccess and PrefixReachability capabilities.
- Use
internal/edge/providernaming and lifecycle helpers for the pod instance and per-service attachment. Verify immutable resource identity on retry and restart. - Wait for admitted/programmed state, open only the packet device reported for this attachment, prepare the receive path and then report provider Ready. Accepted route/gate state remains a separate forwarding prerequisite.
- Adapt
connectip.PacketBackendto the foundation device and bind each session to its VPC, service, attachment, route and current authority. Preserve separate tenant contexts even when prefixes are identical. - Coordinate drain/release and cancellation with shared attachment users; close session I/O before releasing its authority. Observe core/node release and finalizers rather than deleting shared host state.
- Reconcile partial API operations, pod/process replacement and delayed cleanup through contract identities; foundation owns VRF/BPF programming and maintenance fences.
Acceptance criteria
- Integration tests run against fixed core artifacts with no MASQUE-specific core dispatch, shared-host programming or expanded core privileges.
- Unsupported versions/capabilities, forged pod identity, unauthorized service/VPC and unavailable packet devices fail closed before forwarding.
- Restart/retry/stale-delete tests preserve replacement and unrelated connector resources; maintenance during attachment preparation and use retains the attachment.
- Both transports can share an attachment safely, and cancelling one request does not remove another request's device, claim or packet stream.
- Document reproducible setup, readiness, drain and cleanup and resolve applicable Edge pod attachments: unchecked caller inputs and weak isolation tests #989 findings with evidence.
Scope follows #970: CONNECT-IP with HTTP/2 fallback; no public API development, plugin/portal integration, product-client development or production rollout.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
[-]MASQUE: implement host-managed gVPC attachment lifecycle[/-][+]Implement host-managed gVPC attachment lifecycle[/+][-]Implement host-managed gVPC attachment lifecycle[/-][+]Integrate MASQUE with Galactic Edge provider attachments[/+]privateip commentedon Oct 27, 2026
Verdict: valid. Main has no MASQUE provider adapter yet (checked at dbbc388).
What exists today:
internal/edge/connectipdefines theAdmission,LeaseandPacketBackendinterfaces and an HTTP/3 server. Its package docs say it is not a production admission authority or attachment controller.internal/edge/providerhas the instance, attachment and route naming and lifecycle helpers. No MASQUE code calls them.connectipserver or TUN backend is the interoperability harness intests/connectipinterop.tests/edgeconformance/masqueprovider. It reads static credentials and service UIDs from a config file. It shares one TUN backend per service across all of that service's sessions, and a gate on its instance lease is the only per-session check. It is not an adapter that production code can use.What is missing: an importable adapter that requests and checks the pod's instance and per-service attachments, opens only the device that the attachment's status names, sets Ready, counts each attachment's users so drain and cancellation are safe, and binds every session to its VPC, service, attachment, route and current authority. #980 (HTTP/3) and #981 (HTTP/2) would both use it.
privateip commentedon Oct 27, 2026
Plan (approved)
Root cause. Nothing in production implements
connectip.Admission,LeaseorPacketBackend. The only implementation is the #974 test fixture in #1140.Fix. Add a library package,
internal/edge/masque, that both transports (#980, #981) import.EdgeInstancewithprovider.CreateInstanceand hold its Lease throughclaim.Instanceoverprovider.InstanceStore. One renewal worker owns the Lease. No packet path or session lock is held during its API calls.provider.CreateAttachment, requestingv1alpha1,PacketAccess/v1andPrefixReachability/v1.Programmed, open onlystatus.packetDevice, then setReady.Drainingattachment fails closed withReady=False.provider.NewRoute/provider.Claim. A session opens only after core has accepted the claim for this attachment and Lease epoch. The adapter releases only the epoch it still holds.Authorizerinterface returns the trusted grant: connector, service name/UID, VPC UID, /96, routes and deadline. Implement admission, credential expiry and access revocation #977 supplies the real authority. Each session is bound to the full UID and epoch tuple. Every packet, in both directions, is checked against the Lease deadline, the grant deadline and attachment currency. Closing one session removes only its own registration.Tests
TestMASQUEgains rows for process restart, shared-attachment cancellation and stale delete, run in the lab against core images built from main.Docs. Setup, readiness, drain and cleanup, plus evidence for each #989 row that #975 owns (A01, A03, A09, A11, A15, C04, C07, C08).
Out of scope. Connector session generations and deadlines (#976), the credential authority (#977), the /96 ledger (#978), source and policy checks (#979), the runnable service (#980) and the HTTP/2 transport (#981). The adapter does not depend on the transport. Two concurrent sessions sharing one attachment cover the shared-attachment criterion.
Risk. This is new code with no deployed caller. Revert to roll back.
Delivery. Two stacked PRs on #1140: the adapter with its tests, then the fixture migration, lab rows and docs.
privateip commentedon Oct 27, 2026
The fix is up for review as a two-PR stack:
internal/edge/masque, the provider adapter. It has unit tests and an envtest that runs the adapter against core's attachment and route controllers, the RBAC that ships inconfig/and the admission policies.Change from the plan: a connector's second request is now refused at admission, before any preparation, while its first request is open. Replacing a connector's open request is #976's scope.
#1152 stays a draft until
task verify:masque-conformanceruns in the lab.