Skip to content

monitoring: harden Grafana and keep non-P2P ports local - #507

Merged
OisinKyne merged 5 commits into
mainfrom
oisin/grafana-hardening
Oct 26, 2026
Merged

OisinKyne merged 5 commits into
mainfrom
oisin/grafana-hardening

Conversation

@OisinKyne

Copy link
Copy Markdown
Contributor

Grafana granted anonymous users the Admin role and was published on all interfaces, which Docker exposes past host firewalls such as ufw. It is now published on 127.0.0.1, read-only for anonymous users, without password logins or plugin installs, on its own monitoring network, and runs non-root from a fresh named volume. The legacy Lighthouse metrics port now binds to 127.0.0.1, and Alloy in logging.yml reads container logs via a read-only Docker socket proxy instead of mounting the socket.

Adds grafana/security-check.sh for upgraders, a CI check that only P2P ports default to all interfaces, and a README security section.

Grafana granted anonymous users the Admin role and was published on all
interfaces, which Docker exposes past host firewalls such as ufw. It is
now published on 127.0.0.1, read-only for anonymous users, without
password logins or plugin installs, on its own monitoring network, and
runs non-root from a fresh named volume. The legacy Lighthouse metrics
port now binds to 127.0.0.1, and Alloy in logging.yml reads container
logs via a read-only Docker socket proxy instead of mounting the socket.

Adds grafana/security-check.sh for upgraders, a CI check that only P2P
ports default to all interfaces, and a README security section.
Comment thread .github/workflows/test.yml Fixed
Comment thread .github/workflows/test.yml Fixed
Alloy's Docker discovery calls GET /networks, which the proxy refused
with only CONTAINERS enabled, so Alloy found no containers and shipped
no logs.
…ript

Use [[ ]] tests and an explicit return in security-check.sh, split the
per-port logic out of check_ports, and install PyYAML from wheels only.
Comment thread .github/workflows/test.yml Fixed
@sonarqubecloud

Copy link
Copy Markdown

@OisinKyne
OisinKyne merged commit 09df71b into main Oct 26, 2026
6 checks passed
@OisinKyne
OisinKyne deleted the oisin/grafana-hardening branch October 26, 2026 14:22
OisinKyne added a commit that referenced this pull request Oct 26, 2026
…507) (#509)

Grafana is published on 127.0.0.1, read-only for anonymous users,
without password logins or plugin installs, on its own monitoring
network, and runs non-root from a fresh named volume. The legacy
Lighthouse metrics port binds to 127.0.0.1, and Alloy in logging.yml
reads container logs via a read-only Docker socket proxy. Adds
grafana/security-check.sh, a CI exposure check and a README security
section.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants