fix: measure storage-first grant lifetime from now - #59
Merged
Merged
Conversation
AWS STS Expiration is 1h from AssumeRole completion, while issued_at was stamped before the call. Honest 1h sessions then failed the signed span check by a few seconds. Cap remaining validity at accept instead of expires_at minus issued_at. Keep issued_at as an independent stamp. Do not derive it from Expiration.
mellowcroc
force-pushed
the
fix/storage-first-grant-remaining-time
branch
from
September 18, 2026 08:43
fbaf84e to
bcb35f4
Compare
CI still expected Validate() to reject a 1h+1s AWS overshoot. Accept that span at remaining-time checks and reject 12h remaining instead. Record the change in release notes.
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.
Summary
Storage-first upload grants cap remaining lifetime at accept (
expires_atvs now), notexpires_at − issued_at.AWS STS
Expirationis one hour from AssumeRole completion. Relay used to stampissued_atbefore that call, so an honest 1h session failed the signed span check by a few seconds (storage-first upload credentials may last at most 1h0m0s).issued_atstays an independent stamp. It is not computed from AWS expiry. A 2-minute provider-clock allowance covers round-trip skew; it is not extra requested duration. Guided flow still requests--credential-ttl 1h.This lives in the online image, so existing
cc812ceremonies keep the old check until they use a new image.Test plan
go test ./internal/access/including AWS 1h overshoot vs 12h remaininggo test ./cmd/relay/cc812containers