feat: secure telemetry ingestion and grafana data sources

This commit is contained in:
2026-11-30 16:36:14 +03:00
parent bdc0755d2b
commit c0576a2dee
11 changed files with 287 additions and 56 deletions
+29
View File
@@ -0,0 +1,29 @@
global
log stdout format raw local0 notice
ssl-default-bind-options ssl-min-ver TLSv1.2
defaults
mode http
timeout connect 2s
timeout client 15s
timeout server 15s
timeout http-request 5s
frontend tls
bind :9443 ssl crt /run/tls/https.pem ca-file /run/tls/telemetry-clients.crt verify required
acl collector ssl_c_s_dn(CN) -m str collector.lab7.internal
acl grafana ssl_c_s_dn(CN) -m str grafana.lab7.internal
acl scraper ssl_c_s_dn(CN) -m str scraper.lab7.internal
acl scrape_mode env(MODE) -m str scrape
acl metrics_path path -i /metrics
acl ingest_path path -i /api/v1/otlp/v1/metrics /otlp/v1/logs /v1/traces
acl query_post path -i /api/v1/query /api/v1/query_range /api/v1/series /loki/api/v1/query /loki/api/v1/query_range /loki/api/v1/series
http-request deny unless scrape_mode scraper METH_GET metrics_path or !scrape_mode collector METH_POST ingest_path or !scrape_mode grafana METH_GET !ingest_path or !scrape_mode grafana METH_POST query_post
use_backend ingest if collector
default_backend read
backend read
server local "127.0.0.1:${READ_PORT}"
backend ingest
server local "127.0.0.1:${INGEST_PORT}"