Invalidate cached permissions after a role downgrade
A partner administrator is downgraded to read-only but retains edit access on one API instance for an hour because permission caches are local and keyed only by user ID.
- Focused work estimate
- 3h 30m + prerequisites
- Priority in the scenario
- High
- Engineering practice
- Authorization caching · Consistency · Fail-closed behavior
Estimated field mix
- Security60%
- Distributed systems40%
Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.
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 manufacturing company shares purchase-order documents with partner organizations. Buyers, partner administrators, and read-only agents use the same API. Recent support reports suggest list filters and background downloads disagree about who may see an order.
Setup prerequisites
- HTTP APIs
- Session authentication
- Tenant-scoped data access
Preceding work
Complete these dependencies, or supply their agreed outputs before taking this ticket.
Acceptance criteria
- Scope cached decisions by actor, partner, and authority revision.
- Enforce a documented maximum revocation delay with an authoritative fallback.
- Fail closed for privileged writes when current authority cannot be established.
Implementation constraints
- User ID alone is insufficient when the same user belongs to multiple partners.
Verification to include
- Downgrade a role across two synthetic API instances and measure the revocation delay.
- Simulate cache invalidation loss and authority-store failure; assert privileged writes cannot persist indefinitely.
Deliverables
- Permission cache policy and revocation-latency reproduction
Rollout and recovery
Shorten cache lifetime before enabling revisioned entries; bypass the cache if revision propagation fails.
Value of the work
For the engineer: Practice authorization as a service-level invariant, including revocation timing, concurrent membership changes, and asynchronous data delivery.
For the team: Inspect a concrete record of cross-organization denial, least-privilege decisions, and access-recovery behavior using fictional partner records.
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.