-
Notifications
You must be signed in to change notification settings - Fork 6k
Allow java.lang.Long in whitelist for Jackson security #12294
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
Comments
Hello!
It works fine for me. |
I've added PR, which would fix this issue #12584 |
I think that this is related to spring-projects/spring-session#2227 |
@marcusdacoregio Yep, it is |
Hi @mvitz, which version of Spring Security and Spring Session are you using? |
I think I was playing around with Spring Boot 3.0.0 which would resolve to:
|
After upgrading to Boot 3.0.2 (including 6.0.1) the same exception keeps occuring. |
The same issue it happens using
|
I don't know if collaborators team will be accept any pull request to solve it, but, we can implement our own RowMapper to solve it directly: https://stackoverflow.com/questions/72413823/spring-authorization-server-use-exit-model-for-user This approach is elegant because we can map other classes such as a custom UserDetails. |
Hi everyone, since this is an issue that is related to Spring Session, I'll close this as superseded by spring-projects/spring-session#2305. I'll prioritize that issue for the next minor release in Spring Session, so please subscribe to it and try the solution when it is out. |
Expected Behavior
When using
spring-security-oauth2-client
in combination withspring-session-data-redis
and enabling JSON serializing viathe session should be successfully deserialized when containing a type of
java.lang.Long
.Current Behavior
The deserialization fails with the exception:
Context
At least our Okta returns a claim
ver
with ajava.lang.Long
of1
. When persisting the spring-security session with spring-session as JSON within redis this is serialized asand can not be deserialized because
java.lang.Long
is not within the allow list.As a workaround, I can fall back to storing the session not as JSON.
The text was updated successfully, but these errors were encountered: