Prometheus security hardening

Specific hardening tasks for Prometheus, Alertmanager, exporters and the Pushgateway: TLS, authentication, secrets, admin APIs, exporter abuse and per-tenant read access.

Enabling TLS on Prometheus and exporters

Turning on HTTPS for Prometheus, Alertmanager and official exporters with web configuration files: certificates, minimum TLS versions, cipher choices, certificate reloads and validating with promtool.

Basic authentication for Prometheus with bcrypt

Adding username and password protection to Prometheus endpoints with bcrypt-hashed basic auth: generating hashes, pairing it with TLS, configuring scrapers and Grafana, and when a proxy with SSO is the better answer.

Mutual TLS between Prometheus and scrape targets

Requiring client certificates on exporters so only Prometheus can scrape them: tls_config in scrape jobs, client CA settings in exporter web configuration, certificate rotation and service discovery with mTLS.

Keeping credentials out of prometheus.yml

Handling passwords and tokens in Prometheus and Alertmanager configuration: secret fields and their _file variants, what the API redacts, template pitfalls in Alertmanager, and Kubernetes secrets with the Operator.

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.