<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Oauth2 on Devops Monk</title><link>https://devops-monk.com/tags/oauth2/</link><description>Recent content in Oauth2 on Devops Monk</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 03 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://devops-monk.com/tags/oauth2/index.xml" rel="self" type="application/rss+xml"/><item><title>OAuth2 Resource Server: Validate JWTs from an Auth Provider</title><link>https://devops-monk.com/tutorials/spring-boot/spring-security-oauth2-resource-server/</link><pubDate>Sun, 03 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/tutorials/spring-boot/spring-security-oauth2-resource-server/</guid><description>In production, you rarely build your own auth server. You use an external provider — Keycloak, Auth0, Okta, or AWS Cognito. This article shows how to configure Spring Boot as a Resource Server that validates JWTs issued by any OIDC-compliant provider.
The OAuth2 Architecture ┌─────────────────┐ │ Auth Server │ │ (Keycloak/Auth0) │ │ │ │ Issues JWTs │ │ Publishes JWKS │ └────────┬────────┘ │ ┌────────────┐ │ JWT │ Client │──────────►│ │ (Browser/ │ │ │ Mobile) │ │ └────────────┘ ▼ ┌─────────────────┐ Bearer │ Resource Server │ Token ►│ (Spring Boot) │ │ │ │ Validates JWT │ │ via JWKS URI │ └─────────────────┘ Client authenticates with the Auth Server and receives a JWT Client sends the JWT as Authorization: Bearer &amp;lt;token&amp;gt; to the Resource Server Resource Server validates the JWT by fetching the public key from the Auth Server&amp;rsquo;s JWKS endpoint If valid, the Resource Server processes the request Setup &amp;lt;dependency&amp;gt; &amp;lt;groupId&amp;gt;org.</description></item><item><title>Spring Boot OAuth2 + JWT: End-to-End Zero-Trust API Security</title><link>https://devops-monk.com/2026/05/spring-boot-oauth2-jwt-security/</link><pubDate>Sun, 03 May 2026 00:00:00 +0000</pubDate><guid>https://devops-monk.com/2026/05/spring-boot-oauth2-jwt-security/</guid><description>Zero-trust API security means every request is validated independently — no session state, no &amp;ldquo;trusted network&amp;rdquo; assumptions. A JWT bearer token is issued by an authorisation server, signed cryptographically, and validated on every API call. The API never calls back to the authorisation server during validation; it verifies the token&amp;rsquo;s signature locally.
This guide covers the complete setup: dependencies, resource server configuration, token validation (both symmetric and asymmetric), extracting claims, role-based access control, method-level security, and the Spring Security 7 changes that break existing setups.</description></item></channel></rss>