A maintenance script updates your permissions table and every user in one tenant can suddenly edit everything. What should have stopped that, and how would you have found out?
Answer
Short answer
Permission data is as privileged as the code that reads it, so a bulk write to it needs the same review, staged rollout and reversibility as a deploy. Derive grants from a source of truth rather than stamping them, assert tenant invariants continuously, and know how long a cached decision keeps the mistake alive.
This is an authorisation failure with an audit logging requirement. Good authorisation design asks who can grant access, who can approve it, and what blast radius a script can create. Audit logging matters because authorisation mistakes must be reconstructable after the fact: which principal acted, what permission changed, who approved it, and which tenant was affected. Weak authorisation answers fix the script but leave audit logging unable to prove what happened.
Was this answer helpful?
Likely follow-ups
- The script ran twelve hours ago and users have since made legitimate changes. How do you reverse only the escalation?
- How do you give an engineer the access needed to debug a customer problem without giving them a standing grant?
- Your permission check is a service call on the hot path. What do you cache, and what does that cost you at revocation time?
- How would you prove to an auditor that no user held an entitlement they were not granted, for a month you have already closed?
Related questions
- A customer's API token turns up in a public repository. What do you do in the next hour, and what in your token design decides how bad this is?hardAlso on least-privilege and audit-logging7 min
- Customers want per-project roles rather than one global role. How do you model that, and where in the request does the check happen?hardAlso on authorisation and multi-tenancy6 min
- Your observability bill is now bigger than your compute bill. What do you cut first, and what must you never lose?hardAlso on audit-logging5 min
- A customer reports seeing another company's records in your admin console. Walk me through the first hour, and then tell me what you change so this class of bug cannot happen again.hardAlso on multi-tenancy4 min