Repository navigation
Description
Split out of #831. Independent of the pooling question that issue raised (refuted,
PR #841) — this one stands on its own and is still open.
proxy.DownstreamTransportSocket (agent/internal/xds/proxy/transportsocket.go:35-49)
sets RequireClientCertificate: true with a validation context carrying no SAN
matchers at all — trust-bundle membership only. Every mesh workload in
aether.internal satisfies it, including certificates that are not workload SVIDs
at all.
The inbound listener then stamps XFCC SANITIZE_SET from that peer certificate
(ingress.go:231-235), so whatever URI SAN the peer presented is propagated to the
application and to any ext_authz/RBAC decision as though it had been meaningfully
verified. The destination has verified only "some cert this trust bundle signs".
The fix does not require knowing which ServiceAccount may call — any mesh workload
legitimately may. It requires the certificate to be structurally a workload
SVID: a match_typed_subject_alt_names entry with san_type: URI and a prefix
matcher on spiffe://<trust-domain>/ns/, which rejects a node SVID, an
infrastructure identity, or anything else whose SPIFFE path is not
/ns/<ns>/sa/<sa>.
That makes the XFCC value structurally trustworthy, which is the property every
XFCC-derived authorization rule currently assumes without basis.
Notes for whoever picks this up:
- The trust domain is late-bound (
agent/internal/identity). Before it is known
the prefix would renderspiffe:///ns/, which matches nothing and would fail
every inbound handshake — the feat(agent): stamp the source SPIFFE ID in filter state; HEALTHY requires an mTLS handshake with the pod's inbound listener (#815, release 1/3) #819 failure mode exactly. Follow what
cache/mtls.go:100-114already does on the upstream side: emit no matcher
rather than a sentinel one, and let the next recompute fill it in. - This changes the inbound filter chains' bytes, so it drains per-pod chains on
rollout (--drain-time-s, 10s here). Budget a deploy. - The node agent's own SVID is
spiffe://<td>/ns/aether-system/sa/aether-agent
(docs(runbook, chart): the no-match query had the wrong metric name and the wrong node identity (#815) #825) — it is under/ns/, so it still passes the prefix. If the intent is
also to keep the agent's identity out of app inbound, that is a different and
stricter rule; decide deliberately rather than by accident. //test/envoy_validateshould cover the new validation context, and
//test/mtlspoolalready has a working two-identity mTLS harness if a runtime
check is wanted.
Activity
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…
feat(038): per-pod HTTP/3 inbound on UDP:18008 — same identity, same …
feat(038): per-pod HTTP/3 inbound on UDP:18008 — same identity, same …