Server enforcement and caching
Where authorization belongs
The browser helps users navigate, but the service controls protected data. The server verifies identity, tenant, operation and resource permissions before releasing content. The same rule should govern alternate request paths such as mobile clients and background operations. An unavailable required decision must not turn into permission.
What a cache changes
A cache stores a result for reuse to reduce repeated computation. A bookstore might cache a rendered invoice summary. If cached content depends on permissions, a shared invoice-number key is not enough: different tenants or users may have different rights and content. A cache hit must not bypass authorization.
A conservative cache policy
For a small sensitive invoice service, start by not caching personalized responses in shared caches. If a reviewed design later caches protected data internally, scope it to the relevant tenant and visibility context, reauthorize before disclosure, and define invalidation when data or permission changes. A tenant key alone is insufficient if users within that tenant see different fields.
Changes and audit records
If an employee leaves Cedar, old cached summaries must not make access possible after revocation takes effect. Specify how current policy is obtained and what happens if its source fails. Record useful audit metadata such as action, decision, time and synthetic resource reference; avoid logging protected invoice contents or session secrets. Retention and access to logs need their own policy.
Practice: review a request path
Draw the path: authenticated request → permission check → scoped lookup or cache → permitted response. Mark the denial paths for unknown identity and stale membership. Explain why a UI-only restriction and a permission-blind cache do not meet the policy. Sources: OWASP Authorization, Multi-Tenant Security and Web Cache Security cheat sheets.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Server enforcement and caching — knowledge check
Apply authorization concepts to fictional bookstore records.
Where must access to protected records be enforced?
What must a cache hit preserve?
Which initial design is conservative for sensitive personalized invoices?
What should occur after permission revocation takes effect?
Which audit record is appropriate in the toy model?