louislam / uptime-kuma

A fancy self-hosted monitoring tool
https://uptime.kuma.pet
MIT License
59.75k stars 5.34k forks source link

Add Kerberos Authentication method for monitor #3803

Open TheSpanner opened 1 year ago

TheSpanner commented 1 year ago

⚠️ Please verify that this feature request has NOT been suggested before.

🏷️ Feature Request Type

Other

🔖 Feature description

Could you add Kerberos Authentication to the methods list - NTLM auth is blocked in many environments now-a-days

✔️ Solution

In my environment, ALL basic auth + NTLM auth has been disabled, and certain applications only support Kerberos. The feature would be similar to the NTLM feature request

❓ Alternatives

I see there are a couple of node libraries available - I just can't comment on which is best for kuma

📝 Additional Context

trying to use NTLM returns 401 in my environment

CommanderStorm commented 1 year ago

We would be happy to review a pull request for such an auth-provider. We have made the experience, that PRs from external users are better for such specific needs.

See our contribution guide: https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md

Have you tried the SPNEGO token (whatever that is) mentioned in this issue https://stackoverflow.com/questions/53733317/how-do-i-use-negotiate-or-kerberos-authentication-with-axios

TheSpanner commented 1 year ago

I haven't successfuly been able to get Axios to use kerberos auth/negotiation, however, I did get a successful HTTP200 using node-expose-sspi library (https://github.com/jlguenego/node-expose-sspi/blob/master/doc/use-case/client.md)


const { sso } = require('node-expose-sspi');

(async () => {
  try {
    const response = await new sso.Client().fetch('https://kerbsite.local.net');

    const body = await response.text();
    console.log(body);
    console.log(await response.status);

  } catch (e) {
    console.error(e);
  }
})();

My node + vue programming is non-existant, but will tinker around