Skip to content

Ensure consistent X.509 SVID and bundle reads in DefaultX509Source#397

Merged
maxlambrecht merged 2 commits intospiffe:mainfrom
maxlambrecht:fix/x509source-atomic-snapshot
Jan 22, 2026
Merged

Ensure consistent X.509 SVID and bundle reads in DefaultX509Source#397
maxlambrecht merged 2 commits intospiffe:mainfrom
maxlambrecht:fix/x509source-atomic-snapshot

Conversation

@maxlambrecht
Copy link
Member

Summary

This PR updates DefaultX509Source to publish the X.509 SVID and bundle set as a single immutable snapshot. This avoids transient inconsistent reads during Workload API updates while preserving existing behavior and avoiding additional locking on the read path.

The previous implementation synchronized only the update path while allowing unsynchronized reads, which could observe mismatched (SVID, bundle set) pairs. Publishing a snapshot via a volatile reference ensures atomic, consistent visibility across threads.

Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
@maxlambrecht maxlambrecht merged commit 8bf98fb into spiffe:main Jan 22, 2026
8 checks passed
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.

2 participants

Comments