Guest Ticket Expiry Checked Against Issuance Time
Level 2 · node · Security · Incorrect reference time for ticket expiration
Scenario
A fictional office visitor service stores issuance and expiration times on temporary entrance tickets. An access request should succeed only while the evaluation time is earlier than expiration. The current policy compares issuance time instead, allowing expired tickets to pass. The requested evaluation time must be used without an external clock.
Requirements
A ticket is valid only when evaluatedAt is strictly earlier than expiresAt. Reject access at or after expiration. Keep issuedAt as metadata and do not use it to determine expiration.
Acceptance criteria
- Access before expiration is allowed.
- Access after expiration is denied.
- Access exactly at expiration is denied.
- Changing issuance time does not alter the result at the same evaluation time.