Skip to content
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's impersonation does not work on Vaadin #20495

Open
tbee opened this issue Nov 18, 2024 · 2 comments
Open

Spring's impersonation does not work on Vaadin #20495

tbee opened this issue Nov 18, 2024 · 2 comments

Comments

@tbee
Copy link

tbee commented Nov 18, 2024

Description of the bug

Spring offers a default way of an administrator impersonating a regular user. This seems not to work on Vaadin-on-Spring because Authorization seems not to be setup yet in the start-impersonating request. More here https://vaadin.com/forum/t/how-to-do-impersonation-using-spring-security/167804

Expected behavior

Well, it should work 😄

Minimal reproducible example

On a Vaadin-on-Spring application with Spring security and login enabled: configure the SwitchUserServlet as per one of the many examples, preferable on GET (which makes test easier) and attempt an impersonation. Probably VaadinAwareSecurityContextHolderStrategy should be set as the strategy on the filter (but won't fix the problem).

https://stackoverflow.com/questions/72378146/user-impersonation-with-spring-security

Versions

  • Vaadin / Flow version: 24.5.4
  • Java version: 21
  • OS version: not relevant
  • Browser version (if applicable): not relevant
  • Application Server (if applicable): not relevant
  • IDE (if applicable): not relevant
@mshabarov
Copy link
Contributor

This sounds to me more like an enhancement, however, we have to double check our integration with Spring Security, maybe there is something blocking this feature to work.

@tbee
Copy link
Author

tbee commented Nov 19, 2024

Assuming the integration with Spring security is supposed to encompass all standard functionality, than this should be supported IMHO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🔎 Investigation
Status: 🅿️Parking lot - under consideration
Development

No branches or pull requests

2 participants