Skip to content

Inbound validation context accepts any trust-domain member: pin a spiffe://<td>/ns/*/sa/* URI SAN prefix #843

Closed

Description

@bpalermo

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions