steampipe plugin install grafana

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 the where 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_folder
where
folder_uid = 'BtcDlQ97z';
select
*
from
grafana_folder
where
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 fp
where
f.uid = fp.folder_uid;
select
f.uid,
f.title,
fp.*
from
grafana_folder as f,
grafana_folder_permission as fp
where
f.uid = fp.folder_uid;

Schema for grafana_folder_permission

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
dashboard_idbigintUnique identifier of the dashboard.
folder_idbigintUnique identifier of the folder.
folder_uidtext=Globally unique identifier for the folder.
is_folderbooleanTrue if the permission was granted to a folder.
permissionbigintPermission level granted: 1 = View, 2 = Edit, 4 = Admin.
permission_nametextName of the permission level: View, Edit, Admin.
roletextRole granted in the permission.
team_idbigintID of the team granted the permission.
user_idbigintID 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