Efficient Permission Resolution with Caching

Last updated: December 9, 2025

Quick Overview

Given a hierarchical IAM structure (organization -> accounts -> groups -> users) with permission inheritance and overrides, implement efficient permission resolution that determines the effective permissions for any user on any resource.

Wiz
Coding & Algorithms
Software Engineer
Wiz
December 9, 2025
Software Engineer
Live Technical Session
Coding & Algorithms
Hard

5

6

4,866 solved


Given a hierarchical IAM structure (organization -> accounts -> groups -> users) with permission inheritance and overrides, implement efficient permission resolution that determines the effective permissions for any user on any resource.

Cloud IAM permissions are hierarchical and complex. A user's effective permissions come from direct assignments, group memberships, account-level policies, and organization-level policies, with inheritance and explicit denials. Efficiently resolving the effective permissions is critical for Wiz's access analysis. This problem tests your ability to design algorithms for hierarchical data with caching.

What the Interviewer Expects
  • Model the hierarchical permission structure correctly
  • Implement permission resolution with proper precedence (explicit deny > allow)
  • Add caching to avoid re-computing permissions for repeated queries
  • Handle cache invalidation when permissions change
  • Analyze time and space complexity
Key Topics to Cover
Tree/hierarchy traversal
Permission inheritance and override
Caching strategies
Cache invalidation
IAM policy evaluation
How to Approach This
  1. Clarify input constraints and edge cases before writing code.
  2. Walk through your approach verbally and confirm with the interviewer before coding.
  3. Start with a brute force solution, then optimize. Mention time and space complexity.
  4. Test your solution with examples, including edge cases like empty input or duplicates.
  5. Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
  • How would you handle permission boundaries (AWS SCPs)?
  • What cache invalidation strategy would you use when an org-level policy changes?
  • How would you parallelize permission resolution for millions of users?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice DSA Problems
Sample Answer
Problem Analysis

The problem revolves around efficiently resolving permissions in a hierarchical IAM (Identity Access Management) structure. The key patterns here are tree traversal for the hierarchy and caching for e...

Approach
  1. Model the Hierarchical Structure: We will represent the organization, accounts, groups, and users in a tree-like structure where each node may contain permissions and links to child nodes.
  2. ...

Submit Your Answer
Markdown supported

Related Questions