Fix pending enrollment tokens surviving subtree revocation - #10
Open
elijahwander wants to merge 1 commit into
Open
elijahwander wants to merge 1 commit into
elijahwander wants to merge 1 commit into
Conversation
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.
Revoking a remote subtree currently leaves outstanding child enrollment tokens usable. Redeeming one creates a fresh active principal after revocation, and a child granted delegation can issue further tokens.
This change removes pending enrollments whose parents belong to the revoked subtree, using the existing durable state write. It also rejects redemption when a stored remote parent is revoked or expired, covering tokens retained by older versions. Local-parent enrollment remains supported. The shipped broker bundle is rebuilt.
Regression coverage checks cancellation throughout a subtree, persistence across reload, preservation of unrelated enrollment tokens, expiry-triggered cancellation, and legacy persisted tokens. All three new tests fail against the original implementation.
Validation on Node 26.8.2:
TMPDIR=/private/tmpfor macOS socket path lengths).The impact is continued authenticated broker access/delegation after revocation; this does not by itself restore messaging through a disconnected revoked ancestor.