louislam / uptime-kuma

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

Password protected Status Page #1756

Closed uncappedshady closed 7 months ago

uncappedshady commented 2 years ago

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

🏷️ Feature Request Type

UI Feature

🔖 Feature description

Require the ability to password protect a status page.

✔️ Solution

When I visit a specific status page, it should prompt me to enter a username and a password and only display the status page once correct credentials has been entered.

❓ Alternatives

No response

📝 Additional Context

No response

Computroniks commented 2 years ago

Status pages are inherintly public. If you want it so only you can access the information then you can just leave them on the dashboard and not create a status page. However, this won't work if you only want access from within your organization. In cases like this, you could look at using Authelia to provide your authentication.

madroots commented 2 years ago

you can just do it within nginx reverse proxy, if you have one.

check uptime kuma instructions for setting up nginx config, use "location" parameter to define your status page url and add this: auth_basic "Restricted Content"; auth_basic_user_file /etc/nginx/.htpasswd;

You can find guide on this and on how to create user and pass - check here official nginx docs.

shakalandy commented 1 year ago

Would be cool to have this one, use-case:

Having 10+ Status Pages with different "folders" per Customer/Team it would be cool to have an optional pw protection within uptime-kuma per Folder/Team.

Would this be possible with Authelia as well @Computroniks? thanks!

cheesepaulo commented 1 year ago

I Found a way here, not the best but for my needs works fine.

I have a need to make all my status page private. No need for alter database or other UI things just protect the pages with login.

Here is the code that renders the StatusPages.

Before that code add a simple modification for redirect to / when user is not logged_in.

if (!this.hasToken) this.$router.push("/");

Just fork the project, adjust, make the build and be happy.

tahaipek commented 1 year ago

@cheesepaulo Thanks for the advice. 👍👍👍

CommanderStorm commented 1 year ago

@uncappedshady I think this is a duplicate of https://github.com/louislam/uptime-kuma/issues/1401 If you agree please close this issue, as issue-management is harder with zombies hanging around. If you disagree, what is the difference?

CommanderStorm commented 7 months ago

Closing as duplicate of https://github.com/louislam/uptime-kuma/issues/1401