A masking reverse proxy for Grafana and observability backends like Loki and Elasticsearch
773
A masking reverse-proxy that sits between Grafana and your log/observability backends. Grafana talks to mysterio, never directly to Loki or Elasticsearch — mysterio forwards the request, and on the way back masks sensitive fields (IIN/BIN, names, phones, e-mails, tokens, card/account numbers, IPs, etc.) in the response before Grafana ever sees it.
Grafana ──HTTP(S)──▶ mysterio ──HTTP(S)──▶ Loki / Elasticsearch (upstream)
│
└── masks sensitive fields in the response
/loki/*): every response is scanned line-by-line; JSON log
lines are masked by key name (recursively, including JSON escaped inside
a string field), and regex rules catch non-JSON formats (SQL, logfmt,
bare values in a URL)./elastic/*): only _search/_msearch responses are
masked, structurally, by walking each hit's _source and masking
matching JSON keys. Other endpoints (_mapping, _field_caps, index
listings) pass through untouched.Authorization, Basic Auth) are passed through unchanged;
mysterio does not store or substitute credentials./test-me page lets you paste a candidate rules.yaml and a
log line and preview the masked result, without touching the live rules.| Variable | Default | Description |
|---|---|---|
LOKI_ENABLED | false | Enable the /loki proxy route |
LOKI_URL | — | Upstream Loki base URL; required if LOKI_ENABLED=true |
ELASTIC_ENABLED | false | Enable the /elastic proxy route |
ELASTIC_URL | — | Upstream Elasticsearch base URL; required if ELASTIC_ENABLED=true |
PORT | :8080 | Listen address |
MAX_RESPONSE_BYTES | 33554432 | Skip masking above this size (shared by both backends) |
TEST_ME_ENABLED | false | Enable the /test-me masking-preview UI |
BASE_PATH | `` (root) | Path prefix for /test-me only (e.g. /mysterio); does not affect /loki, /elastic, /healthz |
RULES_PATH | — | Path to the masking rules YAML file; required, loaded once at startup |
Content type
Image
Digest
sha256:43f36e0d8…
Size
10.9 MB
Last updated
1 day ago
docker pull rzaripov1990/mysterio