Query-Level Enforcement
Rewrites PromQL and LogQL queries in real time. Users only see the data they're allowed to — every request, every time.
Enforce per-group query policies on Prometheus, Loki, Thanos, and Cortex. No plugins. No datasource changes.
Using Keycloak, Okta, Auth0, or any OIDC provider? lbac-proxy validates the JWT and extracts groups from the token directly:
Keycloak / Okta / Auth0
│ issues JWT with groups: ["platform-team", "sre"]
│
▼
Any client → lbac-proxy:8080/my-datasource/...
│
├── Validates JWT Bearer token
│ └── extracts groups: ["platform-team", "sre"]
├── Looks up group policies from lbac-core
│ └── platform-team → namespace=production
├── Rewrites query: up{} → up{namespace="production"}
│
└── Forwards to Prometheus / Loki / Thanos / CortexAlready using Grafana? No IdP setup needed — lbac-proxy reads identity directly from Grafana Teams:
Grafana (Teams: platform-team, sre)
│ user opens a dashboard
│
▼
Grafana → lbac-proxy:8080/my-datasource/...
│
├── Reads X-Grafana-User header
│ └── looks up teams via Grafana API → ["platform-team", "sre"]
├── Looks up group policies from lbac-core
│ └── platform-team → namespace=production
├── Rewrites query: up{} → up{namespace="production"}
│
└── Forwards to Prometheus / Loki / Thanos / CortexConfigure a policy once:
{
"group": "platform-team",
"rules": [
{ "label": "namespace", "operator": "=~", "values": ["production", "staging"] },
{ "label": "env", "operator": "!=", "values": ["dev"] }
]
}Every query is automatically scoped — no client changes needed.
OpenLBAC is built in the open. Contributions, bug reports, and feature requests are welcome on GitLab.