Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Replace auth enabled=y by y|n|CIDR and disabled #274

Closed
narcisgarcia opened this issue Apr 2, 2020 · 7 comments
Closed

Comments

@narcisgarcia
Copy link

I'm using Monitorix 3.10.1 from Debian repositories.

Currently HTTP password authentication is set ( /etc/monitorix/monitorix.conf ) with:
httpd_builtin -> auth -> enabled = y

But I need to not save clear passwords here:
emailreports -> url_prefix

To reach both securities (web authentication + not clear passwords on files), I need that authentication is not required for requests from localhost.
My proposal is to allow more values to "enabled" property and add "disabled" property:
enabled=y
enabled=n
enabled=CIDR address
disabled=y
disabled=n
disabled=CIDR address

With this, I could configure this setup:
enabled=y
disabled=192.168.0.0/16

@mikaku mikaku self-assigned this Apr 14, 2020
@mikaku
Copy link
Owner

mikaku commented Apr 14, 2020

I'm using Monitorix 3.10.1 from Debian repositories.

Consider upgrading to the latest version (3.12). Since buster Monitorix is available in the official Debian repositories.

My proposal is to allow more values to "enabled" property and add "disabled" property:
[...]

I think that the best approach would be to include two new options hosts_deny and hosts_allow inside the <auth> section. So you could easily define all your trusted hostnames and networks.

Does this sound reasonable to you?

@narcisgarcia
Copy link
Author

narcisgarcia commented Apr 15, 2020 via email

@mikaku
Copy link
Owner

mikaku commented Apr 15, 2020

Well, I was talking about something like this:

        <auth>
                hosts_deny = all
                hosts_allow = 127.0.0.1, 192.168.1.0/24
                enabled = y
                msg = Monitorix: Restricted access
                htpasswd = /var/lib/monitorix/htpasswd
        </auth>

(I think the example is self-explanatory)

Apart; I only see monitorix 3.10.1-1 in Debian Stable (buster) repositories.

You're right, I'm sorry I don't use Debian(-like) distributions.

Baptiste BEAUPLAT (the Monitorix package maintainer for Debian) told me that in order to update your current version you'll have to wait to the next stable version of Debian, or use the Izzy's alternate repository, or downloading manually the .deb file, etc.

Here the current versions of Monitorix in Debian:
https://packages.debian.org/search?keywords=monitorix

@narcisgarcia
Copy link
Author

narcisgarcia commented Apr 15, 2020 via email

@mikaku
Copy link
Owner

mikaku commented Apr 16, 2020

hosts_deny: Those hosts to require passowrd to
hosts_allow: Those hosts with open access (no password required)
enabled: If allowed hosts have authentication mechanism enabled.
msg: Message to present to "denied" hosts
htpasswd: Accounts to match with authentication required to "denied" hosts.

hosts_deny will be the list of hosts/networks that will require authentication.
hosts_allow will be the list of hosts/networks that won't require authentication (even when enabled = y).

The rest of options have not changed their meaning.

I hope things are cleared up now.

@mikaku
Copy link
Owner

mikaku commented May 21, 2020

Check the last update and let me know if it works for you.

mikaku added a commit that referenced this issue May 26, 2020
@mikaku
Copy link
Owner

mikaku commented Jun 4, 2020

Closing due to no response for two weeks.

If you still need more information, please add a comment and the issue can be reopened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants