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













