Skip to content

Hotfix 1.26.7: accept a child delegation expiring at its parent's exact expiry (TC-3076) - #609

Merged
samgbafa merged 3 commits into
mainfrom
fix/tc-3076-child-expiry-precision
Nov 16, 2026
Merged

samgbafa merged 3 commits into
mainfrom
fix/tc-3076-child-expiry-precision

Conversation

@samgbafa

@samgbafa samgbafa commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Hotfix 1.26.7: a child delegation may expire at its parent's exact expiry again

Branched from v1.26.5. This is the fix plus the 1.26.7 version bump, and nothing else: no migration, no compose or workflow change.

Behaviour

Since 1.26.0, POST /delegate reads the parent's end in whole seconds when it checks a child's expiry. A child signed to expire at its parent's exact expiry, including the parent's milliseconds, is therefore refused with 401 "Child delegation expiry exceeds parent expiry". Up to 1.25.x the comparison used full precision. This change restores acceptance of a child that expires at its parent's exact expiry.

Fix

parent_end_for_child chooses the end a child is held to:

  • If the parent's effective end (whole seconds) is its own signed expiry's second, the child is held to the signed expiry at full precision.
  • Otherwise the effective end is used unchanged: a renewed (later) end, or a shorter end capped by an ancestor.

This changes the bound only in the first case, from the floored second to the exact signed instant, which is less than 1 s later. An ancestor can end inside that gap only for a renewed parent whose ancestor expires in the same second as the parent's signed expiry. The bound then exceeds that ancestor's exact expiry by less than 1 s, and use is still bounded at invocation time by the chain's whole-second end. A child 1 ms past its parent is still refused.

Not changed: invocation-time expiry checks still use whole seconds, so a session stops working at most one fraction of a second early.

Tests

  • a_child_may_expire_at_its_parents_millisecond_but_not_after: for a parent whose expiry has milliseconds, children at the same second (.000) and at the exact instant are accepted, and a child 1 ms later is refused with ExpiryExceedsParent.
  • the_parent_end_is_exact_only_where_it_is_the_signed_expiry: the helper returns the exact signed expiry only for its own second; renewed ends, ancestor caps and missing expiries keep the effective end.
  • The existing child_delegation_uses_renewed_parent_effective_expiry is unchanged and passes.

Locally, cargo test -p tinycloud-core --lib -- delegation renewal auth_graph (SQLite and PostgreSQL) gives 110 passed, 0 failed.

Release

Order:

  1. Review and CI run on this head (the hotfix commit).
  2. Tag v1.26.7 at the hotfix commit (this head) before anything reaches main. The tag push builds the images. Because the tag already exists, the post-merge release-plz run cannot create v1.26.7 on main's merge commit.
  3. Merge back into main with a merge commit, not a squash. Main conflicts with this branch in CHANGELOG.md, the crate version and both lock files, so the resolution goes in a merge commit on top of the tagged commit: the 1.26.7 changelog section above 1.26.6, and the crate at 1.26.7. The tag stays on the hotfix commit, which is then in main's history.
  4. Dispatch the deploy on the v1.26.7 tag. Its commit is in main's history, the crate version matches the tag, and it is a strict descendant of the running 1.26.5. Rollback to 1.26.5 is image-only because the migration sources are identical.

Details: TC-3076.

@samgbafa
samgbafa marked this pull request as ready for review November 16, 2026 01:15
@samgbafa
samgbafa merged commit d8d3d34 into main Nov 16, 2026
40 of 42 checks passed
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