This plugin is designed to pass Grafana's plugin security review. Controls are
implemented in code (pkg/security, pkg/models) and verified by tests.
| Asset | Threat | Control |
|---|---|---|
| Access token | Exposure to browser/logs/inspector | Stored in secureJsonData; decrypted only in the backend; never serialized back (json:"-"); redacted from logs/errors |
| Engine endpoint | SSRF / DNS rebinding / metadata theft | security.ValidateOutboundHost blocks loopback/link-local/private/metadata; resolves and checks IPs |
| Transport | MITM / downgrade | TLS 1.2+ by default, custom CA support, explicit opt-in to skip verify |
| Query inspector / telemetry | Secret leakage | Only SQL, query id, and timings are surfaced; redaction applied to all error strings |
- The token and optional CA bundle live only in
secureJsonData. Grafana sends the browser presence booleans (secureJsonFields), never the values. security.Redactormasks known secret values and secret-shaped patterns (Authorization,password=,"accessToken":"…") in every log and error.CheckHealth, resource responses, andframe.Metacarry no secret material.
- Cloud metadata endpoints (
169.254.169.254,fd00:ec2::254,100.100.100.200) are always blocked. - Loopback, link-local, private, unspecified, and multicast addresses are blocked unless the operator enables Allow private networks (for self-hosted clusters) — metadata endpoints stay blocked even then.
- The host is resolved and every returned IP is validated, closing the DNS-rebinding hole. The resolver is injectable for testing.
- Verification on by default; TLS 1.2 floor.
- Custom CA bundle (PEM) appended to system roots.
CertExpiryWarningsurfaces expired/expiring certificates (wired into health reporting as the verification path matures).
- Host, port, identifiers (catalog/schema/cluster/database) are validated before any dial; control characters and overlong values are rejected, preventing injection into gRPC metadata headers.
- SQL is sent to the engine as-is for the user's own query;
dryRunpowers the validate endpoint. Template variables are resolved client-side via Grafana's template service.
See SECURITY.md for private vulnerability disclosure.