Menu
Choose a product
Viewing: v12.4 (latest)
Find another version
Scroll for more
Documentation
Grafana documentation
Administration
Data source management
Label Based Access Control (LBAC) for data sources
Configure LBAC for data sources for Loki
Grafana Cloud
Configure LBAC for data sources for Loki data source on Grafana Cloud
LBAC for data sources is available on Grafana Cloud using a new Loki data source with basic authentication configured. A new data source can be created as described in LBAC Configuration for New Loki Data Source.
Before you begin
- Be sure that you have the permission setup to create a Loki tenant in Grafana Cloud
- Be sure that you have admin data source permissions for Grafana.
Permissions
We recommend that you remove all permissions for roles and teams that are not required to access the data source. This will help to ensure that only the required teams have access to the data source. The recommended permissions are Admin permission and only add the teams Query permissions that you want to add LBAC for data sources rules for.
Task 1: LBAC Configuration for New Loki Data Source
- Access Loki data sources details for your stack through grafana.com
- Copy Loki details and create a CAP
- Copy the details of your Loki setup.
- Create a Cloud Access Policy (CAP) for the Loki data source in grafana.com.
- Ensure the CAP includes
logs:readpermissions. - Ensure the CAP does not include
labelsrules.
- Create a new Loki data source
- In Grafana, proceed to add a new data source and select Loki as the type.
- Navigate back to the Loki data source
- Set up the Loki data source using basic authentication. Use the userID as the username. Use the generated CAP token as the password.
- Save and connect.
- Navigate to data source permissions
- Go to the permissions tab of the newly created Loki data source. Here, you’ll find the LBAC for data sources rules section.
For more information on how to setup LBAC for data sources rules for a Loki data source, refer to Create LBAC for data sources rules for the Loki data source.
Was this page helpful?
Related resources from Grafana Labs
Additional helpful documentation, links, and articles:
Video

Getting started with managing your metrics, logs, and traces using Grafana
In this webinar, we’ll demo how to get started using the LGTM Stack: Loki for logs, Grafana for visualization, Tempo for traces, and Mimir for metrics.
Video

Getting started with Grafana dashboard design
In this webinar, you'll learn how to design stylish and easily accessible Grafana dashboards that tell a story.
Video

Building advanced Grafana dashboards
In this webinar, we’ll demo how to build and format Grafana dashboards.