Query filtering limits what results are returned, usually by requiring a label or tenant marker in the PromQL request. Query authorization decides whether the caller is allowed to ask for that data at all. In a shared Prometheus setup, both are needed: filtering preserves data separation, while authorization prevents unauthorized access to another permissions system’s metrics.
How query filtering and query authorization differ
Query filtering is a data-shaping control. It changes the result set after, or alongside, evaluation so the caller only sees series that match a required label, tenant marker, or similar selector. Query authorization is a decision control. It answers a different question: whether that caller should be allowed to request the dataset in the first place.
The practical difference matters because filtering can hide some data from view without proving the request was legitimate. Authorization is what prevents a caller from using a valid query path to reach metrics that belong to another team, tenant, or permissions boundary. In a shared Prometheus environment, treating the two as interchangeable leaves a gap between visibility control and access control.
That gap is why mature designs usually separate enforcement into two layers. One layer constrains which metrics or label sets a query can return, and the other constrains who may issue that query at all. When both are present, filtering preserves separation inside the query path, while authorization protects the boundary around it.
Why shared Prometheus setups need both controls
Shared Prometheus is usually a multi-tenant trust problem, not just a search problem. Different teams often rely on the same query endpoint, the same metric store, or the same downstream UI, so the control objective is to prevent cross-tenant exposure without making the system unusable for legitimate operators.
That is where externalized access policy becomes useful. A query layer can enforce tenant-aware evaluation, while broader authorization logic decides whether the caller is entitled to that tenant’s data scope in the first place. NHIMG’s Authorisation Models Guide is a useful companion when you need to compare RBAC, ABAC and policy-based patterns for these decisions, especially where the answer depends on attributes such as team, environment, or workload context.
Filtering alone is brittle if the caller can change selectors, bypass the intended label, or reach the raw storage path through another interface. Authorization alone is too coarse if every approved caller can still see all metrics once inside. The secure pattern is to use both, with filtering as an output constraint and authorization as the gate that sets the allowed scope.
Where teams get query isolation wrong
The most common mistake is assuming a required label means access is enforced. A required label can reduce accidental overreach, but it does not necessarily stop an authenticated caller from asking broader questions, crafting alternate queries, or accessing data through a parallel path. The control is only strong if the enforcement point is authoritative and cannot be bypassed.
Another failure mode is inconsistent scope definition. If tenant markers, namespace labels, or team tags are not applied uniformly across ingestion, storage, and query paths, filtering becomes partial and the boundary leaks through gaps. Shared observability systems also tend to accumulate operational exceptions, which makes it easy for one special case to become the default bypass.
For teams building or reviewing these controls, IAM and IGA Basics helps frame the underlying distinction between authentication, authorization and entitlement governance, while Enterprise Data Lake Security Guide is relevant where Prometheus data is exported, mirrored or queried through adjacent analytics layers that can create bypass paths.
Risk and Threat Considerations
In a shared monitoring environment, weak separation can expose one team’s operational data to another team, reveal internal naming conventions, or surface sensitive infrastructure details that should remain scoped. The risk is not just privacy, it is also trust boundary failure: once a caller can infer or retrieve another tenant’s metrics, the environment is no longer behaving as a shared but isolated service.
Failure mechanism: The control breaks when filtering is treated as a substitute for authorization, or when the query path can be reached through an alternate interface that does not re-apply tenant scope consistently.
Impact: Unauthorized metric visibility can expose workload patterns, incident signals, capacity data or environment relationships, and it can also undermine confidence in the shared platform because users no longer trust that access boundaries are real.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP API Security Top 10 addresses the attack and risk surface, while NIST SP 800-53 Rev 5 sets the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST SP 800-53 Rev 5 | AC-3 — Access Enforcement | Query authorization is an access-enforcement problem for shared metrics. |
| AC-6 — Least Privilege | Shared query access should be limited to the minimum tenant scope needed. | |
| AU-2 — Event Logging | Shared query environments need traceability for privileged or cross-tenant access attempts. | |
| Recommendation — Enforce tenant-scoped access decisions before Prometheus queries can retrieve data. Restrict each caller to the smallest metric scope required for its role. Log query requests and denied access to support investigation and review. | ||
| OWASP API Security Top 10 | API5 — Broken Function Level Authorization | Unauthorized query paths can expose metrics if function-level checks are missing. |
| API1 — Broken Object Level Authorization | Tenant metrics are the protected objects, and cross-tenant access is an authorization flaw. | |
| Recommendation — Validate that every query function checks the caller’s right to invoke it. Enforce object-level checks so callers can only reach metrics in their own scope. | ||
Practitioner Guidance
What to verify: Confirm that the system enforces tenant scope at the point of query acceptance, not only in query rewriting or result shaping. Also verify that the same scope is enforced across every route that can expose metrics, including APIs, dashboards, federation, remote read paths and any export pipeline.
Decision rule: If a caller can technically reach data outside its intended tenant scope, treat that as an authorization failure even if filtering often hides the unwanted series. If the caller is allowed to ask only for a narrow slice, but the system cannot prove that the request is entitled to that slice, the design is incomplete.
Practitioner takeaway: In shared Prometheus, filtering limits exposure in the answer, but authorization defines who may ask the question at all, and both must line up to preserve tenant separation.
Related resources from NHI Mgmt Group
- Who should own application authorization when policy becomes shared infrastructure?
- How should teams implement query-layer authorization for Elasticsearch search workloads?
- Why is query-layer authorization better suited to service identities than app-layer checks?
- Why do query plans improve authorization performance for data-heavy applications?
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on November 4, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org