Skip to main content

Passkeys and WebAuthn with Spring Security 7: Passwordless Login That Actually Works

Passkeys on Spring Security 7.1 and Spring Boot 4.1: the registration and authentication ceremonies, WebAuthnRelyingPartyOperations, and the one-time-token fallback that solves the bootstrap problem. Every transcript comes from a real run driven by a software authenticator — including the run that shows the signature counter being written on every login and compared against on none, user verification being optional by default, and a request for DIRECT attestation being satisfied by an authenticator that attests to nothing.

Method Security in Spring Security 7: @PreAuthorize, @PostAuthorize and the Proxy Traps

@PreAuthorize is advice on a proxy, and there are three ways a call reaches an annotated method without the check ever running — self-invocation, methods the proxy cannot override, and @PreFilter handed an immutable collection. A verified tour of Spring Security 7.1 method security: the full SpEL reference, filterObject, interceptor ordering against @Transactional, and the tests that catch a check that silently is not there. Every transcript comes from a runnable companion repository.

Spring Authorization Server: Running Your Own OAuth2 / OIDC Provider (Spring Boot 4.1)

Building a real OAuth2 / OIDC provider on Spring Boot 4.1 with Spring Authorization Server 7.1: client registration, PKCE, a custom consent page and token customisation, across an authorization server, a relying party and a resource server. The 7.0 move into Spring Security deleted applyDefaultSecurity and relocated both configuration classes, and it flipped the requireProofKey default from false to true on the server and the client alike — verified by compiling against both versions of the jars. Every transcript comes from a run you can reproduce.

Spring Security OAuth2 Resource Server: JWT Validation, JWKS and Key Rotation

Spring Boot 4.1 and Spring Security 7.1 make a resource server one property long. That property does not validate the audience, cannot see Keycloak's roles, and caches the JWK Set in a way that decides whether a leaked signing key stops working in five minutes or never. Read from the sources, then measured: a retired key accepted indefinitely, and 25 bad tokens producing 25 JWKS fetches at the issuer.

Spring Security 7.1 JWT Authentication: The Complete Guide (Spring Boot 4.1)

A three-part guide to JWT authentication on Spring Security 7.1 and Spring Boot 4.1, written to be useful whether you have never issued a token or already run one in production. Part 1 starts from zero: what a token is, what is inside it, the two paths through the application, and the smallest configuration that verifies one. Part 2 opens the filter chain — writing the OncePerRequestFilter by hand, where it goes, what really decides 401 versus 403, why a permitAll() login endpoint still returns 403 with CSRF on, and how to choose a signing algorithm. Part 3 is everything the defaults do not check.

Spring AI 1.x to 2.0: The Migration Guide (What Breaks, and What Breaks Silently)

A complete Spring AI 1.x to 2.0 migration guide, verified against Spring AI 2.0.0 on Spring Boot 4.1. Boot 4 is mandatory and Jackson moves to 3. internalToolExecutionEnabled and toolNames are removed outright, not renamed. Chat memory becomes stricter: 2.0 removes the remaining default-ID and builder-based configuration paths, while explicit per-request conversation IDs — introduced during the 1.x line — become the only safe migration target. Plus the changes that produce no compile error at all.

Spring gRPC with Spring Boot 4: A First-Class Starter, and the Failures Nobody Warns You About

Spring Boot 4 promotes gRPC to a first-class starter. A beginner-to-advanced guide: all four call types, then the failures whose error messages point somewhere other than their cause — the 4 MB limit and which side enforces it, the absent default deadline, cancellation that never interrupts your thread, UNKNOWN statuses, and the in-process test transport that cannot enforce message size limits at all.

Exactly-Once with Spring Kafka on Boot 4: Idempotent Producers and Transactions

A beginner-to-advanced guide to exactly-once semantics with Spring Kafka on Spring Boot 4.1 — idempotent producers, transactions, and read-process-write. Verified against a live broker: the acks=1 setting that silently disables idempotence, the transaction markers that break offset arithmetic (but not consumer lag), the random transactional.id that defeats fencing entirely, the database boundary Kafka cannot cross, and what a transaction actually costs.