← All exercises
Decision workshop · Publikacja codzienna / 2026

The cache knows the report, but not the tenant. What will tenant B see?

Identify the risk, make a decision and compare your reasoning with a senior architect’s analysis.

01 · SCENARIO · Advanced

Fictional example. A SaaS application serves multiple companies. A token carries user and tenant identifiers, while the gateway validates its signature and expiry. Report numbers are allocated independently inside each company, so tenants A and B can both have report 42.

The GET /reports/42 endpoint first looks in a shared cache under report:42. Only on a miss does it query the database with a tenant filter. A user from tenant A opens their report and warms the cache. Shortly afterwards, an authorised user from tenant B requests their own report 42 and receives the cached response. The team says, “But the gateway checked authorisation.”

Your question

Where did tenant isolation break? How will you change authorisation, the cache key and tests so the fix covers the whole path rather than this endpoint alone?

Guiding questions
  • Does a valid token prove access to a particular report?
  • Which values identify a report uniquely across the system?
  • Is access checked on a cache hit as well as a miss?
  • How will two tenants with the same local report number expose a regression?
02 · YOUR DECISION

What would you do?

Describe your decision, the main trade-off and how you would test it.

At least 40 characters are needed for mentor feedback.

How is my data used?

Your answer is sent to an AI provider to prepare feedback. Do not enter confidential or other people’s personal data.

03 · SENIOR ANALYSIS

Compare your reasoning

Read the full analysis at any time, including without AI feedback.