You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
grafana: anonymous access is enabled by default with no variable to disable it, and the template overwrites any manual change #782
There is no Pigsty variable to change this. roles/infra/defaults/main.yml exposes eight grafana_* settings (grafana_enabled, grafana_port, grafana_clean, grafana_admin_username, grafana_admin_password, grafana_auth_proxy, grafana_pgurl, grafana_view_password) and none of them covers anonymous access — grep -c anonymous roles/infra/defaults/main.yml returns 0.
The consequence is that every dashboard is readable without any login by anyone who can reach port 3000: metrics, database names, table names, slow query samples. It also makes grafana_view_password pointless, since nobody needs to authenticate to view the data it is meant to protect.
Editing /etc/grafana/grafana.ini on the node does not help: the file is rendered from the template, so the change is silently reverted on the next ./infra.yml -t grafana_config — and after any Pigsty upgrade. The only way to make it stick today is to patch the template itself, which has to be re-applied on every version bump.
Why this is worth a variable
In #326 ("How to protect the infra portal from the public"), the maintainer already recommends exactly this:
you can revoke Viewer privileges from anonymous to prevent them access any info
The advice is sound, but Pigsty currently offers no supported way to apply it persistently. This issue is not asking to change the default — only to make the documented recommendation expressible in the inventory.
Operators who expose Grafana on a shared or semi-trusted network can then set grafana_anonymous_enabled: false in their inventory, and the setting survives replays and upgrades.
A stricter default (false) would arguably be the safer choice for a monitoring stack that ships with a well-known admin password, but that is a separate decision — this request is only about making the value configurable.
Activity