I spent too long on the file storage side and had to scramble when they steered me toward ACLs.
Start by clarifying requirements: multi-tenant orgs, PDF-only storage, and ACLs at org, group, and user levels. Then propose a hierarchical role-based access control (RBAC) model with inheritance and overrides, and discuss how to enforce it at the API and storage layers with audit logging.
Pro tip: Emphasize that ACLs must be evaluated at the document level but inherited from the org hierarchy, and mention the need for efficient permission checks using caching or materialized paths to avoid recursive queries.
Ask about scale (number of orgs, users, documents), permission granularity (view, edit, share), and compliance needs (audit logs, data residency). Confirm that PDFs are the only allowed file type and that access control is the core focus.
Propose a schema with organizations, users, groups, roles, and permissions. Use a hierarchical model where permissions can be assigned at org, group, or document level, with inheritance and explicit deny overrides.
Explain how to compute effective permissions: traverse from org down to document, combining roles and overrides. Discuss caching strategies (e.g., Redis) and materialized paths to optimize frequent checks.
Describe middleware that checks permissions before serving PDFs, and storage-level encryption with per-document keys. Mention audit logging for all access attempts and changes to ACLs.
Discuss trade-offs between fine-grained and coarse-grained permissions, latency vs. consistency in permission checks, and how to handle cross-org sharing securely. Mention sharding by org for scalability.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.