As a response to https://community.grafana.com/t/should-viewer-have-access-to-query-history-in-explore-menu/123023
This is not a critical security issue, but something to follow up on.
Results for Query History are returned via a GET to api/query-history - results are automatically filtered to be for the user who sent the request.
In Grafana's permission system, the "viewer" role is generally limited from accessing query information. They can see dashboards, but cannot edit them to see the queries generating the results, nor can they access Explore.
In the following scenario, a user in the viewer role would be able to access query data via query history:
- The user was formerly not in a viewer role, and ran queries in Explore
- The user noted the API call to get query history data
- The user was then changed to be viewer
- The user ran the API call before the query history cleanup was triggered (defaulting to 2 weeks), or they starred queries.
Actual Result: The user would see query data. They would only be able to access queries they had previously ran.
Expected Result: The API call to get query history data should not return results if the user is in the viewer role.
As a response to https://community.grafana.com/t/should-viewer-have-access-to-query-history-in-explore-menu/123023
This is not a critical security issue, but something to follow up on.
Results for Query History are returned via a GET to
api/query-history- results are automatically filtered to be for the user who sent the request.In Grafana's permission system, the "viewer" role is generally limited from accessing query information. They can see dashboards, but cannot edit them to see the queries generating the results, nor can they access Explore.
In the following scenario, a user in the viewer role would be able to access query data via query history:
Actual Result: The user would see query data. They would only be able to access queries they had previously ran.
Expected Result: The API call to get query history data should not return results if the user is in the viewer role.