Identity and access management
Identity and access management (IAM) answers two questions for every request: who is this? (authentication) and what may they do? (authorization). In a modern architecture, applications don’t store passwords or invent their own login. They delegate authentication to a central identity provider (IdP) using open standards, and they make authorization decisions from the tokens and policies that come back.
IAM is also where zero trust starts: with no trusted network, identity becomes the main security boundary.
Diagram
Section titled “Diagram”- The user opens the application, which redirects them to the identity provider.
- The user signs in there, with MFA; the application never sees the password.
- The identity provider returns an ID token (who they are) and an access token (what the app may call).
- The application calls APIs with the access token; each API validates it and checks policy.
- When someone joins, moves or leaves, the source system drives account changes everywhere.
How it works
Section titled “How it works”- OpenID Connect (OIDC) for authentication. The app redirects the user to the IdP. After sign-in, the app receives an ID token, a signed statement of who the user is.
- OAuth 2.0 for delegated access. The app receives an access token that lets it call specific APIs with specific scopes. APIs validate the token’s signature, issuer, audience and expiry on every call.
- Authorization Code flow with PKCE is the recommended flow for web, mobile and single-page apps. The implicit flow and password grant are deprecated in current OAuth guidance.
- Service-to-service identity. Workloads use the client credentials flow, mutual TLS or workload identity from the platform, never shared passwords in config files.
- Authorization models. Role-based access control (RBAC) is simple to start with. Attribute-based (ABAC) and relationship-based (ReBAC) models handle fine-grained rules like “managers can approve their own team’s expenses”. Keep coarse checks at the gateway and fine-grained checks close to the data.
- Lifecycle through SCIM. The HR system (or CRM, for customers) is the source of truth. SCIM provisioning creates, updates and disables accounts in downstream apps automatically.
- Phishing-resistant MFA. Passkeys and FIDO2 security keys resist phishing far better than SMS codes or push approvals.
Workforce vs customer identity
Section titled “Workforce vs customer identity”| Aspect | Workforce IAM | Customer IAM (CIAM) |
|---|---|---|
| Users | Employees, contractors | Customers, partners |
| Scale | Thousands | Up to millions |
| Source of truth | HR system | Self-registration, CRM |
| Priorities | Security, lifecycle, SSO to many apps | Low-friction sign-up, privacy consent, scale |
| Typical extras | Access reviews, privileged access management | Social sign-in, progressive profiling, fraud signals |
- One place to secure sign-in, add MFA and respond to incidents.
- Single sign-on across apps improves both security and user experience.
- Fast, complete offboarding when someone leaves.
- The IdP becomes critical infrastructure: if it’s down, nobody signs in. Plan for its availability.
- Token handling is easy to get subtly wrong, for example skipping audience checks or storing tokens insecurely in browsers.
- Authorization is still your problem. The IdP tells you who someone is, not what your business rules allow.
When to use it
Section titled “When to use it”Always. Every system with users or service-to-service calls needs a deliberate IAM design. The question is how much to centralize, not whether to.
When to avoid it
Section titled “When to avoid it”Avoid building your own identity provider or password storage. Use a proven IdP, commercial or open source, and spend your effort on authorization and lifecycle.
Common pitfalls
Section titled “Common pitfalls”- Each application with its own user table and password, creating many places to attack and forget to offboard.
- Long-lived access tokens and no revocation story.
- Authorization only in the UI, with APIs that trust any valid token.
- Shared service accounts whose passwords nobody can rotate.
- No regular access reviews, so permissions only ever grow.
Related patterns
Section titled “Related patterns”- Zero trust architecture
- Threat modeling
- Backend for frontend, which keeps tokens off the browser
- Scenario: identity sprawl
Glossary: zero trust
Further reading
Section titled “Further reading”- IETF, RFC 9700: Best Current Practice for OAuth 2.0 Security (opens in a new tab)
- OpenID Foundation, How OpenID Connect works (opens in a new tab)
- IETF, RFC 7644: SCIM protocol (opens in a new tab)
- NIST, SP 800-63: Digital Identity Guidelines (opens in a new tab)
- FIDO Alliance, Passkeys (opens in a new tab)
Written and edited by Abhinav Taduka, enterprise software architect.
New pages are added regularly. Follow Abhinav on LinkedIn to see them first.