-
Notifications
You must be signed in to change notification settings - Fork 6k
Exceptions for Authorized Objects should propagate when returned from a Controller #16058
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
Open
Tracked by
#16057
Milestone
Comments
2 tasks
Hi, @jzheaux can you assign it to me? |
evgeniycheban
added a commit
to evgeniycheban/spring-security
that referenced
this issue
May 8, 2025
… a Controller Closes spring-projectsgh-16058 Signed-off-by: Evgeniy Cheban <mister.cheban@gmail.com>
evgeniycheban
added a commit
to evgeniycheban/spring-security
that referenced
this issue
May 8, 2025
… a Controller Closes spring-projectsgh-16058 Signed-off-by: Evgeniy Cheban <mister.cheban@gmail.com>
evgeniycheban
added a commit
to evgeniycheban/spring-security
that referenced
this issue
May 8, 2025
… a Controller Closes spring-projectsgh-16058 Signed-off-by: Evgeniy Cheban <mister.cheban@gmail.com>
evgeniycheban
added a commit
to evgeniycheban/spring-security
that referenced
this issue
May 8, 2025
… a Controller Closes spring-projectsgh-16058 Signed-off-by: Evgeniy Cheban <mister.cheban@gmail.com>
evgeniycheban
added a commit
to evgeniycheban/spring-security
that referenced
this issue
May 8, 2025
… a Controller Closes spring-projectsgh-16058 Signed-off-by: Evgeniy Cheban <mister.cheban@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using
@AuthorizeReturnObject
on a controller method like so:Any unhandled authorization failures are not propagated to the
ExceptionTranslationFilter
and instead result in a 500.Security currently supports using
@HandleAuthorizationDenied
to provide behavior like ignoring that field when the response is serialized. However, it would be helpful to be able to leverage the logic inExceptionTranslationFilter
, including calling any configuredAccessDeniedHandler
.One way to do this may be to provide an implementation of
AbstractView
that is used by a default exception handler. It would ideally have a similar effect to:but without applications needing to register it.
The text was updated successfully, but these errors were encountered: