shell2http icon indicating copy to clipboard operation
shell2http copied to clipboard

Add an healthcheck endpoint without authentication

Open ludopaquet opened this issue 1 year ago • 3 comments

It could be nice especially for k8s if we could expose a /healthcheck or /ping without httpauth in any case. For liveness/readiness probe.

Thanks !

ludopaquet avatar Oct 10 '24 10:10 ludopaquet

Hi @ludopaquet, installing the auth-check independently for each command is not available. I want to keep the utility as simple as possible. And setup auth per-command will complicate the interface too much. Alternatively there are two solutions:

  • disable global auth and check auth header inside shell-command where it needed
  • or add auth to the URL in k8s like: http://user:pass@host/healthcheck

msoap avatar Oct 10 '24 18:10 msoap

Understood. However, my intention is not to have auth per command but just one single point (like index) without auth in any case. Maybe I can propose a PR and you will decide if it's good for you or not ?

ludopaquet avatar Oct 11 '24 07:10 ludopaquet

here my PR: https://github.com/msoap/shell2http/pull/109

I could document and even make this path customizable from the command line if you want.

ludopaquet avatar Oct 11 '24 09:10 ludopaquet

Hi @ludopaquet, sorry for the later answer. i still think that а simplicity is more important, and adding a separate endpoint, the authentication on which will be different from the others and this cannot be changed - it's not what i want, and i don’t see how to fix this from an interface side

there is another possible solution, maybe not convenient:

  • remove global auth and add it to the shell scripts except /healthcheck

i hope for your understanding, thanks for contributing

msoap avatar Dec 30 '24 20:12 msoap

Hello, thx for your reply, we could do that indeed.

ludopaquet avatar Jan 03 '25 08:01 ludopaquet