Get ahead
VMware offers training and certification to turbo-charge your progress.
Learn moreOn behalf of the community, I’m pleased to announce the release of Spring Security 5.2.0.M2! This release includes 100+ updates. You can find the highlights below:
PKCE isn’t just for native or browser-based apps, but for any time we want to have a public client. Spring Security 5.2 introduces a secure way for backends to authenticate as public clients.
JwtDecoderNimbusReactiveJwtDecoder to take a custom processorResource Server now supports a second OAuth 2.0 token verification strategy: Token Introspection. This is handy when a Resource Server wants to or must verify the token remotely.
With the introduction of AuthenticationManagerResolver, initial support for multi-tenant Resource Servers has arrived.
Key instancesSpring Security 5.2 simplifies converting X.509 and PKCS#8 key material into RSAPublicKey and RSAPrivateKey instances by registering Converter s to the ConversionService and PropertyEditor s to the PropertyEditorRegistry. You can see an example in the Resource Server static key sample.
AuthenticationManagerResolver@CurrentSecurityContext for method argumentsLike @AuthenticationPrincipal before it, @CurrentSecurityContext works with an argument resolver to retrieve aspects of the SecurityContext:
public String hello(@CurrentSecurityContext
SecurityContext context) {
return Optional.ofNullable(context.getAuthentication())
.map(Authentication::getName).orElse("world");
}
// or
public String hello(@CurrentSecurityContext
(expression="authentication.name") String name) {
return Optional.ofNullable(name).orElse("world");
}
CompositeHeaderWriter, as well as some other header-writing cleanup.