You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a HTTP request is rejected due to authentication/authorization reasons, the path templates for the micrometer metrics are not resolved correctly, e. g. path params are not replaced with their placeholder, but show the actual value in the metrics instead.
Find a small reproducer project in the "How to Reproduce" section.
Some debugging showed that in the error case the ObservabilityHandler is not called and thus the UrlPathTemplate is not set in the request context.
This is probably due to security filters rejecting the request before the handler chain reaches the ObservabilityHandler.
Note that I'm using resteasy-reactive here.
Expected behavior
All requests are resolved correctly, no matter what the response status is.
Actual behavior
401 and 403 status responses do not resolve correctly (there might be more).
The request to the unauthenticated endpoint /hello/{id} has been resolved correctly to its placeholder version.
The request to the denyAll endpoint /hello/authenticated/{id} has not been resolved and shows up with the actual id 123 instead of the placeholder {id}
Output of uname -a or ver
Linux robert-ThinkPad-T480 5.15.0-37-generic #39-Ubuntu SMP Wed Jun 1 19:16:45 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Output of java -version
openjdk version "17.0.3" 2022-04-19 OpenJDK Runtime Environment (build 17.0.3+7-Ubuntu-0ubuntu0.22.04.1) OpenJDK 64-Bit Server VM (build 17.0.3+7-Ubuntu-0ubuntu0.22.04.1, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.9.2
Build tool (ie. output of mvnw --version or gradlew --version)
Maven 3.8.4
Additional information
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
When a HTTP request is rejected due to authentication/authorization reasons, the path templates for the micrometer metrics are not resolved correctly, e. g. path params are not replaced with their placeholder, but show the actual value in the metrics instead.
Find a small reproducer project in the "How to Reproduce" section.
Some debugging showed that in the error case the ObservabilityHandler is not called and thus the
UrlPathTemplate
is not set in the request context.This is probably due to security filters rejecting the request before the handler chain reaches the ObservabilityHandler.
Note that I'm using resteasy-reactive here.
Expected behavior
All requests are resolved correctly, no matter what the response status is.
Actual behavior
401 and 403 status responses do not resolve correctly (there might be more).
How to Reproduce?
Reproducer project: https://github.com/pravussum/code-with-quarkus-unauth-metering
The metrics will show something like this:
The request to the unauthenticated endpoint
/hello/{id}
has been resolved correctly to its placeholder version.The request to the denyAll endpoint
/hello/authenticated/{id}
has not been resolved and shows up with the actual id123
instead of the placeholder{id}
Output of
uname -a
orver
Linux robert-ThinkPad-T480 5.15.0-37-generic #39-Ubuntu SMP Wed Jun 1 19:16:45 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
openjdk version "17.0.3" 2022-04-19 OpenJDK Runtime Environment (build 17.0.3+7-Ubuntu-0ubuntu0.22.04.1) OpenJDK 64-Bit Server VM (build 17.0.3+7-Ubuntu-0ubuntu0.22.04.1, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.9.2
Build tool (ie. output of
mvnw --version
orgradlew --version
)Maven 3.8.4
Additional information
No response
The text was updated successfully, but these errors were encountered: