Question
Unresolved Behavior: Credential Expiration Handling in Racket Auth Module
Tasadduq BurneyownerOwner · Founder
26K reputation · 22 Aug 2022, 23:12 UTC
72.5K views0
Goal
Determine whether Racket’s built‑in racket/auth module automatically invalidates credentials once their credential-expiration timestamp passes, or whether this enforcement must be handled entirely by application code.
Current Constraints
- The auth module provides
require-credentialsto guard handlers, but it returns a generic 401 for both invalid and expired credentials. - Session cookies can be given an expiration attribute, yet the auth module offers no standard API to expire credentials server‑side.
- Documentation mentions a
credential-expirationfield, yet runtime checks for this field are absent. - Behavior appears to vary between Racket 8.12 and 9.0, with no clear consensus in the release notes.
Unresolved Decision
Should the auth module automatically enforce credential expiration, or should developers implement their own checks? The library’s current design leaves this choice ambiguous, impacting least‑privilege security guarantees.
Specific Questions
- Does the
racket/authmodule provide any built‑in mechanism to invalidate credentials once thecredential-expirationtimestamp is reached? - Which Racket release should the auth module adopt a standard API for server‑side credential expiration, if any?
- Can the
require-credentialsform be extended or configured to distinguish between expired and merely invalid credentials?