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.

Read
31 min
Practice MCQs
25
Interview Q&A
25
Edition
v4
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.

Curated: · Written: · Reviewed:

25 questions

MCQ-8An engineer writes the quarterly access-review export on PostgreSQL 16 as: ```sql SELECT user_id, entitlement_code FROM grants WHERE last_used > now() - interval '90 days' OR last_used IS NULL; ``` The grants table holds 9,600 rows: 2,400 with last_used NULL, 5,100 last used within the past 90 days, and 2,100 last used more than 90 days ago. Which statement about the export is correct?
MCQ-15In the GitHub organization `acme`: team `platform` has `admin` on `payments-api`; `platform/sre`, a child of `platform`, has `write` on `billing-worker`; `platform/sre/oncall`, a child of `platform/sre`, has `read` on `payments-api`. Dana is a member of `platform/sre/oncall` only and holds no direct repository access. An access review asks what she can actually do. What is Dana's effective repository access?
MCQ-12A mobile app signs users in against the company IdP with OIDC (authorization code + PKCE, scope `openid profile email`) and then calls `GET https://api.example.com/orders` with `Authorization: Bearer <jwt>`. The API gateway verifies the JWT signature against the IdP's JWKS and checks `iss`, and the call returns 200. A reviewer replays the same JWT from curl on a laptop and also gets 200. The JWT payload is: ```json {"iss":"https://idp.example.com","aud":"mobile-app","sub":"8f14e45f","email":"dana@example.com","iat":1735686000,"exp":1735689600,"nonce":"n-0S6_WzA2Mj"} ``` The gateway's own identifier is `orders-api`. What should change?
MCQ-11An OIDC relying party (client_id `hr-portal`) accepts id_tokens at its callback, which uses the `form_post` response mode, after verifying the signature against the IdP's JWKS, checking that `iss` is `https://idp.example.com`, checking that `aud` contains `hr-portal`, and checking that `exp` is in the future. Tokens are valid for 5 minutes. A tester copies a victim's id_token out of session storage on a shared kiosk and POSTs it to the callback 3 seconds after it was issued; the RP creates a session for the victim. Which change rejects this replay while leaving normal logins working?
MCQ-2Your API issues its own tokens. Access tokens are 15-minute JWTs that each service verifies locally, checking only the signature and `exp`. Refresh tokens are opaque strings in Redis; the refresh endpoint checks only that the string exists and has not passed its 30-day TTL, then mints a new access token. The offboarding runbook disables the IdP account and deletes the user's row from the users table. A leaver is offboarded at 10:00; their last access token was issued at 09:58. At 10:20 the API still returns 200 for their client. What explains the 10:20 success?
MCQ-13A payments platform issues access tokens with `aud` set to the specific service, a 10-minute lifetime, and the single scope that service requires. A token minted for the payouts service was copied from a request log and replayed against the payouts service 40 seconds after issuance; payouts accepted it. Which single change would have made that replay fail without invalidating tokens already in flight for other services?
MCQ-14A multi-tenant billing API validates access tokens with four checks: the RS256 signature verifies against the JWKS key named by `kid`; `exp` is in the future; `aud` contains `billing-api`; and `scope` contains the scope the route requires. It reads no other claim. Tokens carry `aud=billing-api`, `scope=invoices:read`, `sub=user:42`, `org=12`, and a 900-second TTL. A request for `GET /orgs/88/invoices/1043` (route scope `invoices:read`) arrives with a token whose signature verifies, `exp` is 600 seconds away, `aud=billing-api`, `scope=invoices:read`, and `org=12`. The server returns org 88's invoice. Which change stops the cross-tenant read while keeping legitimate requests working?
MCQ-19A log-search service authenticates callers with a JWT that carries `tenant_id`, then reads objects from S3 using a service account whose IAM policy allows `s3:GetObject` on `arn:aws:s3:::logs-*/*`. Buckets are named `logs-<tenant_id>`. Before reading, the service runs `if (!bucket.startsWith("logs-" + tenantId)) return 403;`, where `bucket` is the caller-supplied parameter. Tenants `acme` and `acme-corp` both exist. A caller whose token says `tenant_id=acme` sends `bucket=logs-acme-corp`. What does the service do?
MCQ-10Your service keys local accounts on the ID token's `sub` claim alone. You add a second OIDC provider for a partner's staff. Within a week, 41 of 6,300 users are landing in another person's account. Two of the colliding tokens decode to: | claim | Provider A | Provider B | | --- | --- | --- | | `iss` | `https://login.a.example` | `https://sso.b.example` | | `sub` | `9f2c` | `9f2c` | | `email` | `dana@corp.example` | `ravi@partner.example` | | `aud` | `app-7` | `app-7` | | `sid` | `s-1` | `s-2` | Both providers are certified, both issue opaque `sub` values that are stable for a given user, and neither reuses a `sub` across its own users. The partner provider does not assert `email_verified` and reassigns email addresses when staff leave. What should the account key be?
MCQ-9A B2B SaaS app creates and finds user rows from the OIDC `email` claim. Acme's IdP deletes dana@acme.com when Dana leaves on 3 March. On 20 April Acme reissues that exact address to a new hire. The new hire signs in and lands inside Dana's workspace, holding 4,200 customer records and a live API token. Which change prevents this?
MCQ-3A SCIM 2.0 service provider implements PATCH as specified in RFC 7644. Group `g1` has three members (Alice (`value` `a1`), Bob (`value` `b1`) and Carol (`value` `c1`)) each with a `display` name. The IdP sends: ```http PATCH /Groups/g1 { "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"], "Operations": [ { "op": "replace", "path": "members[value eq \"b1\"].display", "value": "Robert" } ] } ``` What does `members` contain after the provider applies the request?
MCQ-4A SCIM 2.0 provisioning client sends POST /Users for employee E-1042 with externalId "E-1042" and userName "e1042@corp.example". The target enforces uniqueness on both externalId and userName. The POST times out after 30 s; the target actually committed the create and returned 201, but the response was lost. The client retries the identical POST. The target supports filtering on externalId and returns 409 with scimType "uniqueness" on the retry. What should the client do next?
MCQ-22A nightly reconciliation job calls Okta's GET /groups/{id}/users with limit=200 to fetch the members of the Sales-All group, then compares that list against the app's 1,180 Sales accounts. It reports 980 accounts with no Okta counterpart and logs no errors. Sales-All has 1,180 members. What explains the 980-account gap?
MCQ-1An HR system is the authoritative source for a 4,000-employee company. The nightly provisioning connector matches directory accounts to HR records on `userPrincipalName` (the work email) and only creates or updates: it never deletes. Last month 62 employees changed their surname in HR, which regenerated their email address. After the next sync each of those 62 people had two enabled directory accounts: a new one with no group memberships, and the old one still in every group it held, including `Finance-Approvers` and `Prod-Admins`. The directory also holds about 900 B2B guest accounts and 40 service accounts that have no HR record. Which change fixes the duplicate accounts without breaking the rest of the directory?
MCQ-21A quarterly access review on a 12,400-account SaaS tenant flags 310 accounts with no matching record in the nightly HR feed. The tenant's policy defines an account as orphaned when no authoritative source can name its owner. The reviewer's notes: 240 carry a `svc-` prefix and have a named owning team in the CMDB; 45 are in the onboarding workflow with a named hiring manager and have never authenticated; 25 belong to contractors whose records live in a vendor system that is not wired into the HR sync. Which accounts must the review treat as orphaned?
MCQ-20A SaaS platform delegates tenant administration through administrative units. The EMEA unit holds 1,200 users, and the support lead's delegation grants only the Support and ReadOnly roles, scoped to that unit; the lead's own account holds only Support. The delegation was created six months ago and its record still lists only Support and ReadOnly. A quarterly review finds 14 EMEA users holding Billing Admin, all assigned by the lead in the last 90 days. What does this show?
MCQ-25After a merger, the combined company keeps three identity providers running for a year, and each application federates to whichever provider holds the user's account. Some employees already have accounts in more than one of them from earlier acquisitions. Which statement names the key architectural risk and the design that prevents it?
MCQ-18A platform team runs 60 services on one Kubernetes cluster. Twelve services in the payments namespace authenticate to an internal secrets API with the same static API key, stored in a Secret created three years ago. Rotating that key requires redeploying all twelve services together in a six-hour change window, and last quarter's audit found nine services still using keys issued to engineers who had left. The team wants rotation to stop coupling the twelve services and wants the audit log to name the calling service. Which change achieves both?
MCQ-6A document platform grants access through four RBAC roles (viewer, editor, reviewer, owner) scoped per workspace. Compliance then required every permission to be limited by region (3), data class (5) and project (6), so the team encoded each combination as its own role: 4 × 3 × 5 × 6 = 360 roles. Adding a fourth region means authoring 120 more, and role review now takes two weeks. Which change fixes the growth while keeping the job-function boundaries?
MCQ-5A 5,000-employee company models access with 60 department-level roles. Each role grants all 24 entitlements used anywhere in its department, while the median holder of a role uses 6 of them. The audit rule is that no role may grant more than three times what its median holder uses on a standing basis, and the access review board can recertify at most 150 roles per quarter. Each department has five teams, and each of the 18 entitlements a median holder does not use is needed by at least 40 people in the department. Which change brings every role within the audit ratio without exceeding the review board's capacity?
MCQ-17A payments platform runs a nightly separation-of-duties scan. The scan expands group nesting, then evaluates every pair of a principal's effective entitlements against three rules: - R1: `dispute:open` with `dispute:resolve` - R2: `dispute:open` with `refund:issue` - R3: `refund:issue` with `refund:approve` Service account `svc-recon` belongs to two groups. `recon-ops` grants `txn:read` and `dispute:open`. `recon-tools` grants `txn:read`, `dispute:resolve`, `refund:issue` and `report:export`. The team wants to clear every violation with one entitlement revocation. Which entitlement should be revoked?
MCQ-16A platform team issues 4-hour production admin grants through a JIT service. The service resolves approvers from the `platform-approvers` directory group and grants the role when any member calls `POST /approve`. In Q3, 41 of 260 grants had `approver == requester`; in every case the requester was the on-call lead, a legitimate member of `platform-approvers` who must approve peers' requests. The JIT API is reachable directly with a service token, not only through the web UI. Which change removes self-approval while keeping the on-call lead able to approve peers?
MCQ-7A payments team replaced its standing admin group with just-in-time elevation: an engineer requests a role, a peer approves it, and the grant expires after 60 minutes. Six months of audit data show that 30% of grants were for `payments-admin`, a role that spans every service and every environment including production, and that the median grant lasted 22 minutes. The team can ship one change this quarter. Which change removes the largest share of the exposure the audit found?
MCQ-24A platform team's production access runs through the company's SSO (IAM Identity Center backed by an external IdP). Break-glass is one `break-glass-admin` role per account, assumable only with a FIDO2 key kept in a safe, with a 1-hour session limit. Every assumption pages the security on-call. Over the last 90 days the role was assumed 61 times: 58 by the same two engineers, all between 09:00 and 18:00 on weekdays, and every page was acknowledged and closed within 4 minutes. The IdP had no outage in that period. Which conclusion does this evidence support?
MCQ-23A 4,000-person company runs quarterly access certifications in its IAM tool, and each reviewer faces 300+ line items per cycle. Leadership wants one headline metric to track programme health. Which metric most risks encouraging reviewers to rubber-stamp approvals?