Repository navigation
Conversation
…g from DefaultX509Source stored a null SVID when the svidPicker returned null, and an exception from the picker escaped onUpdate and cancelled the watch. Both are now handled as a rejected update: the current SVID and bundles are kept, and newSource fails if it's the first update. Fixes spiffe#539 Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
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.
Fixes #539
setX509Contextstored whatever thesvidPickerreturned, so a picker that selects nothing left the source holding a null SVID andgetX509Svid()returned null. A picker that throws was worse: the exception escapedonUpdateinto the gRPC stream observer, the call got cancelled, and sinceCANCELLEDends the watch the source stopped getting rotations.Now
setX509Contextrejects an update with no selected SVID, and the watcher'sonUpdatesends any exception from applying an update toonErroras anX509ContextException, the same path a malformed update takes since #487. So the current SVID and bundles stay, the watch keeps running, andnewSourcefails if the first update is rejected. Documented that on thesvidPickeroption too.Tests cover a picker that returns null after init (update rejected, the next one applied) and on the first update (
newSourcefails). Changelog entry under Fixed.Notes
Ran the Build workflow on my fork: linux JDK 17/21/25 passed, the macOS jobs were still waiting for a runner, so CI here will cover those.