Is there a way to exclude some paths from the Quarkus OIDC verification

1.1k Views Asked by At

I'm using the quarkus-oidc component to enforce the JWT token validation in calls to a microservice.

The point is there are some paths (/api/public/*) that can be invoked publicly (without needing an Authorization: Bearer JWT).

Is there a way to exclude paths from the token verification?

1

There are 1 best solutions below

3
On

Based on the documentation you can disable authorization for select paths like this:

quarkus.http.auth.permission.permit1.paths=/api/public/*
quarkus.http.auth.permission.permit1.methods=GET,HEAD
quarkus.http.auth.permission.permit1.policy=permit