JWT access token authorization flow in jEAP Security
The following diagram shows the flow of an authorization against an OAuth2 access token in jEAP Security.
- An HTTP request with a JWT bearer token in the HTTP
Authorizationheader arrives. - The token is processed according to the jEAP Security configuration that the application has set up for the
specific issuer of the token (
issclaim), e.g. the configuration for Keycloak vs. the configuration for the B2B gateway (see Integrating different authorization servers). - The token is decoded by a
JwtDecoderconfigured for the issuer, and its timestamp, signature, audience and context are validated. - The claims of the token are transformed by the claim set converter configured for the issuer.
- The
JwtDecodercreates aJwtinstance from the (transformed) token. - The
JeapAuthenticationConvertercreates a jEAP-specific Spring Security token authentication (JeapAuthenticationToken) from theJwt. The authorities of the authentication are derived from the roles of the authentication by a configurable authorities resolver. - The authorization check then takes place on the basis of the created authentication. jEAP supports three different ways of interpreting the authentication for authorization: semantic roles, simple roles and authorities.
PlantUML diagram (waiting to render)
Related
- Authentication and authorization — the overview of authentication and authorization in jEAP: authentication contexts, functional and data authorization, OpenID Connect and OAuth2.
- Authentication and authorization for REST APIs — integrating jEAP Security into a REST API.
- Integrating different authorization servers — per-issuer configuration and claim set converters.
- Tokens in the Blueprint Microservice — the claims jEAP Security expects in a token.
- Role concept in the Blueprint Microservice — simple roles, semantic roles and authorities.
- Authorization with semantic roles
- Authorization with simple roles
- Authorization with authorities