Skip to content

Qualify managed MASQUEEndpoint serving in the lab #1577

In progress

Description

@privateip

Summary

The MASQUE provider on main already serves managed endpoints, which the managed gateway endpoints design in datum-cloud/connect depends on:

  • MASQUEEndpoint registers a hostname, provider, revision and certificate on existing provider capacity.
  • The endpoint registry picks each hostname's certificate by SNI. It also refuses any CONNECT request whose authority and SNI don't match a valid entry, over both HTTP/3 and HTTP/2.
  • A grant is bound to one endpoint and one VPC by name (pkg/masquegrant). A single connection can carry several CONNECT-IP streams, each with its own grant and VPC.
  • Each replica reports the endpoint and certificate revisions it applied in status.instances[], after checking its EdgeInstance and Lease.

These were merged without an issue under #970. Unit and envtest suites cover them, but no lab run has shown them working together, and the latest release does not include them.

Gaps

  1. No lab test serves two endpoints on one listener with independent certificates, or one connection carrying streams to two VPCs under separate grants.
  2. No lab test rotates an endpoint's certificate or disables an endpoint and then checks the per-instance status and the effect on traffic.
  3. Instance status names an instance ei-<pod UID> (controller.go#L228). The design treats this as an implementation detail to settle before status can be said to hide internal UIDs.

Acceptance criteria

  • A lab test serves two MASQUEEndpoint hostnames on one listener. It passes only if each hostname presents its own certificate, and a grant for one hostname is refused on the other over both HTTP/3 and HTTP/2.
  • A lab test opens two CONNECT-IP streams to two VPCs over one connection. It passes only if each stream reaches only its own VPC, and revoking one grant ends only that grant's stream.
  • A lab test changes an endpoint's certificate revision and then disables the endpoint. It passes only if every serving instance reports the new revisions, existing streams drain on disable, and new requests for that hostname are refused.
  • With two provider instances serving one endpoint, status shows each instance's applied revisions separately, so one stale instance is visible (builds on test(edge): Prove public listener failover with two instances #1532).
  • Instance naming in status.instances[] is either changed so it no longer carries the pod UID, or documented as an accepted exposure in the provider docs.

Out of scope

  • Shipping these features in a tagged release and enabling them on a cell. Those follow from this issue.
  • Connect-side work: DNS, certificate issuance, distribution and readiness probes.

Related to #970, #985, #989, #1532, #1562, #1574

Activity

  1. added
    galactic-edge
    masque-connector
    on Dec 2, 2026
  2. added theissue type on Dec 2, 2026
  3. self-assigned this
    on Dec 2, 2026
  4. privateip commented on Dec 2, 2026

    @privateip
    ContributorAuthor

    Checked against main at ca094e7. The gaps hold, so this issue stays open as valid work.

    • Gaps 1 and 2: nothing under tests/ creates a MASQUEEndpoint. The TestMASQUEService and TestMASQUEPublicListener lab suites run one hostname with one certificate, and none of them rotates or disables an endpoint.
    • Gap 3 is wider than stated. controller.go#L228 reports instanceName as ei-<pod UID>. masque-service.md#L174 says "Status does not copy instance or pod UIDs", so the docs contradict the code.

    This is source inspection only. Nothing has been reproduced in the lab yet.

  5. privateip commented on Dec 2, 2026

    @privateip
    ContributorAuthor

    Plan for this issue. It changes tests and docs only, with no runtime change.

    Lab suite. Add TestMASQUEManagedEndpoints in tests/edgeconformance/masque_endpoints_test.go and a verify:masque-endpoints task. The suite runs the provider at 2 replicas with 2 MASQUEEndpoint hostnames on one listener, each with its own certificate. It covers the first four acceptance criteria:

    1. Each hostname presents its own certificate, and a grant for one hostname is refused on the other over HTTP/3 and HTTP/2.
    2. One connection carries 2 CONNECT-IP streams to 2 VPCs. Each stream reaches only its own VPC, and revoking one grant ends only that stream.
    3. A certificate revision bump, then a disable. Both instances report the new revisions, existing streams drain, and new requests for the hostname get 421.
    4. status.instances lists each instance's applied revisions separately, so a stale instance is visible.

    Instance naming. instanceName stays ei-<pod UID>. It is the EdgeInstance object name that readiness consumers use to find the instance and its Lease. docs/edge/masque-service.md will stop claiming that status hides pod UIDs and will record the name as an accepted exposure.

    Risk. No API or runtime behavior changes. The new suite reserves the shared lab like the other MASQUE suites.

    Verification. task ci, then verify:masque-endpoints and verify:masque-service on the lab.

  6. privateip commented on Dec 2, 2026

    @privateip
    ContributorAuthor

    The lab run forced three changes to the plan:

    1. The two-VPC case runs over HTTP/3 only. The probe's HTTP/2 client opens one request per connection, so it can't carry two streams. The first case still checks HTTP/3 and HTTP/2 for the cross-hostname refusal.
    2. Each provider instance gets its own connectors. A connector forwards through one instance at a time, so a shared connector makes the authority answer 503 while it moves the connector between instances.
    3. The lab overlay deploy/containerlab/resources/masque-service/tenant-bindings.yaml lacked the masque-provider-tenant bindings that docs/edge/masque-service.md step 4 requires. Without them the provider refuses every request with 503. The PR adds them, which also affects verify:masque-service on main.

    Results:

    • verify:masque-endpoints passed all 6 subtests.
    • verify:masque-service passed 20 of 21 rows. The diagnostics-walk row read the no_lease admission counter as 0, but the provider logged no_lease refusals during the same step. This PR doesn't change that row.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

galactic-edgemasque-connector

Type

Fields

Priority

Low

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions