Code RoomEnterprise file authorization
MediumPrep Room Coding #3800

Enterprise file authorization

System designSecurityMid–Senior~40 min

Design the authorization and secure-sharing layer for an enterprise file-storage product with 50M users and billions of files. It must answer 'can user U do action A on file F?' in under 10ms for 1M checks/s, support nested folders with permission inheritance, group/role grants, and public/expiring share links, and propagate a permission revocation quickly. Threat model: confused-deputy and IDOR bugs, over-broad share links, and a revoked user retaining access via a cached grant or an old link. Cover the permission model, the inheritance/evaluation engine, share links, and revocation propagation.

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts (data model, bottlenecks, consistency, failure modes) and name the trade-offs you are making.

Clarify4:30 left
Estimate4:30 planned
Design13:30 planned
Deep dive10:30 planned
Failure7:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.