You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a multi-service setup, were rights definitions are managed by a single service. In order to avoid having this service directly queried by everyone every time a token is checked, the gateway can inject relevant information in the token itself, so that the receiving service can check the token in a self-contained way. The service can also use the received token to communicate with other services.
sequenceDiagram
Client->>Gateway: Request with regular token
Gateway-->>Gateway: Inject rights matrix in token
Gateway->>Service A: Request with enriched token
Service A->>Service B: Sub request with the same token (possibly attenuated)
Service B->>Service A: Response
Service A->>Gateway: Response
Gateway->>Client: Response
Loading
Example
Token sent by the client
user("user_1234");
Block injected by the gateway, signed with the gateway secret key
Context
In a multi-service setup, were rights definitions are managed by a single service. In order to avoid having this service directly queried by everyone every time a token is checked, the gateway can inject relevant information in the token itself, so that the receiving service can check the token in a self-contained way. The service can also use the received token to communicate with other services.
sequenceDiagram Client->>Gateway: Request with regular token Gateway-->>Gateway: Inject rights matrix in token Gateway->>Service A: Request with enriched token Service A->>Service B: Sub request with the same token (possibly attenuated) Service B->>Service A: Response Service A->>Gateway: Response Gateway->>Client: ResponseExample
Token sent by the client
Block injected by the gateway, signed with the gateway secret key
Authorizer used by the service
The service is able to trust the rights matrix provided by the gateway because the gateway has signed the block with its secret key.