noCV
ATOKEN-104 · Control token lifetime

Enforce token expiration at the request authorization boundary

Practice briefBugFoundational

A token expires in storage but remains usable because the cached authentication result has no expiry check.

Focused work estimate
1h 30m + prerequisites
Priority in the scenario
Medium
Engineering practice
Authentication · Temporal boundaries

Estimated field mix

  • Security100%

Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.

Your next step

Review it, then add it to your workspace.

The board opens an editable draft; nothing is saved until you confirm it. Sign-in and workspace permissions apply, and Demo boards remain ephemeral.

Project context

A fictional B2B export API uses long-lived tokens. Tokens copied between organizations can access too much, and revocation takes effect unpredictably.

Setup prerequisites

  • Create a local synthetic API and two isolated organizations.
  • Use generated disposable credentials only.

Preceding work

Complete these dependencies, or supply their agreed outputs before taking this ticket.

Acceptance criteria

  • Check current expiry with an injected clock.
  • Cache lifetime cannot exceed token expiry.
  • Expired tokens fail before protected service execution.

Implementation constraints

  • Use UTC instants and avoid logging presented credentials.

Verification to include

  • Authenticate just before expiry.
  • Advance to the exact expiry instant and deny cached and uncached requests.

Deliverables

  • Expiry enforcement and clock-boundary cases

Rollout and recovery

Canary with disposable short-lived tokens; flush incompatible authentication caches.

Value of the work

For the engineer: Practice authorization boundaries, credential lifecycle and safe diagnostics.

For the team: Review denial paths and operational control over service access.

Evidence boundaries

Outcome Evidence: Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.

Ownership Evidence: Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence.