Skip to content

xds: add X.509-SVID leaf validation - #13191

Open
bcleenders wants to merge 2 commits into
grpc:masterfrom
bcleenders:bcleenders/spiffe-svid-leaf-validation
Open

bcleenders wants to merge 2 commits into
grpc:masterfrom
bcleenders:bcleenders/spiffe-svid-leaf-validation

Conversation

@bcleenders

Copy link
Copy Markdown
Contributor

The SPIFFE standard has a few requirements on leaf certificates, and
requires that clients verify these (source):

When authenticating a resource or caller, it is necessary to perform validation beyond what is covered by the X.509 standard. Namely, we must ensure that 1) the certificate is a leaf certificate, and 2) that the signing authority was authorized to issue it.

When validating an X.509 SVID for authentication purposes, the validator MUST ensure that the cA field in the basic constraints extension is set to false, and that keyCertSign and cRLSign are not set in the key usage extension. The validator MUST also ensure that the scheme of the SPIFFE ID is set to spiffe, and MUST ensure that the SPIFFE ID has a non-root path component. SVIDs containing more than one URI SAN MUST be rejected.

The grpc implementation did not yet check these constraints, so
suggesting to add them.

The SPIFFE standard has a few requirements on leaf certificates, and
requires that clients verify these. The spec is: https://github.com/spiffe/spiffe/blob/main/standards/X509-SVID.md#52-leaf-validation

> When authenticating a resource or caller, it is necessary to perform validation beyond what is covered by the X.509 standard. Namely, we must ensure that 1) the certificate is a leaf certificate, and 2) that the signing authority was authorized to issue it.
>
> When validating an X.509 SVID for authentication purposes, the validator MUST ensure that the cA field in the basic constraints extension is set to false, and that keyCertSign and cRLSign are not set in the key usage extension. The validator MUST also ensure that the scheme of the SPIFFE ID is set to spiffe, and MUST ensure that the SPIFFE ID has a non-root path component. SVIDs containing more than one URI SAN MUST be rejected.

The grpc implementation did not yet check these constraints, so
suggesting to add them.
…ntion

Mark only the first line of each command with the shell prompt, as the
rest of the file does, and write out one command per fixture instead of
a loop: the loop's output filenames did not match the committed fixtures
(spiffe_keycertsign_cert.pem etc.).
@bcleenders
bcleenders marked this pull request as ready for review November 17, 2026 08:57

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant