Skip to content

fix(agent): the unpinned-cluster report leaves out the plaintext UDP floor (#1393) - #1421

Merged
bpalermo merged 1 commit into
mainfrom
fix/1393-unpinned-warn-udp-floor
Oct 8, 2026
Merged

bpalermo merged 1 commit into
mainfrom
fix/1393-unpinned-warn-udp-floor

Conversation

@bpalermo

@bpalermo bpalermo commented Oct 8, 2026

Copy link
Copy Markdown
Owner

Closes #1393

What the issue saw

mesh clusters published with no server-identity SAN pin six times in 16 s on main-worker-04 during a svc-1 roll. Every one of those lines, and every other one stored, names a single cluster: udp:udp-echo.aether-test.aether.internal, with count=1 and reason="service endpoints carry no namespace metadata".

That cluster is the UDP floor. It is published with no transport socket (proxy.NewUDPServiceCluster), so it has no validation context a SAN pin could be missing from. reportUnpinnedClusters named it because it lists every cluster entry whose sanURIs is empty, and a UDP entry's is empty by construction (buildUDPClustersLocked sets no sanNamespaces).

Measured on talos-main (read-only)

  • VictoriaLogs, 2026-10-07 00:00Z to 2026-10-08 23:59Z, grouped by clusters, reason, count, trust_domain, service.version: four rows (one per agent build), all udp:udp-echo…, all five nodes, 4,907 lines. No line names any other cluster.
  • Soak window 02:06Z to 10:36Z: 2,629 lines, 517 to 535 per node. increase(aether_agent_identity_cluster_unpinned_total) over the same window is 97 to 98 % of increase(aether_agent_snapshot_builds_total) per node agent: the line is emitted on nearly every snapshot, and the bursts at a service roll are the snapshots that roll causes.
  • Live config_dump?resource=dynamic_active_clusters on all five node proxies: 64 to 69 clusters with an upstream TLS context per node, 0 without match_typed_subject_alt_names. The udp: cluster is STATIC with no transport_socket.

The change

A cluster entry records plaintext (set only for the UDP floor entry), and the report skips such entries. entryDiff compares the new field so the #1115 reuse audit covers it. No TLS emission path reads a UDP entry's sanURIs (the TCP floor reads tcp:-keyed entries only, the QUIC twins read HTTP entries), so nothing that can be unpinned leaves the report.

The build-time gate was already right: UnpinnedMeshClusters in //agent/test/envoy_validate checks a cluster only when it has an upstream TLS context, and the UDP bootstrap there passes it. This brings the runtime report in line with that gate, so there is no new envoy_validate assertion to see red.

That the UDP floor is unauthenticated plaintext is unchanged and is documented where the cluster is built and in proposal 038; it is a property of the protocol, not a per-snapshot event.

Tests

TestUnpinnedClusterReportSkipsThePlaintextUDPFloor, seen red first (the WARN fired with a UDP-only registry; then count was 2 instead of 1 next to a TLS cluster with no pin). It also asserts the report still names a TLS cluster that loses its pin when a UDP entry sits beside it.

  • bazel test //agent/internal/xds/cache:cache_test and the same under --config=race
  • bazel test //agent/test/envoy_validate/...
  • bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //...
  • make format-check

An agent wrote this pull request.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

…floor (#1393)

reportUnpinnedClusters named every cluster entry with an empty SAN pin. A
UDP floor entry has one by construction: its udp:<svc> cluster is published
with no transport socket, so there is no validation context to pin. The
report therefore fired on every snapshot of every node with a UDP service in
scope (2,629 lines in the 2026-10-08 soak, all naming only
udp:udp-echo.aether-test.aether.internal), and the counter that is meant to
show an authentication downgrade never rested at zero.

A cluster entry now records that its cluster is plaintext, and the report
skips it. The build-time gate (envoy_validate's UnpinnedMeshClusters) already
treated a cluster with no TLS context as out of scope; the runtime report now
agrees with it.

Closes #1393

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
Copilot AI balanced review requested due to automatic review settings October 8, 2026 13:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused fix correctly distinguishes transport-socket-free UDP clusters while retaining coverage for genuinely unpinned TLS clusters.

0 open findings

What changed in this PR

Aligns runtime unpinned-cluster reporting with TLS validation by excluding the plaintext UDP floor.

Changes:

  • Marks UDP floor entries as plaintext and excludes them from SAN-pin warnings.
  • Preserves registry-reuse auditing for the new field.
  • Adds regression coverage and operator documentation.
File Description
agent/​internal/​xds/​cache/​cache.go Adds plaintext metadata to cluster entries.
agent/​internal/​xds/​cache/​cluster.go Marks UDP floor entries as plaintext.
agent/​internal/​xds/​cache/​mtls.go Excludes plaintext entries from unpinned reports.
agent/​internal/​xds/​cache/​registryreuse.go Audits plaintext metadata during reuse.
agent/​internal/​xds/​cache/​trustdomain_test.go Tests UDP exclusion and TLS reporting.
docs/​runbook.md Documents historical UDP false positives.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

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.

agent: "mesh clusters published with no server-identity SAN pin" logged six times in 16 s during a service roll

2 participants