Design a Permission Check Service for Google Drive Sharing
Last updated: November 29, 2026
Quick Overview
Design a centralized authorization service that answers "can user U view or edit file F" for Google Drive, supporting folder inheritance, groups, and link sharing with very low latency.
0
0
0 solved
Design a centralized authorization service that answers "can user U view or edit file F" for Google Drive, supporting folder inheritance, groups, and link sharing with very low latency.
Authorization at Google scale is a well-known design area, and Drive's nested folders, shared drives, and groups make it hard. Interviewers check data modeling of relationships, consistency with respect to revocation, and caching that does not leak access.
What the Interviewer Expects
- Models permissions as relationship tuples
- Handles inheritance through folders and groups
- Addresses the new-enemy problem on revocation
- Designs caching and denormalization safely
- Discusses latency at the 99th percentile
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How do you list all files a user can see, not just check one?
- How do you handle a group with a million members?
- How do you make a revocation take effect before the next read?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: check(user, permission, object); write(add or remove a relation); support owner, editor, commenter, viewer; folder inheritance; nested groups; anyone-with-link sharing; shared drives. ...
High-Level Design
- Tuple store: relations as
(object, relation, subject)such asdoc:123#viewer@user:alice,doc:123#parent@folder:9,group:eng#member@group:infra. Store in a globally replicated database w...