Exchange per-replica token cache (TTL-bounded LRU, (subject_token, scopes, audience) key) #27
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lab/authz-bridge!27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/exchange-token-cache"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #18
Adds the Exchange Flow's per-replica token cache:
(subject_token, scopes, audience)— audience is the App's own clientID; scopes are sorted+joined.expires_in(bounded ≤ the access token's exp); an absent/zeroexpires_infalls back to 60s. The clock is injectable (tests advance time without sleeping).Verified TDD-first: 8 new tests (hit, different subject token, different scopes, different audience, TTL expiry incl. the within-TTL hit, LRU eviction at capacity, never-cached failure, fresh token on a miss), all RED before implementation and GREEN after. Full suite green (
-p 1). Two-axis code review: no hard standard violations; noted for follow-up — the 60sexpires_in-absent fallback can over-extend a token whose real lifetime is shorter (the backend 401s; not a mis-authorization).