-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
SecurityExceptions thrown in Panache Before/After Listeners result in Internal Server errors #35169
Comments
/cc @FroMage (panache), @loicmathieu (panache), @sberyozkin (security) |
Is this using Hibernate ORM, or Hibernate Reactive? This doesn't look like a Panache issue. Do you have a stack trace you could share please? |
Also, is this using RESTEasy Reactive or something else? Not sure who has the hand on those calls. |
|
So, it looks like io.qua.hib.orm.res.dat.pan.run.RestDataPanacheExceptionMapper should rethrow io.quarkus.security.Exceptions!? |
Hi! Any news on this? |
@gmuellerinform can you share a small reproducer? |
@gastaldi Hi! I created a repository for it: https://github.com/gmuellerinform/quarkus-security-exception-reproducer |
@gmuellerinform @FroMage I have a local branch that works when |
Sure, that would be great! |
…implementations - Fixes quarkusio#35169
@gmuellerinform please give it a try with https://github.com/gastaldi/quarkus/tree/rest_panache_catch, it's still missing the support for Hibernate Reactive, that's why I haven't sent a PR yet |
Do you have a link to a tutorial how to use quarkus from source? |
Build with |
I now get a different exception:
|
Can you throw a |
Doh, forgot. Now the test passes. Is there a way to supress the error log?
|
I usually do that by adding this to the application.properties: quarkus.log.category."org.jboss.resteasy.resteasy_jaxrs.i18n".level=OFF |
Hi! Any chance that those changes are merged soon? Would be great! Thanks! |
…implementations - Fixes quarkusio#35169
Describe the bug
Throwing an io.quarkus.security.ForbiddenException in onBeforeAdd listener results in an Internal Server error.
Expected behavior
The endpoint should return 403 with the message provided to the ForbiddenException
Actual behavior
A 500 response is sent.
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: