Skip to content

Transient cross-service mTLS identity mis-binding during concurrent proxy-restart + service roll (failed closed) #638

Closed as not planned

Description

@bpalermo

Found by the 2026-08-09 soak's TRIPLE window (rev 187 / 0.91.0) — a single-occurrence, fail-closed, security-adjacent correctness defect, distinct from #636.

Observation (access log, 05:05:10.846Z — 11s after the concurrent TRIPLE at 05:04:30Z)

The uds-client's request reached the correct uds-echo pod IP, but the TLS peer presented svc-3's workload identity:

  • response_flags=URX,UF, 406ms, upstream_cluster=aether-test/uds-echo, upstream_host=10.244.0.221:18008 (= uds-echo-85d6bd4877-wqbdf on worker-04)
  • response_code_details=upstream_reset_before_response_started{...CERTIFICATE_VERIFY_FAILED:verify_cert_failed:_SAN_matcher,_certificate_SANs_are_[spiffe://aether.internal/ns/aether-test/sa/svc-3]}

Pod-IP reuse was checked and ruled out by the soak runner: 10.244.0.221 is still held by uds-echo-wqbdf, and all four current svc-3 pods are on different IPs. The wrong-identity presentation is real, not an addressing stale-read.

Context

  • worker-04's proxy restarted at 05:04:59Z concurrently with the svc-3 roll (the TRIPLE: svc-3 + proxy + agent, all 05:04:30Z).
  • Inference (labelled, not established): while the fresh proxy epoch rebuilt its per-pod inbound filter chains / SDS identity map, an inbound connection destined for uds-echo's pod IP was served svc-3's SVID — a transient cross-service binding in the per-pod chain → SDS-cert association under concurrent restart + roll.
  • It failed closed: the client-side SAN matcher rejected the certificate; nothing was wrongly trusted. The exposure is availability-noise plus the demonstration that the node proxy can transiently present the wrong workload identity during concurrent churn.
  • Invisible to the prober SLI (single request, sub-threshold) — found only via access-log response_code_details. Counter-based "new series" hunting cannot see this class.

Why it matters despite failing closed

The mTLS design (per-pod app inbound + XFCC URI SAN) leans on the inbound chain presenting exactly its pod's identity. A window where chain→identity binding is wrong, even briefly and even rejected by peers, means: (a) legitimate cross-service requests fail with confusing TLS errors during churn; (b) the invariant "SAN presented == workload at that IP" is not absolute, which downstream authz reasoning (XFCC trust) should be able to assume unconditionally.

Next steps

  1. Recurrence grep across the rest of the 2026-08-09 soak's access logs (URX,UF + CERTIFICATE_VERIFY_FAILED + SAN mismatch) — a second occurrence upgrades this from one-off to pattern. (Queued for the teardown grade.)
  2. Attempt a reproduction: concurrent proxy hot-restart + service roll on a shared node, client hammering the non-rolled service; instrument the per-pod filter-chain/SDS rebuild ordering in the fresh epoch.
  3. Code inspection: the capture/inbound listener's per-pod chain construction and SDS secret naming during epoch handoff — is there any window where a chain can reference another pod's cert (map iteration, name collision, stale original_dst association)?

🤖 Filed mid-soak from the TRIPLE-check evidence; full trail in the 2026-08-09 soak record.

Activity

  1. bpalermo commented on Aug 9, 2026

    @bpalermo
    OwnerAuthor

    Correction and major widening (from the same soak, 06:25Z read): this was NOT a single request — it was a node-wide 4.25-second mTLS identity cross-wiring.

    The original "single occurrence" read was a query artifact (filtered to uds-echo AND 503). The full response_flags:"URX" sweep over 05:04–05:22Z shows:

    • 61 events, 05:05:10.381Z → 05:05:14.629Z (4.25s), all reported by main-worker-01's proxy
    • Source pods: k6-soak-loader 41, prober 19, uds-client 1
    • Intended destinations: echo 27, svc-2 15, svc-4 7, svc-1 7, svc-3 4, uds-echo 1 — endpoints spanning multiple nodes
    • Presented SAN was spiffe://aether.internal/ns/aether-test/sa/svc-3 in 57 of 61

    So during the concurrent TRIPLE (svc-3 + proxy-DS + agent rolls), for ~4 seconds, TLS connections from worker-01 toward many different services were met with svc-3's identity. All failed closed (SAN matcher). Corroborated independently in the counters: mesh_dns http_error +10 per target (+20 total) in exactly this window, matching the 19 prober events — the SLI did record the incident, but as mesh_dns http_error, not liveness.

    Observability note for future graders: two LogsQL forms return false zeros on this datasource (bare-word AND filters, | stats count()); only field syntax (response_flags:"URX") is reliable — control-test every negative.

    Impact reassessment:

    Repro focus accordingly shifts to: which proxy in the path presents the wrong cert during a DS-wide roll (destination-side chain/SDS mis-binding on a freshly-restarted node vs source-side pool cross-wiring), with the 4s window and 57/61-one-identity signature as the reproduction fingerprint.

  2. bpalermo commented on Sep 2, 2026

    @bpalermo
    OwnerAuthor

    Recurrence confirmed — 2026-09-02 soak (rev189/0.91.3-d22cf05), TRIPLE window

    Third consecutive occurrence. Same failure mode, different shape from 08-09.

    Measurements (VictoriaLogs, field syntax, control-tested against a known-hit window first):

    • 40 events, window 06:02:48.771Z → 06:03:03.512Z = 14.74s
    • linesReturned: 40 against limit: 100 — complete, not truncated
    • All 40 on main-worker-01, starting 39s after that node's new proxy pod (qwsfp, created 06:02:09Z) — i.e. post-proxy-restart identity warm-up
    • All 40 fail CLOSED (503) — no traffic was mis-delivered
    • All 40 present the identical wrong identity: certificate_SANs_are_[spiffe://aether.internal/ns/aether-test/sa/echo]
    • Spread across four distinct upstream clusters — svc-4 (12), svc-2 (11), svc-1 (9), svc-3 (8) — and many distinct upstream IPs, so it is broad cross-wiring rather than one bad endpoint

    Comparison with 08-09: that run saw 61 events in 4.25s, 57/61 presenting one identity. This is fewer events over a longer window (14.7s), same fail-closed behaviour, same single-node locality, same "one identity presented toward many services" fingerprint.

    New this time — a cheap detector. The signature is reliably found with:

    log_name:aether_access_logs AND upstream_transport_failure_reason:"CERTIFICATE_VERIFY_FAILED"
    

    count linesReturned against the query limit. Note the standing LogsQL trap on this cluster: stream syntax {log_name="..."}, bare-word AND "..." filters, and | stats count() all return false zeros — always use field syntax and control-test every negative.

    Correlation worth noting: this window's proxy had a 31.98s hot-restart handoff on worker-01 (vs 3.13–19.03s on the other four nodes), and worker-01 was at 101% CPU throughout the run. Whether the extended handoff and the identity warm-up window are the same phenomenon is untested, but the co-location is suggestive and cheap to check next time: compare aether_supervisor_handoff_duration_seconds against the event window per node.

    Caveat on this run: the soak was invalidated for SLI grading (Prometheus restarted 70×, four-hour counter gap), and was torn down early after agents began crash-looping (#662). The #638 evidence above is log-based and unaffected by that instability.

  3. bpalermo commented on Sep 2, 2026

    @bpalermo
    OwnerAuthor

    Design exploration (2026-09-02): the framing in this issue is wrong on two counts, and the likely mechanism is the inverse of what we assumed

    Correction 1 — it is NOT invisible to counters

    envoy_cluster_ssl_fail_verify_san_total exists, is exported (the stats matcher excludes only ssl.certificate.), and is non-zero right now on talos-main — verified independently at 23:20Z today:

    cluster node value
    aether-test/svc-4 main-worker-01 51
    aether-test/svc-3 main-worker-01 44
    aether-test/svc-2 main-worker-01 39
    aether-test/svc-1 main-worker-01 36

    The 09-02 episode contributed only 12/8/11/9 of those, and there are increments at ~03:20Z and ~04:40Z that fall inside the Prometheus gap. So this recurs several times per soak, not once per soak — and it has had an alertable signal the whole time that we never alerted on. increase(envoy_cluster_ssl_fail_verify_san_total[5m]) > 0 should page.

    Correction 2 — the 08-09 "pod-IP reuse ruled out" step does not hold

    That check compared current ownership of the upstream IP against current pods. It says nothing about who owned that IP at the timestamp of the event. Since kube-state-metrics is disabled cluster-wide, Prometheus cannot answer it retroactively either. That check was the linchpin of the "a wrong certificate was presented" reading, and it is unsound. Withdrawing it.

    The likely mechanism (H1, high confidence): stale endpoint + pod-IP recycling

    Not a cert-binding bug at all — the destination presented its own, correct identity, and the client was sent to the wrong pod. The SAN pin did exactly its job.

    1. A pod dies while its node's agent is rolling; the CNI DEL is lost; the registry keeps the endpoint (etcd Put with no lease/TTL — deregistration is 100% agent-driven).
    2. CNI IPAM recycles the IP to a new pod — during a roll, overwhelmingly a pod of the service being rolled.
    3. The dead pod's service now has a live foreign pod in its EDS set. Client dials it, gets that pod's genuine SVID, SAN matcher rejects.

    The smoking gun — the ghost sweep cannot ever clean this up. classifyPods builds live map[ip]*CNIPod and deregisterGhostEndpointsForService skips on if _, ok := live[ep.GetIp()]; ok { continue } — matching by IP alone, ignoring the service. Once the IP is recycled, the ghost is permanently un-reapable, so the one self-healing mechanism is disarmed for exactly the records that matter. registeredIPs has the mirror flaw: a stale record from any service makes an IP look registered, so the new pod may also be skipped for registration under its correct service.

    This explains what the SDS-race hypothesis could not:

    • "one identity toward many services" falls out for free — during a roll only one service is creating pods, so every freshly-recycled IP belongs to it. 08-09 presented svc-3 and svc-3 was the service in that TRIPLE.
    • the bounded 4.25s / 14.74s windows and the repeats match outlier detection, not a config race: consecutive_local_origin_failure: 3, base_ejection_time: 30s — a poisoned host produces ~3 failures per cluster, gets ejected, un-ejects 30s later, fails again. 40 events / 4 clusters ≈ 10 each ≈ 3 bad hosts × 3 failures.

    Envoy 1.39 independently rules out the destination-side hypothesis: hot-restart socket handoff is netns-correct on this version (it was NOT on ≤1.35, which would have fit the symptom exactly), the filter-chain factory cache is scoped per listener lineage, and in-place chain updates push before draining. The SDS provider map is shared but keyed by config name, so it can only collapse pods that already share an identity.

    The genuinely security-adjacent finding is elsewhere

    agent/internal/xds/proxy/transportsocket.go: when sanURIs is empty the cluster silently falls back to trust-domain-only validation with no matcher. sanURIs is empty when no endpoint carries KubernetesMetadata.Namespace. So a service whose endpoints lose k8s metadata degrades to "any workload in the trust domain" with no signal — and the misroute above would then be delivered instead of rejected. Nothing guards or alerts on it. That is the fail-open path worth fixing, not the SAN mismatch itself.

    Filed separately from this audit: #669 (the aether.io/spiffe-id annotation is an unvalidated identity override — any pod author can choose the identity their listener presents).

    Fix proposal

    • P0 — ghost sweep must match on (service, IP), not IP. Reuse the exact registration-path helper to derive the service (never a second derivation), keep the mass-delete breaker in the path.
    • P0 — enforce IP uniqueness at registration: on CNI ADD, deregister any endpoint on this node carrying the same IP under a different service. Pod IPs are node-scoped, so the node's own agent is authoritative.
    • P1 — the removal event omits Protocol, so Snapshot.Apply builds a serviceKey with PROTOCOL_UNSPECIFIED that matches nothing; removals therefore wait for the 5s sync Diff instead of propagating at watch latency. This widens every removal window.
    • P1 — close the sanURIs-empty fail-open path (refuse to emit the mTLS cluster, as the nodeSpiffeID == "" gate already does, or emit a loud metric).
    • P1 — carry pod UID on ServiceEndpoint so an endpoint can be cross-checked against the identity it will present.
    • P2 — alert on the SAN-failure counter.

    Reproduction — a failing unit test, no cluster needed

    In agent/internal/cni/server/ghostsweep_test.go: registry holds ns/sa-1 → 10.0.0.5 with no matching stored pod; live storage holds a pod of ns/sa-2 at 10.0.0.5; assert the sweep deregisters the ns/sa-1 ghost. Today it will not — live["10.0.0.5"] hits and the skip fires. Deterministic red test for the exact mechanism.

    Open question, and what tonight's soak will capture

    Why exclusively main-worker-01? Cluster membership is uniform across all five nodes today, and all five dial these clusters, yet only worker-01 has SAN failures. Candidates: it is the node whose proxy restarts into a cold un-ejected state each episode; load-generator density; or counter resets elsewhere. Not separable from code.

    A pod-IP ledger (NAMESPACE NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
    aether-debug debug-8wrzq 1/1 Running 0 4d4h 192.168.0.63 main-worker-04
    aether-debug debug-dxfps 1/1 Running 0 4d4h 192.168.0.60 main-worker-01
    aether-debug debug-gntgj 1/1 Running 0 4d4h 192.168.0.62 main-worker-03
    aether-debug debug-lpv22 1/1 Running 0 4d4h 192.168.0.61 main-worker-02
    aether-debug debug-pxmd6 1/1 Running 0 4d4h 192.168.0.64 main-worker-05
    aether-etcd etcd-567f5946bc-b8hnr 1/1 Running 0 4d5h 10.244.4.51 main-worker-02
    aether-ingress aether-edge-6d466b98f5-fjv5h 2/2 Running 1 (18h ago) 18h 10.244.0.219 main-worker-04
    aether-ingress aether-edge-6d466b98f5-hfcwf 2/2 Running 5 (18h ago) 18h 10.244.3.163 main-worker-01
    aether-system aether-agent-66gcs 1/1 Running 0 17h 192.168.0.64 main-worker-05
    aether-system aether-agent-d5sp4 1/1 Running 0 17h 192.168.0.60 main-worker-01
    aether-system aether-agent-ljclg 1/1 Running 2 (17h ago) 17h 192.168.0.63 main-worker-04
    aether-system aether-agent-ljqqb 1/1 Running 1 (17h ago) 17h 192.168.0.62 main-worker-03
    aether-system aether-agent-stj9r 1/1 Running 7 (17h ago) 17h 192.168.0.61 main-worker-02
    aether-system aether-controller-66cf5bfb89-kjzjj 1/1 Running 0 23h 10.244.2.195 main-worker-05
    aether-system aether-mesh-dns-9f68m 1/1 Running 0 19h 192.168.0.61 main-worker-02
    aether-system aether-mesh-dns-ccwc9 1/1 Running 0 19h 192.168.0.63 main-worker-04
    aether-system aether-mesh-dns-f4l7b 1/1 Running 0 19h 192.168.0.62 main-worker-03
    aether-system aether-mesh-dns-rc7j4 1/1 Running 0 19h 192.168.0.64 main-worker-05
    aether-system aether-mesh-dns-rh8rb 1/1 Running 0 19h 192.168.0.60 main-worker-01
    aether-system aether-proxy-8qhss 2/2 Running 0 17h 192.168.0.61 main-worker-02
    aether-system aether-proxy-kz4cq 2/2 Running 0 17h 192.168.0.62 main-worker-03
    aether-system aether-proxy-qwsfp 2/2 Running 0 17h 192.168.0.60 main-worker-01
    aether-system aether-proxy-r47kn 2/2 Running 0 17h 192.168.0.64 main-worker-05
    aether-system aether-proxy-wncbf 2/2 Running 0 17h 192.168.0.63 main-worker-04
    aether-system aether-registrar-5f6546798b-288qd 1/1 Running 0 23h 10.244.4.105 main-worker-02
    aether-system aether-registrar-5f6546798b-tfn9x 1/1 Running 0 23h 10.244.1.192 main-worker-03
    aether-test client-b965f8856-mkfsp 1/1 Running 0 4d3h 10.244.3.81 main-worker-01
    aether-test echo-78779ffdc5-5vmjv 1/1 Running 0 39m 10.244.1.204 main-worker-03
    aether-test echo-78779ffdc5-d68s5 1/1 Running 0 39m 10.244.0.225 main-worker-04
    aether-test echo-78779ffdc5-k88nf 1/1 Running 0 39m 10.244.2.233 main-worker-05
    aether-test prober-5bt7w 1/1 Running 0 4d3h 10.244.0.189 main-worker-04
    aether-test prober-5p56l 1/1 Running 0 4d3h 10.244.3.92 main-worker-01
    aether-test prober-gz7gf 1/1 Running 0 4d3h 10.244.2.164 main-worker-05
    aether-test prober-qqwvb 1/1 Running 0 4d3h 10.244.1.168 main-worker-03
    aether-test prober-sw777 1/1 Running 0 4d3h 10.244.4.37 main-worker-02
    aether-test rogue-66c5958499-7jq2k 1/1 Running 99 (23m ago) 4d3h 10.244.3.90 main-worker-01
    aether-test svc-1-7d86c44f7c-8xtx9 1/1 Running 0 18h 10.244.2.207 main-worker-05
    aether-test svc-1-7d86c44f7c-j6nkp 1/1 Running 0 18h 10.244.0.218 main-worker-04
    aether-test svc-1-7d86c44f7c-qct2q 1/1 Running 0 18h 10.244.1.199 main-worker-03
    aether-test svc-1-7d86c44f7c-twsp5 1/1 Running 0 18h 10.244.4.116 main-worker-02
    aether-test svc-2-7dc65c599b-5jd99 1/1 Running 0 17h 10.244.1.200 main-worker-03
    aether-test svc-2-7dc65c599b-7d677 1/1 Running 0 17h 10.244.3.165 main-worker-01
    aether-test svc-2-7dc65c599b-xnlvp 1/1 Running 0 17h 10.244.2.208 main-worker-05
    aether-test svc-2-7dc65c599b-zwccb 1/1 Running 0 17h 10.244.4.117 main-worker-02
    aether-test svc-3-5cf54649d6-f4xxm 1/1 Running 0 17h 10.244.3.166 main-worker-01
    aether-test svc-3-5cf54649d6-g6bqz 1/1 Running 0 17h 10.244.2.209 main-worker-05
    aether-test svc-3-5cf54649d6-n85hz 1/1 Running 0 17h 10.244.0.223 main-worker-04
    aether-test svc-3-5cf54649d6-xclx9 1/1 Running 0 17h 10.244.1.201 main-worker-03
    aether-test svc-4-574d5d6679-bnfdv 1/1 Running 0 18h 10.244.0.217 main-worker-04
    aether-test svc-4-574d5d6679-ch8sg 1/1 Running 0 18h 10.244.4.114 main-worker-02
    aether-test svc-4-574d5d6679-mhmnx 1/1 Running 0 18h 10.244.2.205 main-worker-05
    aether-test svc-4-574d5d6679-nmddt 1/1 Running 0 18h 10.244.3.160 main-worker-01
    aether-test svc-5-745b969c6c-b96zh 1/1 Running 0 18h 10.244.3.162 main-worker-01
    aether-test svc-5-745b969c6c-lz8hd 1/1 Running 0 18h 10.244.4.115 main-worker-02
    aether-test svc-5-745b969c6c-nv92j 1/1 Running 0 18h 10.244.1.198 main-worker-03
    aether-test svc-5-745b969c6c-nwhsv 1/1 Running 0 18h 10.244.2.206 main-worker-05
    aether-test svc-a-b88d74b7d-p5qq6 1/1 Running 0 4d3h 10.244.3.87 main-worker-01
    aether-test tcp-echo-777bcd9846-4cgcc 1/1 Running 0 4d3h 10.244.3.85 main-worker-01
    aether-test tcp-echo-777bcd9846-75hvw 1/1 Running 0 4d3h 10.244.3.94 main-worker-01
    aether-test tcp-echo-v2-779d47d96f-txbxs 1/1 Running 0 4d3h 10.244.3.93 main-worker-01
    aether-test tcp-echo-v2-779d47d96f-zhf8l 1/1 Running 0 4d3h 10.244.3.86 main-worker-01
    aether-test uds-client-5ccb89494-brqhs 1/1 Running 0 4d3h 10.244.3.88 main-worker-01
    aether-test uds-cr-echo-6d67c8f67c-2p9f9 1/1 Running 0 4d3h 10.244.4.35 main-worker-02
    aether-test uds-cr-echo-6d67c8f67c-rlx6t 1/1 Running 0 4d3h 10.244.1.165 main-worker-03
    aether-test uds-echo-589d8b68ff-cgmmv 1/1 Running 0 4d3h 10.244.2.160 main-worker-05
    aether-test uds-echo-589d8b68ff-kx67v 1/1 Running 0 4d3h 10.244.1.166 main-worker-03
    cert-manager cert-manager-5b9bb54955-kp9nc 1/1 Running 0 4d4h 10.244.3.210 main-worker-01
    cert-manager cert-manager-cainjector-6f77f7c987-p4gbd 1/1 Running 0 4d5h 10.244.2.124 main-worker-05
    cert-manager cert-manager-webhook-84bddc5645-hmjnh 1/1 Running 0 4d5h 10.244.1.99 main-worker-03
    cert-manager cert-manager-webhook-ns1-5bf7d65477-l8qjq 1/1 Running 0 4d5h 10.244.0.121 main-worker-04
    clj-grpc-soak grpc-jvm-6d4974497d-tq9fx 1/1 Running 0 3d5h 10.244.1.185 main-worker-03
    clj-grpc-soak grpc-native-776966d97f-j589x 1/1 Running 0 3d5h 10.244.4.53 main-worker-02
    clj-grpc-soak rest-7f75d67c6-6jgsv 1/1 Running 0 3d5h 10.244.0.200 main-worker-04
    default digprobe3 0/1 Completed 0 44d main-worker-02
    democratic-csi democratic-csi-nvmeof-controller-56748b5f45-88lkf 2/6 CrashLoopBackOff 5814 (3m47s ago) 4d5h 10.244.4.47 main-worker-02
    democratic-csi democratic-csi-nvmeof-node-2tqth 4/4 Running 21 (4d4h ago) 72d 192.168.0.63 main-worker-04
    democratic-csi democratic-csi-nvmeof-node-7dhmk 4/4 Running 23 (4d4h ago) 72d 192.168.0.62 main-worker-03
    democratic-csi democratic-csi-nvmeof-node-7l7rs 4/4 Running 150 (13h ago) 72d 192.168.0.60 main-worker-01
    democratic-csi democratic-csi-nvmeof-node-nfvtc 4/4 Running 21 (4d4h ago) 72d 192.168.0.61 main-worker-02
    democratic-csi democratic-csi-nvmeof-node-t497f 4/4 Running 24 (4d4h ago) 72d 192.168.0.64 main-worker-05
    envoy-gateway-system envoy-envoy-gateway-system-private-cd425702-5b4f9dc74-fndxd 0/2 Completed 2 (45d ago) 45d main-worker-05
    envoy-gateway-system envoy-envoy-gateway-system-private-cd425702-cbb49c445-7f4hp 2/2 Running 0 4d4h 10.244.3.60 main-worker-01
    envoy-gateway-system envoy-envoy-gateway-system-private-cd425702-cbb49c445-ql8v8 2/2 Running 0 4d4h 10.244.4.112 main-worker-02
    envoy-gateway-system envoy-envoy-gateway-system-public-5ea56ca9-849ddb5d5c-h2k9v 2/2 Running 0 4d4h 10.244.0.168 main-worker-04
    envoy-gateway-system envoy-envoy-gateway-system-public-5ea56ca9-849ddb5d5c-nmrst 2/2 Running 0 4d4h 10.244.1.148 main-worker-03
    envoy-gateway-system envoy-gateway-7b9b44d467-hsrbn 1/1 Running 0 4d5h 10.244.4.49 main-worker-02
    external-dns external-dns-66d6698c5b-zrt5s 1/1 Running 2 (4h38m ago) 4d4h 10.244.3.211 main-worker-01
    flux-system helm-controller-65f9c74964-r2bsz 1/1 Running 0 4d5h 10.244.2.128 main-worker-05
    flux-system kustomize-controller-85d9594c87-4dn4g 1/1 Running 0 3d5h 10.244.3.101 main-worker-01
    flux-system notification-controller-68b55d9799-wlsbd 1/1 Running 0 4d5h 10.244.0.120 main-worker-04
    flux-system source-controller-66b4685bfd-vbf57 1/1 Running 0 4d5h 10.244.1.98 main-worker-03
    k6-operator-system k6-operator-controller-manager-6f5c8c6cc6-tdckq 1/1 Running 0 4d5h 10.244.4.44 main-worker-02
    kube-system coredns-bcb8bc458-hg978 1/1 Running 0 4d4h 10.244.2.140 main-worker-05
    kube-system coredns-bcb8bc458-xdg8p 1/1 Running 0 4d4h 10.244.3.7 main-worker-01
    kube-system kube-apiserver-main-cp-01 1/1 Running 0 4d4h 192.168.0.50 main-cp-01
    kube-system kube-controller-manager-main-cp-01 1/1 Running 1 (4d4h ago) 4d4h 192.168.0.50 main-cp-01
    kube-system kube-flannel-dtl4w 1/1 Running 0 4d4h 192.168.0.64 main-worker-05
    kube-system kube-flannel-grt6m 1/1 Running 0 4d4h 192.168.0.61 main-worker-02
    kube-system kube-flannel-k2pz4 1/1 Running 0 18h 192.168.0.63 main-worker-04
    kube-system kube-flannel-nr6j9 1/1 Running 0 4d4h 192.168.0.60 main-worker-01
    kube-system kube-flannel-ws777 1/1 Running 0 4d4h 192.168.0.62 main-worker-03
    kube-system kube-flannel-x2kz6 1/1 Running 0 4d4h 192.168.0.50 main-cp-01
    kube-system kube-proxy-455xw 1/1 Running 0 4d4h 192.168.0.63 main-worker-04
    kube-system kube-proxy-52kfc 1/1 Running 0 4d4h 192.168.0.64 main-worker-05
    kube-system kube-proxy-9q6rq 1/1 Running 0 4d4h 192.168.0.61 main-worker-02
    kube-system kube-proxy-ssvbd 1/1 Running 0 4d4h 192.168.0.60 main-worker-01
    kube-system kube-proxy-stclp 1/1 Running 0 4d4h 192.168.0.62 main-worker-03
    kube-system kube-proxy-vdftj 1/1 Running 0 4d4h 192.168.0.50 main-cp-01
    kube-system kube-scheduler-main-cp-01 1/1 Running 1 (4d4h ago) 4d4h 192.168.0.50 main-cp-01
    kube-system metrics-server-6bf54bbd4d-wsrzr 1/1 Running 0 4d4h 10.244.3.8 main-worker-01
    kubelet-serving-cert-approver kubelet-serving-cert-approver-65f58956b5-wp8m9 1/1 Running 0 4d4h 10.244.3.11 main-worker-01
    metallb-system metallb-controller-7467f4d557-s9zp9 1/1 Running 0 4d5h 10.244.2.127 main-worker-05
    metallb-system metallb-speaker-6pf2b 4/4 Running 0 13h 192.168.0.64 main-worker-05
    metallb-system metallb-speaker-bmbl9 4/4 Running 0 13h 192.168.0.50 main-cp-01
    metallb-system metallb-speaker-f2fw4 4/4 Running 0 13h 192.168.0.61 main-worker-02
    metallb-system metallb-speaker-k9nsg 4/4 Running 0 13h 192.168.0.60 main-worker-01
    metallb-system metallb-speaker-tpwch 4/4 Running 0 13h 192.168.0.62 main-worker-03
    metallb-system metallb-speaker-z4wbh 4/4 Running 0 13h 192.168.0.63 main-worker-04
    o11y-profiler otel-ebpf-profiler-gfr6p 1/1 Running 0 3d3h 10.244.5.53 main-cp-01
    o11y-profiler otel-ebpf-profiler-k9vc8 1/1 Running 0 3d3h 10.244.1.190 main-worker-03
    o11y-profiler otel-ebpf-profiler-vgw4h 1/1 Running 0 3d3h 10.244.2.193 main-worker-05
    o11y-profiler otel-ebpf-profiler-w4jjk 1/1 Running 0 3d3h 10.244.0.204 main-worker-04
    o11y-profiler otel-ebpf-profiler-x925h 1/1 Running 1 (3d3h ago) 3d3h 10.244.4.102 main-worker-02
    o11y-profiler otel-ebpf-profiler-xwcn9 1/1 Running 0 3d3h 10.244.3.109 main-worker-01
    o11y alertmanager-github-receiver-d7d558978-jt899 1/1 Running 0 13h 10.244.3.183 main-worker-01
    o11y grafana-6b47c47cd5-zjv48 3/3 Running 0 11h 10.244.4.34 main-worker-02
    o11y grafana-mcp-756f8874cc-2wh4s 1/1 Running 0 43m 10.244.3.209 main-worker-01

  4. bpalermo commented on Sep 4, 2026

    @bpalermo
    OwnerAuthor

    2026-09-04 soak: RECURRED, and the pod-IP ledger settles it — real cert-binding defect, NOT stale-endpoint/IP recycling

    H1 (my hypothesis, and the leading one from the design exploration) is falsified. So is the slow-handoff precondition.

    The measurement

    371 ssl_fail_verify_san failures on main-worker-03 in a 4.42s window (06:01:42.104Z → 06:01:46.525Z), ~21s after that node's new proxy container started at 06:01:21Z — i.e. TRIPLE+60s. Counter read with max_over_time[6h] + a 60s-step range, not an instant query (that mistake produced a false "true zero" on 09-03 because a proxy roll ages the series out). Worker-03 had no series at all at 05:50–06:01 and 371 by 06:02 — a genuine in-generation burst, not a StatMerger carry-over.

    The ledger join — 100/100 unanimous

    Each event's upstream_host was joined against a pod-IP ledger sampling every 10s, at the sample nearest the event timestamp:

    presented SAN intended cluster IP actually owned by n verdict
    uds-echo echo echo 31 intended
    uds-echo svc-2 svc-2 18 intended
    uds-echo svc-4 svc-4 15 intended
    uds-echo svc-3 svc-3 10 intended
    uds-echo svc-1 svc-1 6 intended
    svc-3 svc-4 svc-4 11 intended
    svc-3 echo echo 4 intended
    svc-3 svc-1 svc-1 3 intended
    svc-3 svc-2 svc-2 2 intended

    Every one of the 17 distinct upstream IPs was, at that instant, a Running pod of the service it was intended to be. Not one belonged to a pod of the presented identity. Under H1 the opposite would hold by construction.

    Three independent corroborations:

    1. The two uds-echo pods (10.244.2.160, 10.244.1.166) are 5d10h old and absent from the event set entirely — there is no recycling path by which their IPs could have been reassigned.
    2. 10.244.0.225 (echo-…-d68s5) "presented" uds-echo at 06:01:42 and svc-3 at 06:01:46. One endpoint cannot be two identities in four seconds.
    3. The presented identity is a node-wide constant per time slice, not per-endpoint: uds-echo ×80 (06:01:42–45), then svc-3 ×20 (06:01:45–46). It tracks time on that proxy, not the peer.

    What that implies

    17 upstreams across 4 nodes cannot simultaneously present the same wrong certificate. The uniform-per-time-slice identity points at source-side cross-wiring on the restarting worker-03 proxy — the wrong SDS secret being selected for the egress transport socket during startup — with the SAN matcher then failing closed (503, URX,UF, upstream_reset_before_response_started).

    That mechanism is the same class #671 documented for the annotation path: SDS secrets are keyed by SPIFFE ID and pushSecrets places all of them into one node-wide snapshot, so selecting the wrong key yields another workload's SVID in the egress transport-socket match. #671 closed the annotation route into that state; this is a startup-race route into the same state, and it remains open.

    Two hypotheses now disproven

    Unexplained, and worth a look

    main-worker-05 shows 242 SAN failures earlier in the same run (visible ~01:20:00Z, series aged out at the 01:45:42Z proxy roll). Logs for that window were not pulled, so its mechanism and ledger verdict are not measured. If it matches, #638 is proxy-startup-generic rather than worker-03-specific.

    Caveat

    The log query truncated at 100 of 371 events. The verdict is unanimous across a contiguous 100-event sample spanning the full 4.42s window and both presented identities, but the remaining 271 were not enumerated. Also note | stats count() returned zero rows over a window that had just yielded 100 rows — the documented LogsQL false zero, reproduced again; field syntax only.

    Impact remains fail-closed: liveness rode through at 0.000% (0/23,390) and the 30 prober-side errors in that window (0.0625%) are the same burst seen from outside.

  5. bpalermo commented on Sep 4, 2026

    @bpalermo
    OwnerAuthor

    4th consecutive recurrence — and the first one that cost the SLI. Both leading hypotheses are now falsified.

    Soak 2026-09-04, rev191/0.91.3-cf68f1b, T0 01:00:42Z → 09:00:42Z. The run graded PASS overall, but this defect is no longer only visible in Envoy's counters.

    It reached the external prober

    • 371 ssl_fail_verify_san on main-worker-03, series first appearing 06:02:00Z — 78 seconds after the TRIPLE roll, on that node's freshly started proxy generation.
    • The w03 prober (prober-qqwvb) http_error stepped +21 at 06:03:00Z while all four other probers stayed flat across the same minute.

    That co-location in node and minute is the first direct evidence that this defect degrades user-visible availability. On 08-09, 09-02 and 09-03 it was contained to Envoy counters and every request failed closed with no measurable SLI impact. This time the closed failures were the SLI impact. It still failed closed — no traffic was served under a wrong identity — but "fails closed" stopped being equivalent to "harmless".

    Separately, w05 carried 242 events with an unbounded onset — the series may predate T0, so its start could not be established — plus 1 isolated event at 06:17Z.

    The slow-handoff precondition is FALSIFIED

    Every prior report anchored on worker-01's hot-restart handoff asymmetry (25.46s on 09-03 vs 3.40s elsewhere) as the suspected precondition. Measured this run:

    • w01's handoff asymmetry is gone: 4.5–6.3s, in line with the rest of the fleet.
    • The 28.02s outlier did move to w03 — but it was a pre-T0 handoff. w03's actual handoff at the TRIPLE, the one 78 seconds before the events began, was ~4.1s.

    So the defect fired on a node whose handoff was fast, in a run where the historically slow node was fast and produced almost nothing. Slow handoff is not the trigger.

    The node-load hypothesis is also dead

    From the same run's dedicated profiling pass: worker-01 is now the fleet's least CPU-loaded node (16.39% vs worker-02's 23.95%, 1.46× spread), and its proxy RSS is the fleet's lowest at 108.8–115.5 MiB. The node that historically dominated this defect is now the quietest one, and this run it produced no events at all — w01 also carried the fewest k6 errors of any node (9, against w02's 260 and w04's 279).

    What actually survives

    Stripping out what's been falsified, the invariant across all four recurrences is narrow and consistent:

    It fires on a freshly started proxy generation, within roughly 40–80 seconds of that proxy coming up, concentrated in a short window, and always fails closed. 08-09: 61 events / 4.25s. 09-02: 40 events / 14.7s, 39s after the new pod. 09-03: 3 events. 09-04: 371 events on w03 beginning 78s after the roll.

    That is a startup-window cert-binding defect on the source side — SDS secrets landing against the wrong cluster during the interval when the new proxy is populating its node-wide secret snapshot. It is not IP recycling, not handoff duration, and not node saturation; all three have now been tested and none held.

    The event count also grew by two orders of magnitude between 09-03 (3) and 09-04 (371) with no related change in the build, which suggests the window is sensitive to something about roll timing or concurrency rather than to a fixed code path cost.

    Next step

    The ledger join was not performed this run — so which identity was presented, and toward which upstream clusters, is unmeasured for 09-04. That join is the single highest-value next measurement: on 09-02 it showed all 40 events presenting the same wrong identity (spiffe://aether.internal/ns/aether-test/sa/echo) toward 4 distinct clusters, which is the fingerprint that points at snapshot population order. Confirming whether the 371 w03 events share one wrong identity or spread across many would discriminate between a single mis-keyed secret and a broader ordering bug.

    Given this now has SLI impact and a falsified precondition, this should move to the top of the queue.

  6. bpalermo commented on Sep 5, 2026

    @bpalermo
    OwnerAuthor

    5th consecutive recurrence — with the ledger join done while the logs were fresh

    Soak 2026-09-05, rev192/0.92.0-a3cde6c, at the CONCURRENT triple roll (agent + proxy + svc-3) at 06:05:51Z. Measurement plane was valid throughout (0 refused points on both collectors), so nothing here is a telemetry artifact.

    The events

    envoy_cluster_ssl_fail_verify_san_total born with the new proxy generation, flat afterwards: w05 = 70 (echo 37, svc-3 17, svc-1 6, svc-2 6, svc-4 4), w02 = 14 (echo 12, svc-1 1, svc-2 1). Pre-triple window since T0 (01:05Z → 06:00Z): zero.

    Access-log join, LogsQL field syntax log_name:aether_access_logs AND upstream_transport_failure_reason:"CERTIFICATE_VERIFY_FAILED", control-tested by dropping the reason field (normal 200s return): 24 request-level events, 06:07:04.115Z → 06:07:09.408Z, 5.29s total.

    node window identity PRESENTED by the proxy toward
    w05 06:07:04.115–06:07:06.151 (2.04s) spiffe://aether.internal/ns/aether-test/sa/svc-5 echo, svc-1, svc-2, svc-3, svc-4
    w02 06:07:08.796–06:07:09.408 (0.61s) spiffe://aether.internal/ns/aether-test/sa/svc-3 echo

    Every event failed closed: response_code=503, response_flags=URX,UF, upstream_reset_before_response_started{remote_connection_failure}. No request was served under a wrong identity.

    It reached the SLI, request for request

    The prober's http_error since T0 is 11 — w05 8 (3 authoritative + 5 forwarded), w02 3 (1 + 2). The 24 access-log events contain exactly those 11 prober requests (the other 13 are k6). So 100% of this run's prober http_error is this defect. That is now two consecutive soaks (09-04: 371 events on w03 → +21 prober errors) where #638 is no longer invisible to the authoritative SLI.

    Timing relative to the new proxy — this is the fingerprint

    • w05: pod start 06:06:47Z → first event 06:07:04.115Z = 17.1s after start, 12.2s after starting envoy, and BEFORE the pod was marked Ready at 06:07:11Z. The proxy was presenting a wrong client certificate toward five different upstreams while still in its readiness hold.
    • w02: pod start 06:06:21Z → first event 06:07:08.796Z = 47.8s after start, well after first Ready — but 0.6s after w02's readiness-marker flap began at 06:07:08.178Z. The supervisor briefly cleared and re-set the marker; the wrong-identity burst started inside that flap.

    Both nodes' events are inside the ~20s hot-restart handoff window of their own proxy (handoffs this triple: w01 19.50s, w02 18.09s, w03 20.97s, w04 18.87s, w05 19.27s — child-ready at a uniform 18.0–18.3s on all five, spread only in the parent drain).

    What this pins down, and what it rules out

    • Slow handoff is not the precondition (falsified on 09-04; reconfirmed — handoffs were uniform and w03, the slowest at 20.97s, had zero events).
    • Node load is not the precondition (w05 and w02 are hot nodes this run, but w04 is equally hot and clean; 09-04's hit was on w03, then the coolest).
    • demand-scoped TTL expires under continuous load and ODCDS re-discovery stalls ~5 min: 5-minute per-node outages on nodes with no local replica, invisible to soaks #682 (TTL expiry) is excluded: zero service left dependency set / expired observed upstreams on either node's agent log in the window.
    • It is source-side. The proxy on the node presented a co-located workload's identity as its own client cert toward upstreams. On w05 that identity was svc-5; on w02 it was svc-3 — and svc-3 was the deployment rolled concurrently in the triple, so its pods were being (re)registered and their SDS secrets pushed to the node-wide snapshot during the exact window the new proxy was populating its own. On 09-02 the presented identity was echo's (also a co-located workload). The wrong identity is always a real, co-located workload's SVID, never garbage.
    • It is tied to the proxy's startup/readiness state machine, not steady state: 17s-after-start-before-Ready on w05; inside a readiness-marker flap on w02. The readiness flap (the unfiled 09-03 w01/w05 finding) and this defect have now been observed 0.6s apart on the same node.

    Working hypothesis, now testable

    During proxy startup the per-source-pod outbound cluster/transport-socket → SDS secret binding is briefly wrong: an outbound cluster serving requests from pod A is handed the client-cert secret of co-located pod B for a window of a few seconds, until a subsequent snapshot push re-binds it. The 4.25s / 14.7s / 5.29s durations are the time-to-next-push, not a timeout. The readiness flap on w02 is consistent with the supervisor observing a not-LIVE-at-epoch moment right when that push landed.

    Two cheap discriminators for the next run:

    1. Log the SDS secret name each outbound cluster is bound to at snapshot-generation time on the agent, with the pod it is for, and grep the window — a mismatch line at 06:07:0x would be the direct proof.
    2. Correlate envoy_cluster_ssl_fail_verify_san_total first-sample with envoy_server_state/LIVE transitions and the marker set/clear timestamps per pod at 1s resolution (the supervisor already logs the marker transitions).

    Unreconciled: the Envoy counter (84) vs access-log events (24) — consistent with handshake retries per request, but the multiplier was not measured.

  7. bpalermo commented on Sep 5, 2026

    @bpalermo
    OwnerAuthor

    Profiling-pass addendum (07:33Z): where discriminator 1 should be implemented

    The CPU profile cannot see #638 (~24 events per 8h at a few seconds each is orders of magnitude below any sampling floor; searched supervisor and Envoy series for SdsApi/SecretManager/ContextManager/ClientContextConfig/updateSslContext — null at 0.254% and 0.35% cutoffs). Treat the profiler as a closed line of enquiry for this defect.

    But the agent profile shows the code path that re-binds identities on exactly the cadence the defect fires: cache.(*SnapshotCache).recomputeMTLSClustersLocked (agent/internal/xds/cache/mtls.go:73, 1.02% of agent CPU) called from refreshLoop.reload, with proxy.upstreamTransportSocketMatchesNamed (agent/internal/xds/proxy/transportsocket.go:62, 0.64%) beneath it. That is the function attaching a transport-socket-match name to each upstream cluster on every registry refresh. Discriminator 1 from the previous comment — log (source pod, cluster, bound secret name) at snapshot generation — belongs there, and the w02 event at 06:07:08.796Z (0.6s after a readiness flap, during svc-3's concurrent re-registration) is the timestamp to grep for.

  8. bpalermo commented on Sep 5, 2026

    @bpalermo
    OwnerAuthor

    8h soak 2026-09-05 (rev192/0.92.0-a3cde6c): 5th recurrence at the TRIPLE, then nothing for the remaining 2h40m across two more proxy rolls

    The ledger join for the 06:05:51Z TRIPLE episode is in the run record; the new information at grade time is the negative result afterwards, which narrows the precondition.

    Final counters for the window — max_over_time(envoy_cluster_ssl_fail_verify_san_total[8h]):

    node echo svc-1 svc-2 svc-3 svc-4 total
    main-worker-05 37 6 6 17 4 70
    main-worker-02 12 1 1 — — 14

    These are identical to the values recorded at the 06:22Z checkpoint, i.e. not one further SAN failure occurred between 06:23Z and 09:05:51Z — despite proxy rolls at 06:35:51Z and 08:05:51Z and a mesh-dns roll at 06:50:51Z. The instant query envoy_cluster_ssl_fail_verify_san_total at grade returns no series at all: the current (gen-7) proxies have never incremented it.

    The SLI agrees. sum(...{result="http_error"} @ 1788599151) - sum(... @ 1788589380) (06:23Z → 09:05:51Z) = 0. All 11 mesh_dns http_error of the entire run belong to the TRIPLE, and they join the 24 access-log events exactly (8 on w05, 3 on w02).

    Why this matters for the hypothesis. The 06:35:51Z and 08:05:51Z rolls were ordinary single-DaemonSet proxy rolls; the 06:05:51Z one was concurrent with an aether-agent roll and an svc-3 deployment roll. The two clean rolls also produced the readiness-marker flap that the w02 event was 0.6s behind — gen-7 flapped on w03 (08:22:16.819 → 08:22:17.446, 0.627s) and w05 (08:21:41.249 → 08:21:41.778, 0.529s) — and still no SAN failure. So the flap alone is not sufficient; it needs the concurrent identity churn. That is consistent with the "startup SDS binding briefly wrong, duration = time-to-next-push" hypothesis and against a pure-flap trigger.

    Also, from the profiling pass in the same run: #638 is not findable in a CPU profile (null in both supervisor and Envoy at 0.254%/0.35% cutoffs). The identity re-bind path does show up in the agent — recomputeMTLSClustersLocked (mtls.go:73) 1.02% and upstreamTransportSocketMatchesNamed (transportsocket.go:62) 0.64% — which is where discriminator-1's log line should go, but profiling as a detection route is a closed line of enquiry.

    Still failing closed (all 503 URX,UF), still no SLI-visible damage beyond the 11 requests.

  9. bpalermo commented on Sep 5, 2026

    @bpalermo
    OwnerAuthor

    Correction: the "presented identity" is the PEER's certificate — the defect is on the SERVER side of the handshake

    Every ledger join on this issue read upstream_transport_failure_reason … certificate_SANs_are_[spiffe://…/sa/X] as "the restarting proxy presented X as its client identity". That reading is wrong. In Envoy at the pinned commit (source/common/tls/cert_validator/default_validator.cc:329-335):

    if (!matchSubjectAltName(cert, stream_info, subject_alt_name_matchers)) {
      const std::string error_msg =
          fmt::format("verify cert failed: SAN matcher, certificate SANs are [{}]",
                      fmt::join(Utility::getCertificateSansForLogging(cert), ", "));

    cert here is the certificate being validated — i.e. the one the peer presented. envoy_cluster_ssl_fail_verify_san_total is a client-side counter about the server's certificate. So on 09-05, w05's proxy connected to five upstreams and each of those servers presented svc-5's SVID; on 09-02, every server w01 connected to presented echo's; on 09-04, every server w03 connected to presented uds-echo's, then svc-3's.

    What survives, what flips

    • Still true: it fires on the restarting node, within seconds of the new proxy's start, one identity per time slice, fails closed (the client refuses).
    • Flips: the mis-bound identity is a server certificate, so the suspect is the inbound filter chain → certificate binding of the proxy that served those connections. For same-node traffic the server IS the restarting proxy (the node proxy terminates inbound mTLS for its local pods), which is exactly the "node-wide constant per time slice" shape. The 09-04 analyst's "17 upstream IPs across 4 nodes cannot all present the same wrong cert" was the right observation with the wrong conclusion: it means the connections that failed were not served by four different proxies — either those endpoints were being served through the restarting node (hairpin / same-node path during startup) or the upstream_host in the access log is not the node that terminated TLS. The next join must record, per event, which node's proxy terminated the connection (upstream_host IP → pod → node, and whether that node is the restarting one).
    • feat(agent): log outbound identity bindings on change and flag foreign-identity binds (#638) #686's discriminator (outbound cluster bound to a foreign identity, secret vs source pod) watches the client side and structurally cannot fire for this. It stays useful as a negative (it proves the client binding is clean), but the instrumentation this issue needs is the inbound counterpart: at snapshot generation, log (inbound filter chain match → SDS server-cert secret → pod identity) on change, and WARN when a chain's server cert is not the identity of the pod the chain matches. The seam is agent/internal/xds/proxy/ingress.go (server cert taken from each CNIPod) plus whatever selects the chain during hot-restart startup (listener/filter-chain population order vs secret population order — a chain that exists before its own secret has landed may fall back to the default/first secret in the snapshot).

    Also note

    ssl_fail_verify_san counts on the CLIENT proxy. If the server were a remote node's proxy, the remote node would show nothing and the client node would show the counter — consistent with every observation so far, which is why this went unnoticed. The check that distinguishes same-node from remote termination is cheap: for each event, is upstream_host's pod scheduled on the restarting node?

    Next actions: (1) extend #686 with the inbound-chain discriminator; (2) re-run the ledger join on the next event with the terminating-node column; (3) then read the inbound chain/secret population order in the hot-restart startup path.

  10. bpalermo commented on Sep 5, 2026

    @bpalermo
    OwnerAuthor

    Inbound discriminator deployed (talos-main helm rev200, chart 0.92.5-7a19ebf, 21:37–21:40Z 2026-09-05) — and a false-zero found in BOTH discriminators

    #715 is live on all five nodes. Steady state after the roll:

    node inbound identity binding INFO lines chains latest binding secret_served=true foreign identity WARN secret absent WARN (transient)
    w01 80 40 40/40 0 40 (all self-cleared)
    w02 44 22 22/22 0 22
    w03 30 15 15/15 0 15
    w04 38 19 19/19 0 19
    w05 50 25 25/25 0 25

    Every chain's secret equals its pod_spiffe_id (0 violations); the absent-secret WARNs are exactly one per chain at agent start (chains built before the SPIRE bridge's first SetSecrets) and every one is followed by a secret_served=true binding. Roll hitless: liveness 0/4,499, restarts 0, rate continuity 127–128/s.

    False zero: aether_agent_identity_inbound_binding_mismatch_total returned no series — and so did #686's …outbound_binding_mismatch_total, deployed for days. The OTel SDK exports a counter only after its first Add; both are never incremented in the healthy case, so every "counter stayed 0" read so far was really "counter never exported". A grading increase(...[1h]) would have returned no data. Fix in #717 (seed both at zero at registration, test-pinned); deploying before tonight's soak. Until then the WARN lines are the discriminator, and they were 0 through this roll.

    Tonight's TRIPLE roll is the first #638 window with both sides instrumented: outbound (#686) and inbound (#715) WARNs + counters, and the runbook join for the terminating node.

  11. added a commit that references this issue on Sep 5, 2026
  12. bpalermo commented on Sep 5, 2026

    @bpalermo
    OwnerAuthor

    rev201 (chart 0.92.5-de3ec73, #717) deployed 21:51–21:54Z: both aether_agent_identity_{inbound,outbound}_binding_mismatch_total now exist — 5 agent series (label node=main-worker-0N, not k8s_node_name) plus 2 from aether-edge (same cache package), all at 0. Roll hitless (liveness 0/6,899, mesh_dns 0 errors incl. 0 timeouts, rate 126–128/s, restarts 0); inbound bindings unchanged (all chains secret == pod SPIFFE ID, 0 foreign WARNs). Tonight's soak (T0 01:00Z) grades #638 with increase(...[1h]) on both counters plus the WARN lines.

  13. bpalermo commented on Sep 6, 2026

    @bpalermo
    OwnerAuthor

    Soak 2026-09-06, rev203/0.92.5-0e73334 — #638 ZERO for the full 8h, and the coincidence test is NEGATIVE.

    check, window [00:54:20Z, 08:54:20Z] result
    max_over_time(sum by(node)(increase(envoy_cluster_ssl_fail_verify_san_total[5m]))[480m:1m]) no series = ZERO
    positive control, same family [7d:1h] w01 6.0 · w03 222.6 · w05 64.2 → metric materialises, zero is real
    TRIPLE 05:54:20Z ±10m (agent+proxy+svc-3 concurrent) ZERO
    aether_agent_identity_{inbound,outbound}_binding_mismatch_total (#717) 0 on 5 workers + 6 edge pods
    inbound chain bound to a foreign identity (#715) 0

    The designed experiment was whether the inbound chain references a secret absent from the snapshot WARN ever coincides with a verify-SAN failure. It does not. The WARN is frequent — it fires 1–2 s after every new pod, not just at agent start — but it binds a missing secret, never a wrong one. Verified end-to-end at the 08:24:21Z demand-set shrink: WARN 08:25:53.246Z on w02 (secret=spiffe://aether.internal/ns/aether-test/sa/svc-5) → inbound identity binding secret_served:true 08:26:01.24Z, with previous_secret == secret == the pod's own SPIFFE ID. Resolved in ~8 s, failed empty, no cross-wiring.

    No terminating-node join was possible or needed: no #638 event fired to join. 31 rolls incl. a concurrent TRIPLE produced zero — so the "startup SDS binding is briefly wrong" hypothesis is not supported by this run, and the WARN alone is not a sufficient precondition.

  14. bpalermo commented on Sep 6, 2026

    @bpalermo
    OwnerAuthor

    Roll coincidence test, 2026-09-06 profiling soak (rev203 / 0.92.5-0e73334) — NEGATIVE

    One deliberate rollout restart ds/aether-proxy at 11:17:02Z, under steady 728.5 rq/s load, with
    no churn driver running so nothing else was moving. All five nodes handed off sequentially and were
    Ready by 11:19:05Z (w05 26 s · w04 25 s · w01 23 s · w02 24 s · w03 25 s; 2 m 03 s end to end,
    one envoy_server_hot_restart_epoch step per node in that order).

    Every discriminator came back clean:

    check result
    envoy_cluster_ssl_fail_verify_san_total no series across the whole hour
    max_over_time(sum by(node)(increase(...[5m]))[20m:1m]) @ 11:22:00Z empty
    aether_agent_identity_inbound_binding_mismatch_total (#715) 0, 7 series (5 workers + 2 edge), flat 10:50→11:22Z
    aether_agent_identity_outbound_binding_mismatch_total 0, same
    agent ERROR lines, all 5 nodes, 11:16:00→11:21:29Z 0
    foreign identity, all 5 nodes, same window 0
    inbound chain references a secret absent from the snapshot, all 5 nodes 0
    prober non-success (every class, every prober) increase[8m] @ 11:23:00Z 0 in all 35 series

    The prober counters at 11:22:00Z are byte-identical to the pre-roll read at 11:16:00Z —
    liveness timeout 501→501 and connection_error 244→244, mesh_dns auth http_error 183368→183368
    and timeout 95360→95360, forwarded http_error 181108→181108 and timeout 98975→98975 — while
    8,998 liveness successes accrued in those six minutes (25.0/s), so the SLI was demonstrably alive.
    A completely free roll.

    Controls, because every zero here needs one. The envoy_cluster_ssl_* family is scraped —
    ssl_handshake_total, ssl_ciphers_*, ssl_curves_*, ssl_sigalgs_*, ssl_session_reused_total,
    27 series apiece — so the missing ssl_fail_verify_san_total is a real zero, not a scrape gap. And on
    w01's full 4 h 58 m agent log the WARN phrase is alive and frequent: 53× secret absent from the snapshot (all 53 of that pod's WARNs), 106× inbound identity, 0× foreign identity, 0 ERROR.
    So the in-window zeros above are true zeros.

    Caveat on how much this proves. A proxy roll replaces no application pods, and the secret-absent
    WARN fires 1–2 s after each new app pod — so this run gave the coincidence test nothing to fire on.
    This is the weak form of the test. The strong form remains the 8 h negative from the 09-06 soak, where
    18 svc rolls plus the TRIPLE produced the WARN clusters and still no #638 event. Treat today's result
    as "a bare proxy hot-restart, by itself, is not sufficient to produce #638" — which is consistent with
    the standing model that it needs concurrent proxy restart and service churn.

    Separately, and useful for anyone still hunting the mechanism in a profile: #715's discriminator is
    free.
    None of logInboundIdentityBindings, collectInboundBindings, collectPodInboundBindings,
    diffInboundBindings, servedSecretNames, downstreamCertSecretName, reportInboundMismatches,
    emitInboundBindingChanges or logInboundBindingSummary appears in a 15-minute agent CPU profile at
    max_node_depth=220 (top 220 of 823 nodes, cutoff 0.28 % of 36.00 core-s) — i.e. under 0.00011 fleet
    cores — while the 106 log lines above prove it is running on every snapshot version. Leaving it on
    permanently costs nothing.

  15. bpalermo commented on Sep 7, 2026

    @bpalermo
    OwnerAuthor

    Negative observation at the strongest predicted trigger: 2026-09-07 cold boot, SPIRE late — #638 did NOT fire

    The 2026-09-07 talos-main power failure produced the scenario this issue has been waiting for: a simultaneous cold boot of all 5 workers (15:50:48–15:50:51Z) with SPIRE genuinely late — spire-server-0 crash-looped twice on its aws_kms plugin and only came healthy at 16:00:35Z, after the agents had already started trying to bind identities. Every proxy came up fresh (envoy_server_hot_restart_epoch = 0 on 5/5), and all 39 managed pods were recreated inside 20 s at 16:03:39–16:03:59Z. That is a far harsher identity-churn window than any soak roll.

    Result: zero SAN verification failures.

    • envoy_cluster_ssl_fail_verify_san_total: no series at all in max_over_time(...[24h]).
    • aether_agent_identity_inbound_binding_mismatch_total and ..._outbound_...: present at 0 on 5 nodes + 2 aether-edge pods.
    • 0 foreign identity WARNs across all 5 agents since boot.
    • Prober: liveness 0 errors / 31,495, and dns_* zero on both mesh_dns targets. The only residual non-success was 69 http_error + 7 timeout per path, all incurred in the first ~60 s of the new prober generation while echo/svc pods were still coming up — flat across two reads 7 minutes apart (16:20:00Z and 16:27:00Z: 69/69/7/7 → 69/69/7/7).

    ⚠️ Measurement gotcha worth recording on this issue — the metric is envoy_cluster_ssl_fail_verify_san_total, not envoy_cluster_ssl_fail_verify_san. The bare name returns an empty result that reads exactly like a clean zero. Control test that makes the negative trustworthy: max_over_time(envoy_cluster_ssl_fail_verify_san_total[7d]) does return data (historic events, e.g. aether-test/echo 127 on w03, 80 on w05; aether-test/svc-4 94 on w03), while [24h] returns nothing — so the series demonstrably materialises when non-zero, and its absence over the post-boot window is a real zero rather than a wrong metric name.

    Combined with the 09-06 soak (zero across 8 h including the TRIPLE, coincidence test negative), a cold boot with a late SPIRE does not reproduce #638 either. The remaining common factor in every historical occurrence is still a concurrent proxy restart and service roll while the control plane is live — not identity scarcity at startup.

  16. bpalermo commented on Sep 7, 2026

    @bpalermo
    OwnerAuthor

    Closing until it resurfaces

    Since the inbound-side hypothesis (peer-cert SANs → server certificate → the terminating proxy's inbound chain binding) was posted on 2026-09-05, both sides have been instrumented and armed:

    and the record since then is zero events everywhere: the 2026-09-06 8h soak (31 rolls incl. TRIPLE, coincidence test negative), the 1h profiling pass with a fleet proxy roll, eight deploys (rev199–rev208), ten mesh-dns rolls ×2, and the 2026-09-07 power-failure cold boot (SPIRE up late = the strongest predicted trigger). Last real event: 2026-09-04 (371 on w03, +21 prober http_error).

    The instrumentation stays in place and the soak skill keeps the standing check (max_over_time(increase(envoy_cluster_ssl_fail_verify_san_total[…])) per node, join both WARNs and the counters in the same minute, then the runbook's terminating-node join). Reopen on the first non-zero read — the join will say whether it is the restarting proxy's own inbound chain or a remote one, which decides the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions