Repository navigation
Add SPIFFE file bundle source - #6759
Merged
Merged
Conversation
jhrozek
requested review from
ChrisJBurns,
JAORMX,
amirejaz,
aponcedeleonch,
blkt,
jerm-dro,
rdimitrov,
reyortiz3 and
tgrunnagle
as code owners
October 7, 2026 14:43
2 of 10 tasks
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #6759 +/- ##
==========================================
- Coverage 79.51% 79.50% -0.01%
==========================================
Files 814 815 +1
Lines 82534 82737 +203
==========================================
+ Hits 65623 65777 +154
- Misses 16906 16955 +49
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
jhrozek
force-pushed
the
spiffe-v2-01-bundle-file-source
branch
from
October 7, 2026 19:06
351e5b5 to
38b57a1
Compare
jhrozek
force-pushed
the
spiffe-v2-01-bundle-file-source
branch
from
October 7, 2026 19:48
38b57a1 to
3ef4f21
Compare
jhrozek
force-pushed
the
spiffe-v2-01-bundle-file-source
branch
from
October 7, 2026 20:08
3ef4f21 to
c703e55
Compare
ChrisJBurns
reviewed
Oct 12, 2026
ChrisJBurns
left a comment
Collaborator
There was a problem hiding this comment.
Multi-agent consensus review
The file-bundle source is cohesive and well tested overall. One Kubernetes admission mismatch should be addressed: the CRD currently permits several ConfigMap keys that Kubernetes itself rejects.
| Finding | Consensus | Severity |
|---|---|---|
| Match Kubernetes' full ConfigMap-key validation | 9/10 | Low |
jhrozek
force-pushed
the
spiffe-v2-01-bundle-file-source
branch
from
October 13, 2026 08:53
c703e55 to
c9a00f2
Compare
The embedded auth server verifies SPIFFE X.509-SVIDs and JWT-SVIDs against a trust bundle that must stay current as SPIRE rotates its signing keys. The supported deployment topology keeps the auth server pod unidentified: SPIRE publishes its trust bundle to a Kubernetes ConfigMap (the SPIRE v1.15 k8s_configmap BundlePublisher plugin), and the auth server mounts that ConfigMap read-only rather than holding a Workload API socket, an SVID, or a private key of its own. Each attested client workload keeps its own separate Workload API socket for its own credential. Add the file bundle source: a RunConfig/CRD bundle_source of type "file" naming a mounted JWKS trust-bundle document, and a live loader that polls it every 30 seconds (polling rather than fsnotify, since a ConfigMap-mounted file updates via a kubelet symlink swap that inotify on the mounted path frequently misses). The operator projects the referenced ConfigMap key into a per-domain directory.
jhrozek
force-pushed
the
spiffe-v2-01-bundle-file-source
branch
from
October 13, 2026 09:49
c9a00f2 to
0e4e08b
Compare
ChrisJBurns
approved these changes
Oct 14, 2026
1 task
This was referenced Oct 21, 2026
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.
Summary
k8s_configmapBundlePublisherplugin) and the auth server mounts that ConfigMap read-only.filebundle source: abundle_sourceoftype: filenaming a mounted JWKS trust-bundle document, inRunConfigand in the CRD (configMapName/configMapKey). The operator projects the referenced ConfigMap key into a per-domain directory.pkg/authserver/spiffe_bundle_source.go). It polls the file every 30 seconds rather than usingfsnotify, because a ConfigMap-mounted file is updated through a kubelet symlink swap that inotify on the mounted path often misses. A failed reload is logged and the last good bundle is kept.bundle_endpointandworkload_apistay declared but have no loader.fileis the only source with a deployment story in this stack.Part of #6199. Related: #6201.
Type of change
Test plan
task test)task test-e2e)task lint-fix)Built and vetted this commit (
task build,go vetonpkg/authserverandcmd/thv-operator).task genandtask docsleave no diff. Loader and CRD validation tests are included in the diff and run in CI.API Compatibility
v1beta1API, OR theapi-break-allowedlabel is applied and the migration guidance is described above.The change is additive:
fileis added to thebundleSource.typeenum, with a new optionalfilefield and a CEL rule that it is set if and only iftypeisfile.Does this introduce a user-facing change?
No.
RunConfig.Validate()still rejects any non-emptyspiffe_trust_domains, so nothing can be deployed with this yet. It lands the config shape and the loader that later PRs wire in.Special notes for reviewers
🤖 Generated with Claude Code