A working FastAPI service on SQLAlchemy 2.0 with Alembic. Two tenants share one database and one set of endpoints. Everything on this page hits the real API on this server, and the four checks at the bottom run the real commands and print their real output.
Press the button. With the guard on the answer must be 404 — not 403, because a foreign id must not be distinguishable from a missing one. Then switch the guard off and press again: that is the same code without the tenant filter, i.e. the leak this work exists to close.
—