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

@EnableMethodSecurity doesn't resolve annotations on interfaces through a Proxy #11177

Merged
merged 1 commit into from
May 3, 2022

Conversation

evgeniycheban
Copy link
Contributor

@EnableMethodSecurity doesn't resolve annotations on interfaces through a Proxy

Removed proxy unwrapping in case of resolving Method Security annotations,
this cause an issue when interfaces which are implemented by the proxy was skipped,
resulting in a missing security checks on those methods.

Closes gh-11175

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 29, 2022
@rwinch rwinch self-requested a review May 2, 2022 20:59
@rwinch
Copy link
Member

rwinch commented May 2, 2022

Thank you for the PR @evgeniycheban Can you please add some tests that would fail without the changes you have made and pass once the changes you made are merged?

@rwinch rwinch added status: waiting-for-feedback We need additional information before we can continue and removed status: waiting-for-triage An issue we've not yet triaged labels May 2, 2022
@rwinch rwinch self-assigned this May 2, 2022
…interfaces through a Proxy

Removed proxy unwrapping in case of resolving Method Security annotations,
this cause an issue when interfaces which are implemented by the proxy was skipped,
resulting in a missing security checks on those methods.

Closes spring-projectsgh-11175
@evgeniycheban
Copy link
Contributor Author

evgeniycheban commented May 3, 2022

@rwinch I've added tests for @Secured and @PreAuthorize annotations that cover these changes.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels May 3, 2022
@rwinch rwinch added in: core An issue in spring-security-core type: bug A general bug and removed status: feedback-provided Feedback has been provided labels May 3, 2022
@rwinch rwinch merged commit 9193e46 into spring-projects:main May 3, 2022
@rwinch rwinch added this to the 5.7.0 milestone May 3, 2022
@rwinch
Copy link
Member

rwinch commented May 3, 2022

Thanks for the quick updates @evgeniycheban This is now merged into main, 5.8.x, and 5.7.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core An issue in spring-security-core type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@EnableMethodSecurity does not resolve @PreAuthorize on interfaces
3 participants