You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jackson serialization of DefaultSaml2AuthenticatedPrincipal doesn't work anymore since Spring Boot 2.7.3.
An exception is thrown:
Caused by: com.fasterxml.jackson.databind.JsonMappingException: The class with org.springframework.util.LinkedMultiValueMap and name of org.springframework.util.LinkedMultiValueMap is not in the allowlist.
To Reproduce
Setup a Jackson object mapper like that
val springSecurityObjectMapper:JsonMapper= jacksonMapperBuilder()
.addModules(SecurityJackson2Modules.getModules(Companion::class.java.classLoader))
Then try to use the mapper to serialize an Authentication containing a DefaultSaml2AuthenticatedPrincipal constructed by OpenSaml4AuthenticationProvider.