Skip to content
Tech Interview Prep
Technical interview guide

Identity & Access Management (IAM) Design

Designing identity, roles, and access policies across an entire organization, not just one system.

Minutes to read
4
Practice MCQs
25
Interview Q&A
25
Edition
v5
Editorial status
Reviewed
Relevant for
Security Architect

Scope: NIST SP 800-63-4 suite (final July 2025); SCIM RFCs 7643/7644; OAuth Security BCP RFC 9700 (January 2025); OpenID Connect Core 1.0.

Overview

Curated: · Written: · Reviewed:

Identity & Access Management (IAM) Design

In one line

Design identity, roles and access policies across the whole organization, so every identity has an owner, every grant can be reviewed, and revocation reaches every place access lives. Reach for it when access spans many systems, populations (employees, contractors, partners, customers, workloads) and trust domains.

Key definitions

  • Authoritative source: the system that owns a fact. HR owns employment, the CMDB owns service ownership. Ownership decides who an identity is, not the directory.
  • Stable subject: an identifier that is never reused and does not change with name or email. Match on it.
  • Effective access: what a principal can actually do after nested groups, dynamic rules, inherited policy, delegation and local overrides are evaluated. It is not the grant record.
  • Confused deputy: a service uses its own authority on behalf of a caller and lets the caller choose the object.
  • Toxic combination: two entitlements that break separation of duties, checked on effective entitlements after nesting is expanded.

Formulas and complexity

Role audit ratio, as the audit rule states it:

entitlements granted by rolemedian entitlements used by holders≤3\frac{\text{entitlements granted by role}}{\text{median entitlements used by holders}} \le 3

Worked example (hypothetical figures): a role granting 24 entitlements with a median use of 6 has a ratio of 4 and fails. The ceiling is 18 granted.

How it works

  1. The authoritative source emits a change keyed on the stable subject. The connector creates, updates or disables, and never matches on email.
  2. The relying party keys local accounts on the pair (iss, sub) and checks aud, nonce and exp.
  3. SCIM pushes users and groups. PATCH filters change only the matching members, and retries are idempotent.
  4. The enforcement point decides on effective access, with short-lived access tokens. Revocation reaches refresh tokens and sessions, not only the IdP account.
  5. Reconciliation compares source to target state, and sampled decisions are tested at the enforcement point.
stable ID change SCIM create patch disable OIDC id_token iss and sub access token aud and scope revoke refresh and sessions Authoritative source Identity provider SaaS targets Relying party API gateway Tenant and object check Session store Reconciliation job

When to use and when not to

DecisionUseAvoid
RBAC or ABACRBAC for stable job bundles; ABAC or relationship rules for tenant, project, environmentOne role per region x data class x project combination (360 roles in the example)
Standing or JIT adminJIT for production admin, time-boxed, task-scoped, peer-approved by someone other than the requesterStanding admin groups that span every environment
SCIM push or connector pullSCIM where the target's schema and PATCH support are verifiedAssuming a target applied a PATCH without reading it back
Token lifetimeShort-lived access tokens plus revocable refresh and session stateRelying on access token expiry to end access
Central or delegated adminDelegated by bounded population and entitlementAdministrators able to grant themselves broader roles

Traps interviewers probe

  1. Keying accounts on email or username. Email changes with surnames and reissued addresses get reused. Fix: match on the immutable HR ID or (iss, sub), treat email as an attribute, and scope disables to the HR-sourced population so guests and service accounts are not touched.
  2. Believing an expired token means access ended. A 15-minute JWT is accepted until its exp, and a refresh token can mint a new one after the user has left. Fix: revoke refresh tokens and sessions on leave, and recheck account state at the refresh endpoint.
  3. Accepting any valid token from the issuer. A token for another audience is still valid. Fix: check that aud equals this API's identifier and that the tenant claim matches the route.
  4. Filters that miscompare. "logs-acme-corp".startsWith("logs-acme") is true, so a prefix check lets one tenant read another's bucket. Fix: compare the exact name. In SQL, last_used > x is unknown for NULL, so the export needs OR last_used IS NULL; in the 9,600-row example it returns 7,500 rows (5,100 recent plus 2,400 never used).
  5. Treating a retry as a second create. After a 409 with scimType uniqueness on a timed-out POST, the record already exists. Fix: look it up by externalId, store its id, and converge with PATCH.

Interview tips

Open with: identity starts at an authoritative source, and access is whatever is effective at the enforcement point. Then name the key, the revocation path and the evidence.

Follow-ups to expect:

  • How a mover loses old group memberships without leaving orphans.
  • Why a PATCH with a filter path leaves a three-member group at three members.
  • How to stop a leaver's refresh tokens within minutes.
  • How to block self-approval when the on-call lead must approve peers. Enforce the check in the service, because a direct API call bypasses the UI.
  • Which SoD conflicts a static matrix misses: nested groups and service accounts. Revoking one entitlement can clear several violations when they share it.
  • Why approval rate is a poor headline metric. Sample reviewer decisions against the evidence instead.

30-second answer outline:

  1. Source and key (10 s): HR stable ID for employees, (iss, sub) per provider, email as an attribute.
  2. Enforcement and revocation (10 s): short tokens, aud and tenant checks, refresh and session revocation on leave.
  3. Evidence (10 s): reconcile source to target, sample effective access, and review with metrics that test decisions rather than count approvals.

Feedback on this overview

Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.