Skip to content

Fix pending enrollment tokens surviving subtree revocation - #10

Open
elijahwander wants to merge 1 commit into
dataforxyz:mainfrom
elijahwander:fix/revoke-pending-enrollments
Open

elijahwander wants to merge 1 commit into
dataforxyz:mainfrom
elijahwander:fix/revoke-pending-enrollments

Conversation

@elijahwander

Copy link
Copy Markdown

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:

  • Typecheck and build passed.
  • Full suite: 146 tests passed (TMPDIR=/private/tmp for 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.

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.

1 participant