Table: grafana_folder_permission - Query Grafana Folder Permissions using SQL
Grafana Folder Permissions is a feature within Grafana that allows the assignment of user permissions to specific folders. This functionality enables the control of user access to dashboards, ensuring that only authorized users can view and edit specific dashboards. It is an integral part of managing user accessibility and security in Grafana.
Table Usage Guide
The grafana_folder_permission
table provides insights into the permissions assigned to folders within a Grafana instance. As a system administrator or security analyst, explore folder-specific permission details through this table, including the role, user, team, and permission level assigned to each folder. Utilize it to uncover information about user access, such as who can view or edit certain dashboards, and to ensure the proper implementation of access control policies.
Important Notes
- You must specify the
folder_uid
in thewhere
clause to query this table.
Examples
List all permissions for a folder
Explore which permissions are granted for a specific folder in Grafana to manage access control effectively. This can help in maintaining security and ensuring only authorized users can make changes.
select *from grafana_folderwhere folder_uid = 'BtcDlQ97z';
select *from grafana_folderwhere folder_uid = 'BtcDlQ97z';
List all folders with their permissions
Explore which folders have specific permissions in your Grafana setup. This can help in managing access controls and ensuring proper security protocols.
select f.uid, f.title, fp.*from grafana_folder as f, grafana_folder_permission as fpwhere f.uid = fp.folder_uid;
select f.uid, f.title, fp.*from grafana_folder as f, grafana_folder_permission as fpwhere f.uid = fp.folder_uid;
Schema for grafana_folder_permission
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
dashboard_id | bigint | Unique identifier of the dashboard. | |
folder_id | bigint | Unique identifier of the folder. | |
folder_uid | text | = | Globally unique identifier for the folder. |
is_folder | boolean | True if the permission was granted to a folder. | |
permission | bigint | Permission level granted: 1 = View, 2 = Edit, 4 = Admin. | |
permission_name | text | Name of the permission level: View, Edit, Admin. | |
role | text | Role granted in the permission. | |
team_id | bigint | ID of the team granted the permission. | |
user_id | bigint | ID of the user granted the permission. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- grafana
You can pass the configuration to the command with the --config
argument:
steampipe_export_grafana --config '<your_config>' grafana_folder_permission