liveBook · Manning

Introspection uri

As explained in Spring Security in Action, Second Edition

An introspection endpoint is an OAuth endpoint that accepts requests to validate a token and return its associated metadata.

An introspection URI lets a resource server ask an authorization server whether an access token is valid and retrieve metadata needed for authorization. section 15.5

Configure opaque-token validation with three values:

  • The authorization server’s introspection URI. section 15.3
  • The resource server client ID and secret, used to authenticate the introspection request. section 15.3
  • Spring Security’s opaqueToken() configuration, which connects the URI and credentials to the resource server. section 15.3

Spring Security configuration

Set introspectionUri, resourceServerClientID, and resourceServerSecret from properties, then pass them to opaqueToken(). Require authentication with anyRequest().authenticated(). section 15.3

Figure 15.6 Token introspection. In situations where the resource server cannot depend on signature-based validation of access tokens (such as when token revocation is necessary), or when the token does not contain detailed information (as with opaque tokens), the resource server is required to make inquiries to the authorization server. This is done to ascertain the validity of a token and to gather additional information about it.

Token introspection is required when tokens are opaque or when authorization-server revocation must be recognized, including for otherwise non-opaque tokens. section 15.3

How Spring Security in Action, Second Edition covers it

How deep it goes
Explains required properties and Spring Security wiring, but defers the introspection protocol’s response details.
Examples
Uses a localhost authorization server, a port-9090 resource server, client-credentials registration, and a protected /demo endpoint.
What it assumes
Assumes an authorization server exposing introspection and registered resource-server credentials, while demonstrating property injection and security configuration.
What you can do after
Configure Spring Security to authenticate requests through an authorization server’s introspection endpoint.
How it connects
Connects OAuth 2 resource servers, authorization servers, opaque tokens, JWTs, client credentials, and token revocation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spring Security in Action, Second Edition. The section links point to the parts of the book it draws on.