Repository navigation
feat(agent): retire the pre-#842 aether.source.spiffe_id filter-state key (#1165) - #1180
Merged
Merged
Conversation
… key (#1165) Every mesh-originating chain stamped the source SPIFFE ID twice: under envoy.tls.certificate_mappers.on_demand_secret (hashable, what the #842 certificate mapper and the pool hash read) and under the old aether.source.spiffe_id, kept for one release so a rollback to a pre-#842 cluster stayed hitless. That window closed with 0.93.0 (2026-09-20). - BuildSourceFilterStates now emits netns + the cert-mapper key only. - The access log's source_spiffe_id attribute (HTTP and L4) reads the cert-mapper key; the attribute NAME is unchanged, so VictoriaLogs queries, alert rules and the collector transform keep working as-is. - The proposal 038 QUIC selection matcher's FilterStateInput reads the cert-mapper key, so the arm and the presented certificate come from one value. - envoy_validate: ListenersNamingRetiredSourceKey asserts no listener in any fixture names the retired key (stamp, log or matcher); seen red on 7 fixtures with one stamp left in place, plus an anti-vacuity test through Any. - runbook: new "Rollback floor: chart 0.93.0" upgrade note; #815/#842/QUIC sections and proposal 038 updated. Rolling back to a chart < 0.93.0 is no longer hitless after this ships. Fixes #1165 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
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.
What
Stops stamping the pre-#842 source-identity filter-state key
aether.source.spiffe_idon every mesh-originating chain (outbound HTTP, capture HCM, TCP floor / per-port / TCPRoute / TLSRoute / blackhole chains). The only identity stamp is nowenvoy.tls.certificate_mappers.on_demand_secret, the hashable key the #842 certificate mapper and the upstream pool hash already read. The netns key stays, becausesource_netnsstill reads it.The old key had two readers in the agent. Both now read the current key:
source_spiffe_id(HTTPaether_access_logsand L4aether_l4_access_logs): it now reads%FILTER_STATE(envoy.tls.certificate_mappers.on_demand_secret:PLAIN)%. The attribute name is unchanged, which follows the plan written intonetworkfilter.goin Make the source-identity filter state Hashable so the mesh can drop connection_pool_per_downstream_connection #842 ("the attribute NAME stays"). There was never a second, current-key attribute to keep, so the one that existed was repointed.HashableStringis aRouter::StringAccessorImplsubclass (set_filter_state/filter_config.cc), so:PLAINrenders it.ApplyQUICClusterSelection): it had a singleFilterStateInputon the old key. That input now reads the current key. As a side benefit, the arm a request takes and the client certificate it presents now come from one value.Why
#842 (chart
0.93.0, 2026-09-20) kept the old key for one release, only so that a rollback to a pre-#842 cluster (whosetransport_socket_matcherread it) stayed hitless. That window has passed. Maintainer decision 2026-10-04: retire it.Red, then green
test/envoy_validategainsListenersNamingRetiredSourceKey. It searches each listener's whole protojson rendering for the retired name, so the stamp, the access-log reader and the matcher input are all covered by one check, along with any reader added later.TestEnvoyValidateruns it on every fixture and fails if no listeners were decoded.aether.source.spiffe_idstamp left inBuildSourceFilterStates, the check failed on 7 fixtures (node_bootstrap,node_cleartext_bootstrap,node_uds_bootstrap,capture_bootstrap,capture_tcproute_bootstrap,capture_tlsroute_bootstrap,quic_outbound_bootstrap). Each failure named the offending listener (outbound_http_test-pod,capture_test-pod,quic_out_source_a).TestListenersNamingRetiredSourceKeySeesThroughAnyhand-builds one listener that carries the key oneAnydeep and one clean listener. It asserts that only the first is reported.Proxy unit tests now pin the two-entry shape and the absence of the retired key. The matcher input key is asserted directly in
TestApplyQUICClusterSelection.Consumer audit (outside Go)
docs/runbook.md: #815 version-ordering sectiondocs/runbook.md: new "Rollback floor: chart0.93.0(issue #1165)"docs/runbook.md: east-west QUIC "What to expect"docs/runbook.md: #815 cluster re-warm sectiondocs/runbook.md: #842 replacement-signal item 2 and the #842 Rollback sectiondocs/proposals/038_udp-tproxy-capture.md§Selectiondocs/proposals/014_*docs/configuration.mde2e/soak/README.md(LogsQLextract_regexp ... from source_spiffe_id)e2e/*.sh, k6 scripts,charts/GitOps (
k8s-talos-main, grepped read-only): there are no Grafana dashboard JSON references to either name.source_spiffe_id(the attribute name, not the key) appears inclusters/talos-main/otel-collector/values.yaml(the transform conditionattributes["source_spiffe_id"] == "-"and comments) and inclusters/talos-main/prometheus/{values,rules_test}.yaml(alert descriptions usingsource_spiffe_id:="-"). Because the attribute name and its value are unchanged, nothing there needs editing.Rollback note (data-plane change)
After this ships, rolling back to a chart older than
0.93.0(the chart that shipped #842 on 2026-09-20) is no longer hitless. A node proxy running the new listeners that is handed pre-0.93.0clusters matches nothing and falls toon_no_match, which is the agent's own SVID (#825). Pod egress then presents the wrong identity until the old listeners land. In practice use0.93.1as the floor, since0.93.0carried the SDS-dedup stall that #865 fixed. To go lower, step through a0.93.x/0.94.xchart first. The details are indocs/runbook.md, "Rollback floor: chart0.93.0".Rolling forward re-keys every mesh-originating filter chain (one fewer
set_filter_stateentry) and every QUIC-selecting route, so those chains drain once on--drain-time-s.charts/is untouched, so the chart version is not bumped.Tests
bazel test --config=race //agent/internal/xds/... //test/envoy_validate/... //test/mtlspool/...: all 10 targets pass. That includes//test/mtlspool, whosequic_odcds_testdrives the QUIC selection matcher at runtime withBuildSourceFilterStates.bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //...: clean.make format-check: clean.make gazelle: run.Fixes #1165
🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr