Medium
Microsoft

Design a Role-Based Password Validator System Design Interview

Design an extensible validator that applies different password policies to regular users, administrators, and super administrators.

1. Problem Statement

Design a password validator with different requirements for regular users, administrators, and super administrators. The policy should be easy to extend when roles or rules change.

2. Architecture Discussion Map

Use this as one discussion aid, not a single correct answer. Your design should follow from the requirements, scale, and trade-offs you establish.

Rendering architecture diagram...
Mermaid Source (For AI Bots)
graph LR
    A["Design a Role-Based Password Validator"]
    A --> F1["Policy and rule interfaces"]
    A --> F2["Role-to-policy composition"]
    A --> F3["Useful validation errors"]
    A --> F4["Unicode and normalization"]
    A --> F5["Unit and boundary testing"]

3. Key Focus Areas

  • 1
    Policy and rule interfaces
  • 2
    Role-to-policy composition
  • 3
    Useful validation errors
  • 4
    Unicode and normalization
  • 5
    Unit and boundary testing

4. What Strong Candidates Should Demonstrate

  • Model password policies without a brittle role-by-role conditional tree.
  • Keep validation rules composable, explainable, and easy to test.
  • Avoid security regressions when policies evolve.

Want interactive feedback?

Practice drawing this system component-by-component on a live whiteboard while the interviewer probes at your target level.

Start Interview

Core Concepts

Object-Oriented DesignValidationSecurityTesting