Repository navigation
docs(runbook, chart): the no-match query had the wrong metric name and the wrong node identity (#815) - #825
Merged
Merged
Conversation
…d the wrong node identity (#815) The query shipped with #822 returns a FALSE ZERO on a live cluster, twice over (caught during the rev225 validation by a Prometheus check from the platform side): - the family is `envoy_cluster_match_count_total` — Prometheus' OTLP ingest moves "total" to the end; `envoy_cluster_total_match_count` does not exist; - on a node agent the matcher's `on_no_match` identity is the AGENT'S OWN SVID (`spiffe://<td>/ns/aether-system/sa/aether-agent`), not `spiffe://<td>/node/<node>`, so the `/node/` selector matches nothing. Runbook: corrected query (by node and cluster), what healthy looks like (0 over a quiet window; during a pod ADD the increments sit entirely on that service's own cluster), and where to read the identity from (`served node SVID`). It also claimed a destination-side access-log cross-check that does not exist — the OTLP access log has no peer-identity field (#824); say so and name the weaker substitutes. Chart 0.92.29: the same two facts in the stats_tags comment (comment only). Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo
added a commit
that referenced
this pull request
Sep 19, 2026
…n the listeners (#826) Release three was planned as "drop aether.network.network_namespace from the listeners". Evaluated against the code and against Envoy 1.40.0-dev, it is a net loss, so this closes it as a decision rather than implementing it. Why it buys almost nothing. On a LISTENER the netns entry carries no per-pod state — its value is the constant format string %FILTER_STATE(envoy.network.network_namespace:PLAIN)%, byte-identical on every chain of every pod. The churn #815 was about lived entirely in the CLUSTER matcher, which release two (#822) already fixed. Deleting the entry saves one set_filter_state filter, ~240 bytes per mesh-originating filter chain (~0.5-1 KB per pod), plus one format-string evaluation per new downstream connection. Why it costs more than that: - Rollback, permanently. While the listeners stamp BOTH keys a proxy matches correctly against clusters from either side of release two, so a downgrade below 0.92.28 is hitless — which this issue needed once already (release one was rolled back on talos-main on 2026-09-19). Stamping only the SPIFFE ID would make 0.92.28 a permanent floor: a release-three listener facing a pre-release-two netns-keyed cluster matches nothing, takes on_no_match, and presents the agent's own SVID (spiffe://<td>/ns/aether-system/sa/aether-agent — not spiffe://<td>/node/<node>, see #825). - Another deploy that re-keys every per-pod filter chain, draining every mesh pod's chains a second time. - An access-log migration. accesslog.go's source_netns is the netns copy's only remaining reader. The Envoy facts, read from source at 13144fb (1.40.0-dev): the native object envoy.network.network_namespace does exist, is set in the ActiveTcpSocket constructor at accept time for any listener whose address carries a network_namespace_filepath (all per-pod listeners here do), is LifeSpan::Connection, and is PLAIN-formattable — so an HCM access log can read it directly and the aether copy is not needed for logging. It is StreamSharing::None, which is why the copy existed at all: only a shared_with_upstream copy could reach the cluster transport-socket matcher. The catch for a future migration is that the native object is the netns the LISTENER is bound in, so on the inbound listener it is the DESTINATION pod's netns; a field still called source_netns would be wrong and should be renamed. Recorded in the two places that carry the contract: the comment on sourceIdentityFilterStateKey and docs/runbook.md's version-ordering section. The chart NOTES.txt needs no change — it never promised a release three — so no chart version bump. If a later change is already re-keying these chains (#824's source-side peer-identity field is the obvious candidate), fold the removal into it then. Refs #815, #824. Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr Co-authored-by: Claude Opus 5 <[email protected]>
This was referenced Sep 20, 2026
Merged
bpalermo
added a commit
that referenced
this pull request
Sep 20, 2026
) (#850) proxy.DownstreamTransportSocket set RequireClientCertificate: true with a validation context carrying no SAN matchers at all, so the inbound handshake proved only trust-bundle membership — any certificate that bundle signs, including identities that are not workload SVIDs. The inbound HCM then stamps that certificate's URI SAN into XFCC with SANITIZE_SET (ingress.go), and RBAC/ext_authz decisions key on that value, so the property every XFCC-derived rule assumes was never actually established. The destination cannot pin a specific ServiceAccount — in a mesh any workload may legitimately call — but it can require the certificate to be STRUCTURALLY a workload SVID. Each mTLS inbound chain now carries a combined validation context with one match_typed_subject_alt_names entry: san_type URI, prefix "spiffe://<trust-domain>/ns/". Envoy builds StringSanMatcher(GEN_URI, matcher) for URI SANs (source/common/tls/cert_validator/san_matcher.cc), so the full StringMatcher surface applies; only DNS gets the RFC 6125 special case. The TCP floor gets the same pin and needs it most: it is the listener's DEFAULT chain and tcp_proxy forwards raw bytes to the application, so there is no XFCC and no HTTP-level authorization behind it at all. Empty trust domain emits NO matcher, never "spiffe:///ns/". A prefix built from an empty trust domain matches no certificate any CA in this mesh has issued, so it would fail every inbound handshake on that pod — #815/#819 with a node's blast radius. That branch is defence in depth rather than a live path: NewInboundListener already returns ErrNoTrustDomain first, so the reachable outcome is a skipped pod with a WARN naming it. No new counter for an unpinned inbound, deliberately, unlike #840's cluster_unpinned: that counter exists because the cluster path deliberately SHIPS the unpinned form as the lesser evil and did so silently. Here the lesser evil is refusing to build the listener, which is already loud. The gate is a build-time config-shape assertion instead — UnpinnedInboundChains over the generated bootstrap bytes — which also covers a future caller that bypasses the ErrNoTrustDomain guard, something a runtime counter could not. envoy --mode validate ACCEPTS an unpinned downstream context, the same fail-open direction #832 found upstream. Proved non-vacuous by forcing WorkloadSANPrefix to "": the assertion named every affected chain (inbound_test-pod/in_tcp_test-pod, /in_test-pod, /in_test-pod_8080) while all seven bootstraps still reported "configuration ... OK". The node identity satisfies the pin: the agent is an ordinary pod, so SPIRE's fallback ClusterSPIFFEID issues it spiffe://<td>/ns/aether-system/sa/aether-agent (#825). That matters because the inboundready_<pod> probe dials every local pod presenting it — a rejection there would demote endpoints, the rev222 failure mode. //test/envoy_validate's fixtures still spelled the node identity as spiffe://<td>/node/test-node, which the new pin would REJECT; they now use the production shape, and a proxy-package test asserts the probe's certificate satisfies the pin directly. Scope note: the prefix names the LOCAL trust domain, which makes it exactly as restrictive as the upstream pin already shipped (cache/mtls.go renders exact spiffe://<local-td>/ns/<ns>/sa/<svc> matchers). Cross-trust-domain traffic is therefore already impossible in the client direction, and proposal 019 states a shared trust domain as a precondition with SPIRE federation deferred. If federation is ever enabled both pins must widen together. This changes the inbound filter chains' bytes, so Envoy replaces and drains every mesh pod's inbound chains once on rollout (--drain-time-s, 10s here). Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr Co-authored-by: Claude Opus 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The query shipped with #822 returns a FALSE ZERO on a live cluster, twice over
(caught during the rev225 validation by a Prometheus check from the platform side):
envoy_cluster_match_count_total— Prometheus' OTLP ingest moves"total" to the end;
envoy_cluster_total_match_countdoes not exist;on_no_matchidentity is the AGENT'S OWN SVID(
spiffe://<td>/ns/aether-system/sa/aether-agent), notspiffe://<td>/node/<node>, so the/node/selector matches nothing.Runbook: corrected query (by node and cluster), what healthy looks like (0 over a
quiet window; during a pod ADD the increments sit entirely on that service's own
cluster), and where to read the identity from (
served node SVID). It also claimeda destination-side access-log cross-check that does not exist — the OTLP access log
has no peer-identity field (#824); say so and name the weaker substitutes.
Chart 0.92.29: the same two facts in the stats_tags comment (comment only).
No behaviour change. Refs #815, #824.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr