Skip to content

Commit

Permalink
Document how to log auth failures in RESTEasy Reactive
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvavrik committed Nov 11, 2023
1 parent 43b68c1 commit bc14dcf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/src/main/asciidoc/resteasy-reactive-migration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ public class ReactiveResource {
The same is true for your third-party libraries.
If they happen to depend on servlets you need to find a migration path for them.

Check warning on line 156 in docs/src/main/asciidoc/resteasy-reactive-migration.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.Fluff] Depending on the context, consider using 'Rewrite the sentence, or use 'must', instead of' rather than 'need to'. Raw Output: {"message": "[Quarkus.Fluff] Depending on the context, consider using 'Rewrite the sentence, or use 'must', instead of' rather than 'need to'.", "location": {"path": "docs/src/main/asciidoc/resteasy-reactive-migration.adoc", "range": {"start": {"line": 156, "column": 42}}}, "severity": "INFO"}

=== Log authentication and authorization failures

The RESTEasy Reactive endpoint security checks are performed before xref:cdi.adoc#interceptors[CDI interceptors] are invoked.
The safest approach to log Quarkus Security authentication exceptions is to ensure that proactive authentication is enabled and to use Vert.x HTTP route failure handlers.
For more information, see the xref:security-proactive-authentication.adoc#customize-auth-exception-responses[Customize authentication exception responses] section of the Proactive authentication guide.

== Client

The Reactive REST Client (`quarkus-rest-client-reactive` and its dependencies) replace the legacy `quarkus-rest-client` but leverage Quarkus' build time processing

Check warning on line 166 in docs/src/main/asciidoc/resteasy-reactive-migration.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsWarnings] Consider using 'use' rather than 'leverage' unless updating existing content that uses the term. Raw Output: {"message": "[Quarkus.TermsWarnings] Consider using 'use' rather than 'leverage' unless updating existing content that uses the term.", "location": {"path": "docs/src/main/asciidoc/resteasy-reactive-migration.adoc", "range": {"start": {"line": 166, "column": 125}}}, "severity": "WARNING"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public class HelloService {
}
----

[[customize-auth-exception-responses]]
== Customize authentication exception responses

You can use Jakarta REST `ExceptionMapper` to capture Quarkus Security authentication exceptions such as `io.quarkus.security.AuthenticationFailedException`, for example:
Expand Down

0 comments on commit bc14dcf

Please sign in to comment.