liveBook · Manning

JSON Web Token

As explained in Effective Platform Engineering

A JSON Web Token is a compact, signed token format for conveying claims between parties.

A JSON Web Token (JWT) is a compact, signed token for conveying claims between parties. In a platform login flow, it can carry a user’s identity and team membership so services receive the authorization data they need after authentication. section 4.3.3 section 7.3.2

Keep the identity provider (IDP) between the user and the source of authorization data, rather than making it the source of truth. Configure its authorization server to retrieve user attributes and include the relevant claims in the login result. Team membership is one possible permission boundary, not the only one. section 4.3.3

Team access from a CLI

A developer starts authentication in a terminal, completes the browser step through GitHub, and grants device authorization. The IDP uses the resulting GitHub access token to request the developer’s organization teams, then creates a verifiable JWT containing an ID token with that team list as a claim. A refresh token can also be included. section 7.3.2

Figure 7.9 In this authentication and authorization flow, the IDP acts just as a secure go-between. The user must authenticate through GitHub and grant their device authorization to receive a JSON Web Token.
A screenshot of a computer

AI-generated content may be incorrect.

Follow the division of work between the CLI, GitHub and the IDP: the IDP acts as a secure go-between before the user receives a JWT. section 7.3.2

For a repeatable implementation, configure the GitHub OAuth application and automate the Auth0 application configuration used by the CLI. Prefer an integrable OpenID Connect approach over tools that require tickets and manual role assignment: the token is useful only if obtaining the right claims remains a workable self-service experience. section 4.3.3 section 7.3.2

How Effective Platform Engineering covers it

How deep it goes
Works through claim sourcing and a device-authorization flow, but does not detail JWT format or verification internals.
Examples
Uses a GitHub-authenticated CLI flow and an Auth0 configuration exercise that adds GitHub teams to a verifiable JWT.
What it assumes
Assumes familiarity with terminal-based platform access and GitHub organizations while explaining why the device-authorization flow fits a CLI.
What you can do after
Apply it via GitHub and Auth0 to produce a verifiable JWT containing a user’s team membership after authentication.
How it connects
Connects JWTs to OpenID Connect, identity providers, authorization claims, team membership and OAuth 2.0 device authorization.

Also explained in

Compare how 11 books explain JSON Web Token →

Related concepts

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