Security roles checked after constraints validation with quarkus-resteasy-reactive
See original GitHub issueDescribe the bug
I noticed something weird while migrating a project from quarkus-resteasy
to quarkus-resteasy-reactive
:
- with
quarkus-resteasy
, security roles are checked before constraints validation when the request content type is JSON - with
quarkus-resteasy-reactive
, security roles are checked after constraints validation when the request content type is JSON
There’s no difference between the two extensions when the content type is text.
Expected behavior
I would expect the same behavior with both versions of quarkus-resteasy*
.
Actual behavior
Different behavior.
To Reproduce
https://github.com/gwenneg/quarkus-resteasy-reactive-security
It contains two folders with the exact same code with one exception: the quarkus-resteasy*
dependency.
Steps to reproduce the behavior:
cd quarkus-resteasy
./mvnw clean test
> BUILD SUCCESScd quarkus-resteasy-reactive
./mvnw clean test
> BUILD FAILURE
Environment (please complete the following information):
Output of java -version
openjdk version "11.0.9.1" 2020-11-04
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.9.1+1)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.9.1+1, mixed mode)
Quarkus version or git rev
1.13.3.Final
Build tool (ie. output of mvnw --version
or gradlew --version
)
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Issue Analytics
- State:
- Created 2 years ago
- Comments:18 (17 by maintainers)
Top Results From Across the Web
Writing REST Services with RESTEasy Reactive - Quarkus
This is the reference guide for RESTEasy Reactive. For a more lightweight introduction, please refer to the Writing JSON REST services ...
Read more >Validation with Hibernate Validator - Quarkus
Constraints are added on fields, and when an object is validated, the values are checked. The getter and setter methods are also used...
Read more >All configuration options - Quarkus
AWS Lambda Type Default
AWS Lambda Common Type Default
AWS Lambda Gateway REST API Type Default
Agroal ‑ Database connection pool Type Default
Read more >Quarkus Security overview
The Quarkus quarkus-oidc extension provides a reactive, interoperable, multitenant-enabled OIDC adapter that supports Bearer Token and Authorization Code Flow ...
Read more >Built-In Authentication Support - Quarkus
For example, one can add new roles after checking a client certificate ... By default, the authentication security constraints are enforced before the ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I wonder if it makes sense to this sort of thing with other kinds of interceptors as well - like Caching for example
Hey @geoand Enjoy the long weekend, I thought it was a JAX-RS filter but it is a CDI interceptor