In a microservice architecture, an API gateway typically authenticates users. The access token pattern carries user information, such as identity and roles, to invoked services: the gateway includes an access token, such as a JWT, in each request; each service validates the token and extracts the user information. section 7.6.2
Access token pattern
An authentication and authorization pattern in which a gateway passes a validated bearer token containing user information to invoked services.
How Microservices Patterns, Second Edition covers it
- How deep it goes
- Summarizes token passing, service-side validation, and information extraction without detailing their implementation.
- Examples
- Uses a JWT as an example of a token included in each service request.
- What it assumes
- Assumes an API gateway authenticates users in a microservice architecture.
- What you can do after
- Understand how a gateway propagates user information for invoked services to validate and extract.
- How it connects
- Connects API gateways, microservices, authentication, authorization, and JSON Web Tokens.
Related concepts
- patternkind of · A pattern is a reusable approach to solving a recurring problem within a particular context.
- API gatewayused by · An API gateway is a server-side intermediary that provides an entry point for client requests to backend APIs or services and routes or mediates those requests.
- patternkind of · A pattern is a recognizable or specified arrangement, sequence, or regularity among elements, observations, or behavior.
This explainer was generated by Manning's knowledge graph from the text of Microservices Patterns, Second Edition. The section links point to the parts of the book it draws on.
