quarkus-logging-manager icon indicating copy to clipboard operation
quarkus-logging-manager copied to clipboard

Authentication with bearer token

Open Demmtop opened this issue 2 years ago • 7 comments

My Rest service uses a bearer token for authentication. And in the Swagger UI I see the authentication button. Now I have included logging manager also in Swagger UI, but it is not showing any authentication button. Then when I make a rest call, I get the message "Authorization header was null". How can I configure the Logging Manager via the application.properties so that it also takes the Bearer Token?

Demmtop avatar Apr 13 '23 09:04 Demmtop

Does https://github.com/quarkiverse/quarkus-logging-manager#security and https://quarkus.io/guides/security-overview-concept#path-specific-authentication-mechanisms help ?

phillip-kruger avatar Apr 14 '23 00:04 phillip-kruger

Hi Philip, the links help me not really. I added following to the application.properties quarkus.http.auth.permission.bearer.paths=/q/logging-manager quarkus.http.auth.permission.bearer.policy=authenticated quarkus.http.auth.permission.bearer.auth-mechanism=bearer

I have the same effect. No authentication button in the Swagger UI. swagger

Demmtop avatar Apr 14 '23 12:04 Demmtop

I wonder if this is not a OpenApi issue, can you share a reproducer?

phillip-kruger avatar Apr 14 '23 12:04 phillip-kruger

Hi Philip, here a simple version of my rest service. And now I a have a problem. When I add the part in the applications.properties the server is not starting. When I delete the part than the server is starting and the logging-mananger rest call's doesn't need authentication. I don't know why my big rest service is running with the part in the application.properties. Smtp-Value-Rest.tar.gz

Demmtop avatar Apr 14 '23 13:04 Demmtop

I have a solution for my starting problem. I added <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-security</artifactId> </dependency> Then i get a 403 Forrbidden exception for the logging-manager call's.

Demmtop avatar Apr 14 '23 13:04 Demmtop

Just to double check. Do you still have an issue or are you solved ?

phillip-kruger avatar May 01 '23 08:05 phillip-kruger

I still have this issue. No auth button for type the bearer token.

Demmtop avatar May 04 '23 13:05 Demmtop