Exclude paths from security when using quarkus-oidc for application type service #50425
Replies: 5 comments 17 replies
-
/cc @pedroigor (oidc), @sberyozkin (oidc,security) |
Beta Was this translation helpful? Give feedback.
-
By removing RolesAllowed annotations from all the endpoints made the http auth permissions work |
Beta Was this translation helpful? Give feedback.
-
Sorry, is this the only solution?
|
Beta Was this translation helpful? Give feedback.
-
If you add a RolesAllowed annotation to any endpoint, the OIDC security runs before HTTP auth permissions, which makes every endpoint require a token (i.e., authentication). I haven’t found a way to make a non-authenticated endpoint while still using RolesAllowed. The best options seem to be either writing a custom annotation that checks user roles manually, or switching to the quarkus-keycloak-authorization extension, which allows unauthenticated access to public paths. Reopening the issue in case anyone has a better solution. @pedroigor @sberyozkin |
Beta Was this translation helpful? Give feedback.
-
@snow-diamond @Andrea-Lombardo-Eng Let me convert it to Discussion, thanks |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm having a problem using quarkus-oidc and making public paths work without needing a bearer token. Similar to issue #14001 which did not fix my problems.
I'm using quarkus-oidc and quarkus version 3.25.0.
Is it even possible to have paths that are excluded from the OIDC security and not require a bearer access token or am I doing something wrong?
Every time I call a public endpoint I get the following message in the console with a 401 response code
My endpoint:
Beta Was this translation helpful? Give feedback.
All reactions