-
Notifications
You must be signed in to change notification settings - Fork 168
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
spring-security breaks Vaadin session serialization #18458
Labels
Comments
It looks like a bug in We should probably remove the |
mcollovati
added a commit
that referenced
this issue
Jan 15, 2024
For parameters with Lazy annotation, Spring generates a not-serializable proxy. Since some security beans are used inside Flow listeners, they should be fully serializable (or defined transient, if possible). This change removes the unnecessary Lazy annotaions, moving the lazy evaluation to VaadinWebSecurity. Fixes #18458
9 tasks
tltv
pushed a commit
that referenced
this issue
Jan 22, 2024
* fix: remove Lazy annotation from Flow security beans For parameters with Lazy annotation, Spring generates a not-serializable proxy. Since some security beans are used inside Flow listeners, they should be fully serializable (or defined transient, if possible). This change removes the unnecessary Lazy annotaions, moving the lazy evaluation to VaadinWebSecurity. Fixes #18458 * Apply suggestions from code review Co-authored-by: Peter Czuczor <61667986+czp13@users.noreply.github.com> * set proxyBeanMethods to false * use try-with-resource for serialization/deserialization --------- Co-authored-by: Peter Czuczor <61667986+czp13@users.noreply.github.com>
vaadin-bot
pushed a commit
that referenced
this issue
Jan 22, 2024
* fix: remove Lazy annotation from Flow security beans For parameters with Lazy annotation, Spring generates a not-serializable proxy. Since some security beans are used inside Flow listeners, they should be fully serializable (or defined transient, if possible). This change removes the unnecessary Lazy annotaions, moving the lazy evaluation to VaadinWebSecurity. Fixes #18458 * Apply suggestions from code review Co-authored-by: Peter Czuczor <61667986+czp13@users.noreply.github.com> * set proxyBeanMethods to false * use try-with-resource for serialization/deserialization --------- Co-authored-by: Peter Czuczor <61667986+czp13@users.noreply.github.com>
vaadin-bot
added a commit
that referenced
this issue
Jan 22, 2024
* fix: remove Lazy annotation from Flow security beans For parameters with Lazy annotation, Spring generates a not-serializable proxy. Since some security beans are used inside Flow listeners, they should be fully serializable (or defined transient, if possible). This change removes the unnecessary Lazy annotaions, moving the lazy evaluation to VaadinWebSecurity. Fixes #18458 * Apply suggestions from code review * set proxyBeanMethods to false * use try-with-resource for serialization/deserialization --------- Co-authored-by: Marco Collovati <marco@vaadin.com> Co-authored-by: Peter Czuczor <61667986+czp13@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of the bug
Given a minimal Vaadin starter project, adding and configuring spring-security as documented here https://vaadin.com/docs/latest/security/enabling-security makes the Vaadin session no longer serializable.
Expected behavior
The Vaadin session should stay serializable.
Minimal reproducible example
Start the attached project, navigating to localhost:8080 already produces the serialization exception.
Versions
Reproduced on Vaadin 24.3.2, jdk17, spring-boot 3.2.1 . See attached minmal project
The text was updated successfully, but these errors were encountered: