quarkiverse / quarkus-logging-manager

Quarkus extension that allows you to view the log online and change log levels using a UI
Apache License 2.0
50 stars 16 forks source link

Authentication with bearer token #188

Open Demmtop opened 1 year ago

Demmtop commented 1 year ago

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?

phillip-kruger commented 1 year ago

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

Demmtop commented 1 year ago

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

phillip-kruger commented 1 year ago

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

Demmtop commented 1 year ago

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 commented 1 year ago

I have a solution for my starting problem. I added `

io.quarkus
<artifactId>quarkus-security</artifactId>

` Then i get a 403 Forrbidden exception for the logging-manager call's.

phillip-kruger commented 1 year ago

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

Demmtop commented 1 year ago

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