-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow configuration of Jackson default typing #1330
Comments
@jameskleeh given the following Micronaut client.
and the
and enabled
I get an error when serializing the request.
It seems that Micronauts Jackson serializers are not ready for |
@saw303 please share |
Added defaultTyping configuration for Jackson.
@puneetbehl Added the |
Verify that configuration option for Jackson's defaultTyping is correctly converted and set on ObjectMapper.
Removed the tests related to verify the behaviour of Jackson as they just add time it takes Micronaut to build.
@puneetbehl sorry for answering late. Putting annotation on classes is no option to me since they are part of another JAR that does not know Jackson/JSON at all. |
I'm still getting this error in
same as OP |
Also the changes in 0d17b85 expose some configuration to enable default typing (useful for me), which itself warns of a deserialisation security risk and subsequent RCE. Is allowing this configuration via environment variables safe? If an attacker can set an environment variable they can then enable an insecure configuration that then exposes even a properly configured instance (as environment variables override standard configuration..). |
Additional (late) note: Jackson 2.10.0 introduces new method, FasterXML/jackson-databind#2195 for some more information. I would not recommend exposing existing "enableDefaultTyping()" if exposed to untrusted content, as per: https://medium.com/@cowtowncoder/on-jackson-cves-dont-panic-here-is-what-you-need-to-know-54cd0d6e8062 |
When using working on a Java JSON API that using polymorphism or inheritance Jackson requires some sort of discriminator to deserialize the JSON string back into the Java types.
That feature can be enabled by calling
com.fasterxml.jackson.databind.ObjectMapper#enableDefaultTyping()
Please provide a way to enable this without writing a custom BeanCreatedEventListener.
The text was updated successfully, but these errors were encountered: