Repository navigation
fix(helper): isolate truststore authority aliases - #492
Open
maxlambrecht wants to merge 2 commits into
Open
maxlambrecht wants to merge 2 commits into
maxlambrecht wants to merge 2 commits into
Conversation
maxlambrecht
force-pushed
the
fix/helper-truststore-aliases
branch
from
October 29, 2026 20:32
a780f40 to
61378b1
Compare
maxlambrecht
force-pushed
the
fix/helper-truststore-aliases
branch
from
November 6, 2026 15:29
61378b1 to
12cfa97
Compare
Member
Author
|
Hey @NopeCharon @cvas22! Would either of you be willing to take a look at this PR? Since you've both been contributing to the library recently, your feedback would be really valuable. Thanks! |
cvas22
reviewed
Nov 20, 2026
Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
maxlambrecht
force-pushed
the
fix/helper-truststore-aliases
branch
from
November 20, 2026 03:32
e1b4182 to
2de2b8e
Compare
Stage authority updates in a separate keystore and adopt it only after a successful write. Replace the complete bundle set with one flush, removing authorities for absent trust domains. Add JKS and PKCS12 regression tests for alias boundaries, failure paths, and preservation across later flushes. Document alias ownership and remaining file-write limitations. Signed-off-by: Max Lambrecht <maxlambrecht@gmail.com>
Member
Author
|
Thanks @cvas22! I addressed all three points. Updates now use a staged keystore and one write for the complete bundle set, removing absent domains. Added alias-boundary and failure-path tests for JKS and PKCS12, and documented the remaining write limitations. |
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.
What
Truststore updates now replace only aliases in the form
<trust-domain>.<numeric-index>, where the suffix consists entirely of ASCII digits.Deletions and replacement certificates are applied in memory, then flushed once per trust domain.
Why
Prefix matching treated
example.org.as a match forexample.org.uk.0, so updating one trust domain could delete another domain's authorities.The old implementation also flushed after deleting entries and again after each insertion, persisting intermediate states before the replacement bundle was fully stored. Batching these changes removes those intermediate flushes. File writes still happen in place; this change does not make file replacement atomic.
How tested
example.org.0while preservingexample.org.uk.0../gradlew :java-spiffe-helper:test: all 46 tests passed on JDK 25.