liveBook · Manning

Identity provider

As explained in Grokking Software Architecture

An identity provider is a service that authenticates identities and issues credentials or assertions that other systems use for access decisions.

An identity provider (IdP) is the guard that issues the ticket: it manages digital identities, authenticates users, and issues verifiable security tokens. An API gateway can then check a token rather than asking every application to manage passwords itself. section 11.3.2 section 11.3

Delegating authentication centralizes credential management and multi-factor authentication. It also keeps individual applications from storing and hashing user passwords—a risky job to implement yourself. An IdP is one layer of defense, not a substitute for authorization and other security controls. section 11.3.2 section 11.4

Two complementary standards help systems use an IdP:

  • OpenID Connect (OIDC) handles authentication: it helps establish who a user or service is, like a digital passport. section 11.3.2
  • OAuth 2.0 handles authorization: it supports delegated access to resources without exposing the user's password, like a valet key with limited privileges. section 11.3.2
Figure 11.3 The IdP issues the "Royal Seal" (JWT), which the API Gateway verifies to ensure the user is who they claim to be.

Follow the ticket: the IdP issues a token and the API gateway verifies it. section 11.3.2

Table 11.1 Selecting the Correct OAuth 2.0 Flow by Architectural Scenario
Scenario
Recommended OAuth 2.0 Flow
Key Characteristic
Human User logging into a web or mobile app.
Authorization Code Flow (with PKCE)
Redirects the user to a secure login page hosted by the IdP.
Backend Service talking to another service (Machine-to-Machine).
Client Credentials Flow
No humans are involved; the service uses its own ID and Secret to obtain a token.

Compare a human login using Authorization Code Flow with PKCE against a service obtaining a token through Client Credentials Flow. section 11.3.2

Place identity verification alongside other controls. In a Zero Trust design, internal requests are authenticated and authorized too; a token check at the gateway is not the only reinforced door. section 11.10 section 11.4

How Grokking Software Architecture covers it

How deep it goes
Defines IdP responsibilities, distinguishes OIDC from OAuth 2.0, and compares flows for human and machine-to-machine access.
Examples
Uses a digital passport and valet key as analogies, plus web or mobile login and backend service access as scenarios.
What you can do after
Evaluate identity-provider roles and select a suggested OAuth flow for human login or machine-to-machine access.
How it connects
Connects identity providers to API gateways, multi-factor authentication, Zero Trust, and defense in depth.

Also explained in

Compare how 14 books explain identity provider →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Software Architecture. The section links point to the parts of the book it draws on.