Repository navigation
fix(authority): anchor delegated expiry to one issuance instant - #55
Merged
Merged
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.
Finite delegation issuance can fail with “the issued capability would outlive delegation” when revision/seal reads cross a Unix-second boundary. Authority computes a remaining duration before Core samples its mint clock, so Core adds that duration to a later time. Both module and external-client delegation paths are affected; the final expiry check correctly refuses the resulting overlong token.
This fix reuses the fenced root mint and uses one request-local issuance instant for its remaining lifetime and timestamps. Child derivation, verification, revision/seal reads and post-sign expiry/revocation/shortening checks remain live. The shared minter is never changed; indefinite delegation behavior is unchanged. README.md documents the calculation and refusal boundaries.
A deterministic clock advance inside the mint revision read reproduces the original failure with only100ms latency at a .950-second fraction. It covers module/client paths, default/short requested TTL, zero/100ms/1.5s latency and refusal when61s of latency exhausts the delegation. Original source:8 scenarios pass,8 fail; fixed:16 scenarios pass, no failures/skips. Full authority-core race suite:415 test/subtest passes,0fail/skip; vet and diff check pass. The local service’s required Core verifier conformance test also passes under race.
This is an owner fix, with no added expiry tolerance, weakened conformance, host-local calculation or retry loop. The request-local copy uses Core Authority.Now, which the owner already receives through Config.Clock; StartInput has no absolute expiry. Fresh independent review accepted these exact five files and passed the focused race matrix plus maintained expiry/revocation cases. The actual consumer Core v0.19.7 mint/verify files match the reviewed pseudo-version. Re-review the snapshot-clock assumption on any Core mint change; this is not a new Core deadline API. Hosted checks and the consuming Accounts conformance lanes remain delivery gates; no live/SQL/generator qualification is claimed here.