gatus icon indicating copy to clipboard operation
gatus copied to clipboard

Add "username" and "password" as optional Oauth 2.0 authentication

Open Oscar-Ruiz-R-Mojix opened this issue 3 years ago • 4 comments

Describe the feature request

Hi! It would be really useful to be able to add in the client side yaml config file an option to add username and password. This because some web services rely on that data to create a special token. It could be something like: endpoints: - name: "/webservice/endpoint" url: "https://some-url/" client: oauth2: token-url: https://auth.com/protocol/openid-connect/token client-id: something-client client-secret: something-password scopes: ["scope"] interval: 5m group: Web Service conditions: - "[STATUS] == 200"

Why do you personally want this feature to be implemented?

There are a lot of companies that want to check their services, and implement extra token information that needs to be created with a username and password. Like Keycloak for instance.

How long have you been using this project?

2 months

Additional information

No response

Oscar-Ruiz-R-Mojix avatar Sep 09 '22 19:09 Oscar-Ruiz-R-Mojix

Hello, I also agree. It is very valuable and important. When I trying to configure Nifi API monitoring with Gatus using Oauth2 client, I get an error from the Nifi server. 2022-09-11 16:26:56,360 DEBUG [NiFi Web Server-17] o.a.n.w.s.l.RequestAuthenticationFilter Username not found Remote Address [127.0.0.1] This problem could be solved by passing Username for the Nifi server.

ekb100500 avatar Sep 11 '22 14:09 ekb100500

Could you expand on what kind of configuration you'd like to see? The example you provided has no username/passwore fields.

TwiN avatar Sep 13 '22 05:09 TwiN

Hi! So I was thinking if it could be added as an optional option inside oauth2. Like this. - name: "/some/endpoint/{id}" url: "https://some-url.com/" client: oauth2: token-url: https://some-auth-url.com/openid-connect/token client-id: client-id client-secret: some-secret scopes: ["scope"] username: [email protected] password: some-password interval: 5m group: Web Service conditions: - "[STATUS] == 200"

Oscar-Ruiz-R-Mojix avatar Sep 13 '22 19:09 Oscar-Ruiz-R-Mojix

So what you really want is OAuth2 password grant? Yeah, that sounds like a reasonable idea.

TwiN avatar Sep 14 '22 23:09 TwiN