Repository navigation
Description
When the agent's trust domain is empty, a mesh cluster is published with no server-identity pin at all. The handshake then proves only trust-domain membership — any workload in aether.internal satisfies it. Nothing asserts the window, counts it, or logs it.
This is a silent authentication downgrade whose only trace today is a code comment.
The path
agent/internal/xds/cache/mtls.go:107-113 — when st.trustDomain == "", sanURIs stays nil.
agent/internal/xds/proxy/transportsocket.go:117-121 — the len(sanURIs) == 0 branch emits a plain ValidationContextSdsSecretConfig with no match_typed_subject_alt_names.
The comment at mtls.go:103-106 acknowledges this as the deliberate lesser evil versus emitting spiffe:///ns/… with an empty trust domain — which is the exact failure that took down rev222 (#815/#819: SDS names nobody serves, endpoints demoted permanently, no alert). Choosing the unpinned form over the unservable one is right. Shipping it silently is not.
The bound is "one snapshot", but nothing enforces or observes that bound, so a window that lasts longer than intended looks identical to one that does not happen at all.
Why it matters beyond the window
Combined with any path that puts a foreign endpoint in a cluster's load assignment, an unpinned cluster turns a would-be rejection into a clean handshake and a delivered request, with nothing logged or counted anywhere. That is the fail-open direction; the pin is what makes these failures loud. See #829, where the pin is what caught the problem.
Fix
- At
mtls.go:107-113, whenst.trustDomain == "", emit a WARN once per snapshot naming the affected clusters, and incrementaether.agent.identity.cluster_unpinned. Seed the counter at zero — an unseeded zero reads as a false zero, which this repo has been bitten by before. - Extend
trustdomain_test.go, which already covers the empty-trust-domain path, to assert the counter and the WARN rather than only the absence ofspiffe:///. test/envoy_validatecan cover the config-shape half: assert every mesh cluster's upstream TLS context carries a non-emptymatch_typed_subject_alt_names. That is a genuine gate and worth adding — unlike the semantic checks in Back-to-back proxy rolls make pods serve another workload's SVID (three nodes, 65s, silent) #829, this one has a config expression.
Found while investigating #829. Not its cause.
Activity
fix(agent): give the readiness probe its own TLS context, and make an…
fix(agent): pin a workload-shaped client SAN on the inbound socket (#843
fix(agent): gate the TCP capture chains on node identity (#877)
feat(agent): per-port TCP data path — capture chains, clusters and in…