<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Label Based Access Control (LBAC) for data sources on Grafana Labs</title><link>https://grafana.com/docs/grafana/v13.2/administration/data-source-management/teamlbac/</link><description>Recent content in Label Based Access Control (LBAC) for data sources on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/grafana/v13.2/administration/data-source-management/teamlbac/index.xml" rel="self" type="application/rss+xml"/><item><title>Configure LBAC for data sources for Loki</title><link>https://grafana.com/docs/grafana/v13.2/administration/data-source-management/teamlbac/configure-teamlbac-for-loki/</link><pubDate>Tue, 18 Aug 2026 10:15:08 +0000</pubDate><guid>https://grafana.com/docs/grafana/v13.2/administration/data-source-management/teamlbac/configure-teamlbac-for-loki/</guid><content><![CDATA[&lt;h1 id=&#34;configure-lbac-for-data-sources-for-loki-data-source-on-grafana-cloud&#34;&gt;Configure LBAC for data sources for Loki data source on Grafana Cloud&lt;/h1&gt;
&lt;p&gt;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 &lt;a href=&#34;/docs/grafana/latest/administration/data-source-management/teamlbac/configure-teamlbac-for-loki/#task-1-lbac-configuration-for-new-loki-data-source&#34;&gt;LBAC Configuration for New Loki Data Source&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Be sure that you have the permission setup to create a Loki tenant in Grafana Cloud&lt;/li&gt;
&lt;li&gt;Be sure that you have admin data source permissions for Grafana.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;permissions&#34;&gt;Permissions&lt;/h3&gt;
&lt;p&gt;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 &lt;code&gt;Admin&lt;/code&gt; permission and only add the teams &lt;code&gt;Query&lt;/code&gt; permissions that you want to add LBAC for data sources rules for.&lt;/p&gt;
&lt;h2 id=&#34;task-1-lbac-configuration-for-new-loki-data-source&#34;&gt;Task 1: LBAC Configuration for New Loki Data Source&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Access Loki data sources details for your stack through grafana.com&lt;/li&gt;
&lt;li&gt;Copy Loki details and create a CAP
&lt;ul&gt;
&lt;li&gt;Copy the details of your Loki setup.&lt;/li&gt;
&lt;li&gt;Create a Cloud Access Policy (CAP) for the Loki data source in grafana.com.&lt;/li&gt;
&lt;li&gt;Ensure the CAP includes &lt;code&gt;logs:read&lt;/code&gt; permissions.&lt;/li&gt;
&lt;li&gt;Ensure the CAP does not include &lt;code&gt;labels&lt;/code&gt; rules.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Create a new Loki data source
&lt;ul&gt;
&lt;li&gt;In Grafana, proceed to add a new data source and select Loki as the type.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Navigate back to the Loki data source
&lt;ul&gt;
&lt;li&gt;Set up the Loki data source using basic authentication. Use the userID as the username. Use the generated CAP token as the password.&lt;/li&gt;
&lt;li&gt;Save and connect.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Navigate to data source permissions
&lt;ul&gt;
&lt;li&gt;Go to the permissions tab of the newly created Loki data source. Here, you&amp;rsquo;ll find the LBAC for data sources rules section.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For more information on how to setup LBAC for data sources rules for a Loki data source, refer to 
    &lt;a href=&#34;/docs/grafana/v13.2/administration/data-source-management/teamlbac/create-teamlbac-rules/&#34;&gt;Create LBAC for data sources rules for the Loki data source&lt;/a&gt;.&lt;/p&gt;
]]></content><description>&lt;h1 id="configure-lbac-for-data-sources-for-loki-data-source-on-grafana-cloud">Configure LBAC for data sources for Loki data source on Grafana Cloud&lt;/h1>
&lt;p>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 &lt;a href="/docs/grafana/latest/administration/data-source-management/teamlbac/configure-teamlbac-for-loki/#task-1-lbac-configuration-for-new-loki-data-source">LBAC Configuration for New Loki Data Source&lt;/a>.&lt;/p></description></item><item><title>Configure LBAC for data sources for Prometheus</title><link>https://grafana.com/docs/grafana/v13.2/administration/data-source-management/teamlbac/configure-teamlbac-for-prometheus/</link><pubDate>Tue, 18 Aug 2026 21:15:34 +0000</pubDate><guid>https://grafana.com/docs/grafana/v13.2/administration/data-source-management/teamlbac/configure-teamlbac-for-prometheus/</guid><content><![CDATA[&lt;h1 id=&#34;configure-lbac-for-data-sources-for-prometheus-data-source&#34;&gt;Configure LBAC for data sources for Prometheus data source&lt;/h1&gt;
&lt;h2 id=&#34;grafana-cloud&#34;&gt;Grafana Cloud&lt;/h2&gt;
&lt;p&gt;LBAC for data sources is available on Grafana Cloud using a new Prometheus data source with basic authentication configured. A new data source can be created as described in &lt;a href=&#34;#task-1-lbac-configuration-for-new-prometheus-data-source&#34;&gt;LBAC Configuration for New Prometheus Data Source&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Be sure that you have the permission setup to create a Prometheus tenant in Grafana Cloud.&lt;/li&gt;
&lt;li&gt;Be sure that you have admin data source permissions for Grafana.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;grafana-cloud-1&#34;&gt;Grafana Cloud&lt;/h2&gt;
&lt;p&gt;LBAC for data sources is available in private preview on Grafana Cloud for Prometheus created with basic authentication. Prometheus data sources for LBAC for data sources can only be created, provisioning is currently not available.&lt;/p&gt;
&lt;p&gt;You cannot configure LBAC rules for Grafana-provisioned data sources from the UI. We recommend that you replicate the setting of the provisioned data source in a new data source as described in &lt;a href=&#34;#task-1-lbac-configuration-for-new-prometheus-data-source&#34;&gt;LBAC Configuration for New Prometheus Data Source&lt;/a&gt; and then add the LBAC configuration to the new data source.&lt;/p&gt;
&lt;h3 id=&#34;permissions&#34;&gt;Permissions&lt;/h3&gt;
&lt;p&gt;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 &lt;code&gt;Admin&lt;/code&gt; permission and only add the teams &lt;code&gt;Query&lt;/code&gt; permissions that you want to add LBAC for data sources rules for.&lt;/p&gt;
&lt;h2 id=&#34;task-1-lbac-configuration-for-new-prometheus-data-source&#34;&gt;Task 1: LBAC Configuration for new Prometheus data source&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Access Prometheus data sources details for your stack through grafana.com&lt;/li&gt;
&lt;li&gt;Copy Prometheus details and create a CAP
&lt;ul&gt;
&lt;li&gt;Copy the details of your Prometheus setup.&lt;/li&gt;
&lt;li&gt;Create a Cloud Access Policy (CAP) for the Prometheus data source in grafana.com.&lt;/li&gt;
&lt;li&gt;Ensure the CAP includes &lt;code&gt;metrics:read&lt;/code&gt; permissions.&lt;/li&gt;
&lt;li&gt;Ensure the CAP does not include &lt;code&gt;labels&lt;/code&gt; rules.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Create a new Prometheus data source
&lt;ul&gt;
&lt;li&gt;In Grafana, proceed to add a new data source and select Prometheus as the type.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Navigate back to the Prometheus data source
&lt;ul&gt;
&lt;li&gt;Set up the Prometheus data source using basic authentication. Use the &lt;code&gt;userID&lt;/code&gt; as the username. Use the generated CAP &lt;code&gt;token&lt;/code&gt; as the password.&lt;/li&gt;
&lt;li&gt;Save and connect.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Navigate to data source permissions
&lt;ul&gt;
&lt;li&gt;Go to the permissions tab of the newly created Prometheus data source. Here, you&amp;rsquo;ll find the LBAC for data sources rules section.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For more information on how to setup LBAC for data sources rules for a Prometheus data source, refer to 
    &lt;a href=&#34;/docs/grafana/v13.2/administration/data-source-management/teamlbac/create-teamlbac-rules/&#34;&gt;Create LBAC for data sources rules for the Prometheus data source&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;grafana-enterprise&#34;&gt;Grafana Enterprise&lt;/h2&gt;
&lt;p&gt;LBAC for data sources is available in Grafana Enterprise for Prometheus connected to GEM created with basic authentication.&lt;/p&gt;
&lt;p&gt;You cannot configure LBAC rules for Grafana-provisioned data sources from the UI. Alternatively, you can replicate the setting of the provisioned data source in a new data source as described in 
    &lt;a href=&#34;/docs/grafana/v13.2/administration/data-source-management/teamlbac/configure-teamlbac-for-prometheus/#task-1-lbac-configuration-for-new-prometheus-data-source&#34;&gt;LBAC Configuration for new Prometheus data source&lt;/a&gt; and then add the LBAC configuration to the new data source.&lt;/p&gt;
&lt;h2 id=&#34;before-you-begin-1&#34;&gt;Before you begin&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Be sure that you have the permission setup to create a cluster in your Grafana&lt;/li&gt;
&lt;li&gt;Be sure that you have admin plugins permissions for Grafana.&lt;/li&gt;
&lt;li&gt;Be sure that you have admin data source permissions for Grafana.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;permissions-1&#34;&gt;Permissions&lt;/h3&gt;
&lt;p&gt;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 &lt;code&gt;Admin&lt;/code&gt; permission and only add the teams &lt;code&gt;Query&lt;/code&gt; permissions that you want to add LBAC for data sources rules for.&lt;/p&gt;
&lt;h2 id=&#34;task-0-setup-grafana-enterprise-metrics-tenant-and-access-policies&#34;&gt;Task 0: Setup Grafana Enterprise Metrics tenant and access policies&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Access the plugins page and install Grafana Enterprise Metrics plugins&lt;/li&gt;
&lt;li&gt;Connect your plugin and use app as the cluster&lt;/li&gt;
&lt;li&gt;Access the app Grafana Enterprise Metrics and configure a tenant&lt;/li&gt;
&lt;li&gt;Store the &lt;code&gt;uid&lt;/code&gt; of the tenant to be used as the username for the basic authentication&lt;/li&gt;
&lt;li&gt;Access the policies page inside of the app and create a AP
&lt;ul&gt;
&lt;li&gt;Create a Access Policy (CAP) for the Prometheus data source.&lt;/li&gt;
&lt;li&gt;Ensure the CAP includes &lt;code&gt;metrics:read&lt;/code&gt; permissions.&lt;/li&gt;
&lt;li&gt;Ensure the CAP does not include &lt;code&gt;labels&lt;/code&gt; rules.&lt;/li&gt;
&lt;li&gt;Store the &lt;code&gt;token&lt;/code&gt; to be used as password for authentication.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;task-1-lbac-configuration-for-new-prometheus-data-source-1&#34;&gt;Task 1: LBAC Configuration for new Prometheus data source&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Create a new Prometheus data source
&lt;ul&gt;
&lt;li&gt;In Grafana, proceed to add a new data source and select Prometheus as the type.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Navigate back to the Prometheus data source
&lt;ul&gt;
&lt;li&gt;Set up the Prometheus data source using basic authentication. Use the &lt;code&gt;uid&lt;/code&gt; as the username. Use the generated &lt;code&gt;token&lt;/code&gt; as the password.&lt;/li&gt;
&lt;li&gt;Save and connect.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Navigate to data source permissions
&lt;ul&gt;
&lt;li&gt;Go to the permissions tab of the newly created Prometheus data source. Here, you&amp;rsquo;ll find the LBAC for data sources rules section.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For more information on how to setup LBAC for data sources rules for a Prometheus data source, refer to 
    &lt;a href=&#34;/docs/grafana/v13.2/administration/data-source-management/teamlbac/create-teamlbac-rules/&#34;&gt;Create LBAC for data sources rules for the Prometheus data source&lt;/a&gt;.&lt;/p&gt;
]]></content><description>&lt;h1 id="configure-lbac-for-data-sources-for-prometheus-data-source">Configure LBAC for data sources for Prometheus data source&lt;/h1>
&lt;h2 id="grafana-cloud">Grafana Cloud&lt;/h2>
&lt;p>LBAC for data sources is available on Grafana Cloud using a new Prometheus data source with basic authentication configured. A new data source can be created as described in &lt;a href="#task-1-lbac-configuration-for-new-prometheus-data-source">LBAC Configuration for New Prometheus Data Source&lt;/a>.&lt;/p></description></item><item><title>Create LBAC for data sources rules for a supported data source</title><link>https://grafana.com/docs/grafana/v13.2/administration/data-source-management/teamlbac/create-teamlbac-rules/</link><pubDate>Tue, 18 Aug 2026 10:15:08 +0000</pubDate><guid>https://grafana.com/docs/grafana/v13.2/administration/data-source-management/teamlbac/create-teamlbac-rules/</guid><content><![CDATA[&lt;h1 id=&#34;create-lbac-for-data-source-rule&#34;&gt;Create LBAC for data source rule&lt;/h1&gt;
&lt;p&gt;LBAC for data sources is available for LBAC-supported data sources created with basic authentication. As of today, managed/provisioned data source can &lt;strong&gt;NOT&lt;/strong&gt; be configured with LBAC rules.&lt;/p&gt;
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Be sure that you have the permission setup to create a Loki tenant in Grafana Cloud.&lt;/li&gt;
&lt;li&gt;Be sure that you have admin data source permissions for Grafana.&lt;/li&gt;
&lt;li&gt;Be sure that you have a team setup in Grafana.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;create-a-lbac-for-data-sources-rule-for-a-team&#34;&gt;Create a LBAC for data sources rule for a team&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Navigate to your data source&lt;/li&gt;
&lt;li&gt;Navigate to the permissions tab
&lt;ul&gt;
&lt;li&gt;Here, you&amp;rsquo;ll find the LBAC for data sources rules section.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Add a LBAC for data sources Rule
&lt;ul&gt;
&lt;li&gt;Add a new rule for the team in the LBAC for data sources rules section.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Define a label selector for the rule
&lt;ul&gt;
&lt;li&gt;Add a label selector to the rule. Refer to documentation for guidance on the types of log selections you can specify.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;lbac-rule&#34;&gt;LBAC rule&lt;/h3&gt;
&lt;p&gt;An LBAC rule is a &lt;code&gt;logql&lt;/code&gt; query that filters logs or metrics based on labels. Each rule operates independently as its own filter, separate from other rules within a team.&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;For logs: &lt;code&gt;{namespace=&amp;quot;dev&amp;quot;, cluster=&amp;quot;us-west-0&amp;quot;}&lt;/code&gt; filters log lines matching both &lt;code&gt;namespace=&amp;quot;dev&amp;quot;&lt;/code&gt; and &lt;code&gt;cluster=&amp;quot;us-west-0&amp;quot;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;For metrics: &lt;code&gt;{job=&amp;quot;api-server&amp;quot;, region=&amp;quot;europe&amp;quot;}&lt;/code&gt; filters metric data points matching &lt;code&gt;job=&amp;quot;api-server&amp;quot;&lt;/code&gt; and &lt;code&gt;region=&amp;quot;europe&amp;quot;&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;One rule &lt;code&gt;{namespace=&amp;quot;dev&amp;quot;, cluster=&amp;quot;us-west-0&amp;quot;}&lt;/code&gt; created with multiple namespaces will be seen as &lt;code&gt;namespace=&amp;quot;dev&amp;quot;&lt;/code&gt; &lt;strong&gt;AND&lt;/strong&gt; &lt;code&gt;cluster=&amp;quot;us-west-0&amp;quot;&lt;/code&gt;.
Two rules &lt;code&gt;{namespace=&amp;quot;dev&amp;quot;}&lt;/code&gt;, &lt;code&gt;{cluster=&amp;quot;us-west-0&amp;quot;}&lt;/code&gt; created for a team will be seen as &lt;code&gt;namespace=&amp;quot;dev&amp;quot;&lt;/code&gt; &lt;strong&gt;OR&lt;/strong&gt; &lt;code&gt;cluster=&amp;quot;us-west-0&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;h4 id=&#34;best-practices&#34;&gt;Best practices&lt;/h4&gt;
&lt;p&gt;We recommend you only add &lt;code&gt;query&lt;/code&gt; permissions for teams that should use the data source and only &lt;code&gt;Admin&lt;/code&gt; have &lt;code&gt;Admin&lt;/code&gt; permissions.&lt;/p&gt;
&lt;p&gt;We recommend for a first setup, setting up as few rules as possible for each team and make them additive for simplicity.&lt;/p&gt;
&lt;p&gt;To validate the rules, we recommend testing the rules in the Explore view. This will allow you to see the metrics or logs that would be returned for the rule.&lt;/p&gt;
&lt;h4 id=&#34;tasks&#34;&gt;Tasks&lt;/h4&gt;
&lt;h3 id=&#34;task-1-one-rule-setup-for-each-team&#34;&gt;Task 1: One rule setup for each team&lt;/h3&gt;
&lt;p&gt;One common use case for creating an LBAC policy is to grant access to logs or metrics with a specific label. For example, you can create a label policy that includes all log lines or metrics with the label &lt;code&gt;namespace&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;We have two teams, Team A and Team B with &lt;code&gt;Query&lt;/code&gt; permissions. Data source access is set up with &lt;code&gt;Admin&lt;/code&gt; roles to have &lt;code&gt;Admin&lt;/code&gt; permission only.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Team A has a rule &lt;code&gt;namespace=&amp;quot;dev&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Team B has a rule &lt;code&gt;namespace=&amp;quot;prod&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A user that is part of Team A will have access to logs or metrics matching &lt;code&gt;namespace=&amp;quot;dev&amp;quot;&lt;/code&gt;. A user in both Team A and Team B will have access to data matching &lt;code&gt;namespace=&amp;quot;dev&amp;quot;&lt;/code&gt; OR &lt;code&gt;namespace=&amp;quot;prod&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;task-2-set-up-a-rule-to-exclude-a-label-for-a-team&#34;&gt;Task 2: Set up a rule to exclude a label for a team&lt;/h3&gt;
&lt;p&gt;One common use case for creating an LBAC policy is to exclude logs or metrics that have a specific label. For example, you can create a label policy that excludes all log lines with the label &lt;code&gt;secret=true&lt;/code&gt; by adding a selector with &lt;code&gt;secret!=&amp;quot;true&amp;quot;&lt;/code&gt; when you create an access policy:&lt;/p&gt;
&lt;p&gt;We have one team, Team A &lt;code&gt;Query&lt;/code&gt; permissions. Data source access is setup with &lt;code&gt;Admin&lt;/code&gt; roles to have &lt;code&gt;Admin&lt;/code&gt; permission only.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Team A has a rule &lt;code&gt;secret!=&amp;quot;true&amp;quot;&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A user that is part of Team A will &lt;strong&gt;NOT&lt;/strong&gt; have access to logs or metrics that match &lt;code&gt;secret!=&amp;quot;true&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;task-3-set-up-multiple-rules-for-a-team&#34;&gt;Task 3: Set up multiple rules for a team&lt;/h3&gt;
&lt;p&gt;We have two teams, Team A and Team B with &lt;code&gt;Query&lt;/code&gt; permissions. Data Source access is setup with &lt;code&gt;Admin&lt;/code&gt; roles having &lt;code&gt;Admin&lt;/code&gt; permission.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Team A has rule &lt;code&gt;cluster=&amp;quot;us-west-0&amp;quot;, namespace=~&amp;quot;dev|prod&amp;quot;&lt;/code&gt; configured.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Team B has rule &lt;code&gt;cluster=&amp;quot;us-west-0&amp;quot;, namespace=&amp;quot;staging&amp;quot;&lt;/code&gt; configured.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A user that is only part of Team A will have access to logs that match &lt;code&gt;cluster=&amp;quot;us-west-0&amp;quot; AND (namespace=&amp;quot;dev&amp;quot; OR namespace=&amp;quot;prod&amp;quot;)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;A user that is only part of Team B will have access to logs that match &lt;code&gt;cluster=&amp;quot;us-west-0&amp;quot; AND namespace=&amp;quot;staging&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;A user in Team A has access to logs in cluster us-west-0 with namespaces &lt;code&gt;dev&lt;/code&gt; and &lt;code&gt;prod&lt;/code&gt;. A user in Team B has access to to everything in cluster us-west-0, except namespace prod. So basically, user who is member of both team A and team B has access to everything in cluster us-west-0.&lt;/p&gt;
&lt;p&gt;A user that is &lt;strong&gt;not&lt;/strong&gt; part of any Team with &lt;code&gt;Editor/Viewer&lt;/code&gt; role will not have access to query any logs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A &lt;code&gt;Admin&lt;/code&gt; user that is part of a Team with will only have access to that teams logs&lt;/p&gt;
&lt;p&gt;A &lt;code&gt;Admin&lt;/code&gt; user that is not part of any Team with &lt;code&gt;Admin&lt;/code&gt; role will have access to all logs&lt;/p&gt;
&lt;h3 id=&#34;task-4-rules-that-overlap&#34;&gt;Task 4: Rules that overlap&lt;/h3&gt;
&lt;p&gt;We have two teams, Team A and Team B.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Team A has a rule &lt;code&gt;namespace=&amp;quot;dev&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Team B has a rule &lt;code&gt;namespace!=&amp;quot;dev&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A user in Team A will have access to logs that match &lt;code&gt;namespace=&amp;quot;dev&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;A user in Team B will have access to logs that match &lt;code&gt;namespace!=&amp;quot;dev&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;NOTE:&lt;/em&gt; A user that is part of Team A and Team B will have access to all logs that match &lt;code&gt;namespace=&amp;quot;dev&amp;quot;&lt;/code&gt; &lt;code&gt;OR&lt;/code&gt; &lt;code&gt;namespace!=&amp;quot;dev&amp;quot;&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h3 id=&#34;task-5-single-rule-setup-for-a-team&#34;&gt;Task 5: Single rule setup for a team&lt;/h3&gt;
&lt;p&gt;We have two teams, Team A and Team B. Data Source access is setup with &lt;code&gt;Editor&lt;/code&gt;, &lt;code&gt;Viewer&lt;/code&gt; roles to have &lt;code&gt;Query&lt;/code&gt; permission.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Team A has a rule &lt;code&gt;namespace=&amp;quot;dev&amp;quot;&lt;/code&gt; configured.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Team B does not have a rule configured for it.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A user that is part of Team A will have access to logs that match &lt;code&gt;namespace=&amp;quot;dev&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;A user that is part of Team A and part of Team B will have access to logs that match &lt;code&gt;namespace=&amp;quot;dev&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;A user that is not part of Team A and part of Team B, that is &lt;code&gt;Editor&lt;/code&gt; or &lt;code&gt;Viewer&lt;/code&gt; will have access to all logs (due to the query permission for the user).&lt;/p&gt;
&lt;h3 id=&#34;task-6-user-a-is-admin-and-part-of-team-b&#34;&gt;Task 6: User A is Admin and part of Team B&lt;/h3&gt;
&lt;p&gt;We have team B, user A is part of Team B and has an &lt;code&gt;Admin&lt;/code&gt; basic role.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Team B has no roles assigned&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Team B has Query permissions to data source&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Team B has a rule &lt;code&gt;{ project_id=&amp;quot;project-dev&amp;quot; }&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;User A may only access logs or metrics for a data source that match &lt;code&gt;{ project_id=&amp;quot;project-dev&amp;quot; }&lt;/code&gt;.&lt;/p&gt;
]]></content><description>&lt;h1 id="create-lbac-for-data-source-rule">Create LBAC for data source rule&lt;/h1>
&lt;p>LBAC for data sources is available for LBAC-supported data sources created with basic authentication. As of today, managed/provisioned data source can &lt;strong>NOT&lt;/strong> be configured with LBAC rules.&lt;/p></description></item><item><title>Configure team LBAC for data sources for Tempo</title><link>https://grafana.com/docs/grafana/v13.2/administration/data-source-management/teamlbac/configure-teamlbac-for-tempo/</link><pubDate>Tue, 18 Aug 2026 10:15:08 +0000</pubDate><guid>https://grafana.com/docs/grafana/v13.2/administration/data-source-management/teamlbac/configure-teamlbac-for-tempo/</guid><content><![CDATA[&lt;h1 id=&#34;configure-team-label-based-access-control-for-tempo-or-cloud-traces&#34;&gt;Configure team label-based access control for Tempo or Cloud Traces&lt;/h1&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Label-based access control for traces is currently in &lt;a href=&#34;/docs/release-life-cycle/&#34;&gt;public preview&lt;/a&gt;. Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;


&lt;p&gt;Team label-based access control (LBAC) for Cloud Traces or Tempo lets you restrict which spans teams can access by defining rules using trace attributes. LBAC provides fine-grained, team-based access control within a single tenant and mirrors the experience used for logs and metrics LBAC in Grafana Cloud.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Unlike logs and metrics, which also support data source-level LBAC through cloud access policies, traces LBAC is currently available only at the team level.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;Grafana uses the term LBAC as an umbrella term for label-based access control for all data sources.
Traces use &lt;strong&gt;attributes&lt;/strong&gt;, not labels, for access control, but the Grafana UI surfaces this functionality as LBAC for consistency.&lt;/p&gt;
&lt;p&gt;This feature only applies to Grafana Cloud Traces, specifically, the Cloud-provisioned tracing data source.&lt;/p&gt;
&lt;h2 id=&#34;how-lbac-works&#34;&gt;How LBAC works&lt;/h2&gt;
&lt;p&gt;When a user queries tracing data source, Grafana evaluates the user’s team memberships and the LBAC rules assigned to those teams. These rules are added to the request so the Cloud Traces data source returns only permitted spans or attributes.&lt;/p&gt;
&lt;p&gt;LBAC rules use &lt;strong&gt;attribute selectors&lt;/strong&gt;, such as:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;{ resource.service.name=&amp;#34;checkout&amp;#34;, resource.env=&amp;#34;prod&amp;#34; }&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Multiple conditions in the same rule use &lt;strong&gt;AND&lt;/strong&gt; (&lt;code&gt;,&lt;/code&gt;), while multiple rules across teams use &lt;strong&gt;OR&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&#34;before-you-begin&#34;&gt;Before you begin&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Be sure that you have the permission setup to create a Tempo or Cloud Traces tenant in Grafana Cloud.&lt;/li&gt;
&lt;li&gt;Be sure that you have administrator permissions for Grafana.&lt;/li&gt;
&lt;li&gt;Be sure that you have a team setup in Grafana.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;known-limitations&#34;&gt;Known limitations&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;LBAC for traces is available only at the team level. Data source-level LBAC rules (configured through cloud access policies) aren&amp;rsquo;t currently supported for traces. This differs from logs and metrics LBAC, which supports both team-level and data source-level rules.&lt;/li&gt;
&lt;li&gt;Autocomplete in search is still under development.&lt;/li&gt;
&lt;li&gt;LBAC is restricted to only contain resource scope attributes.&lt;/li&gt;
&lt;li&gt;There is a slight performance degradation for users with multiple rules.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;configure-team-lbac-for-traces&#34;&gt;Configure team LBAC for traces&lt;/h2&gt;
&lt;p&gt;Follow this workflow when adding a new data source. The data source must be hosted by Grafana and not self-managed.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Start your Grafana Cloud instance.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Access Tempo or Cloud Traces data sources details for your stack.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copy Tempo or Cloud Traces details and create a Cloud Access Policy.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Copy the &lt;a href=&#34;/docs/grafana-cloud/send-data/traces/set-up/locate-url-user-password/&#34;&gt;details of your Tempo or Cloud Traces setup&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In Grafana Cloud, navigate to &lt;strong&gt;Administration &amp;gt; Users and access &amp;gt; Cloud Access Policies&lt;/strong&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create an access policy for the Tempo or Cloud Traces data source.&lt;/li&gt;
&lt;li&gt;Ensure the access policy includes &lt;code&gt;traces:read&lt;/code&gt; permissions.&lt;/li&gt;
&lt;li&gt;Ensure the access policy doesn&amp;rsquo;t include &lt;code&gt;labels&lt;/code&gt; rules. Data source-level LBAC isn&amp;rsquo;t supported for traces, so any &lt;code&gt;labels&lt;/code&gt; rules in the access policy are ignored.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In Grafana, select Tempo or Cloud Traces or create new data source.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Navigate back to the Tempo or Cloud Traces data source.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Set up the Tempo or Cloud Traces data source using basic authentication. Use the &lt;a href=&#34;/docs/grafana-cloud/send-data/traces/set-up/locate-url-user-password/&#34;&gt;userID/tenantID&lt;/a&gt; as the username. Use the token from your access policy as the password.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Save and connect&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Go to the &lt;strong&gt;Permissions&lt;/strong&gt; tab of the newly created Tempo or Cloud Traces data source. Here, you find the LBAC for data sources rules section.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Choose a team from the &lt;strong&gt;Team&lt;/strong&gt; dropdown.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enter attribute selectors such as:&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;{ resource.service.name=&amp;#34;checkout&amp;#34;, resource.env=&amp;#34;prod&amp;#34; }&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Refer to the Examples section below for more examples.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Select &lt;strong&gt;Save&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;examples-of-lbac-rules&#34;&gt;Examples of LBAC rules&lt;/h3&gt;
&lt;p&gt;An LBAC rule is a &lt;code&gt;logql&lt;/code&gt; query that filters logs or metrics based on labels.
LBAC rules for traces also use some TraceQL syntax for attribute selection.
Each rule operates independently as its own filter, separate from other rules within a team.&lt;/p&gt;
&lt;p&gt;LBAC rules guidelines:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use only resource scope attributes, for example &lt;code&gt;{ resource.env=&amp;quot;prod&amp;quot; }&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Only string values are supported.&lt;/li&gt;
&lt;li&gt;Use double quotes for string values, for example: &lt;code&gt;{ resource.env=&amp;quot;prod&amp;quot; }&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You can use regular expressions matching with &lt;code&gt;=~&lt;/code&gt; operator, for example: &lt;code&gt;{ resource.team =~ &amp;quot;team-a|team-b&amp;quot; }&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You can have up to two conditions in the same rule using a comma (&lt;code&gt;,&lt;/code&gt;) as an &lt;code&gt;AND&lt;/code&gt; operator, for example: &lt;code&gt;{ resource.env=&amp;quot;prod&amp;quot;, resource.team=&amp;quot;frontend&amp;quot; }&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Refer to &lt;a href=&#34;/docs/grafana/next/administration/data-source-management/teamlbac/create-teamlbac-rules/&#34;&gt;Create LBAC for data sources rules for a supported data source&lt;/a&gt; for more information.&lt;/p&gt;
&lt;h4 id=&#34;single-rule&#34;&gt;Single rule&lt;/h4&gt;
&lt;p&gt;Limit users to only see spans from the &lt;code&gt;payments&lt;/code&gt; API.&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;{ resource.service.name=&amp;#34;payments-api&amp;#34; }&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This example matches spans with team A &lt;strong&gt;or&lt;/strong&gt; team B. This single example is faster than using multiple rules with the same label.&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;{ resource.team =~ &amp;#34;team-a|team-b&amp;#34; }&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h4 id=&#34;multiple-rules&#34;&gt;Multiple rules&lt;/h4&gt;
&lt;p&gt;Two rules combined to give user access to spans from &lt;code&gt;prod&lt;/code&gt; environment or the &lt;code&gt;billing&lt;/code&gt; team.&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;{ resource.env=&amp;#34;prod&amp;#34; }
{ resource.team=&amp;#34;billing&amp;#34; }&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This example gives users access to spans from the &lt;code&gt;frontend&lt;/code&gt; team in the &lt;code&gt;prod&lt;/code&gt; environment or the &lt;code&gt;checkout&lt;/code&gt; team but doesn&amp;rsquo;t enforce additional conditions. The comma (&lt;code&gt;,&lt;/code&gt;) acts as an &lt;code&gt;AND&lt;/code&gt; operator within the same rule.&lt;/p&gt;

&lt;div class=&#34;code-snippet code-snippet__mini&#34;&gt;&lt;div class=&#34;lang-toolbar__mini&#34;&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet code-snippet__border&#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-none&#34;&gt;{ resource.env=&amp;#34;prod&amp;#34;, resource.team=&amp;#34;frontend&amp;#34; }
{ resource.team=&amp;#34;checkout&amp;#34; }&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h4 id=&#34;user-on-multiple-teams&#34;&gt;User on multiple teams&lt;/h4&gt;
&lt;p&gt;Users on multiple teams receive access based on all combined LBAC rules assigned to each team.&lt;/p&gt;
&lt;p&gt;Team A → &lt;code&gt;{ resource.cluster=&amp;quot;us-east-1&amp;quot; }&lt;/code&gt;
Team B → &lt;code&gt;{ resource.service.name=&amp;quot;frontend&amp;quot; }&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&#34;how-lbac-affects-returned-data&#34;&gt;How LBAC affects returned data&lt;/h2&gt;
&lt;p&gt;Cloud Traces supports three redaction modes that control how unauthorized spans are handled in trace by ID search responses. The active mode is configured per tenant. To change the mode for your organization, contact Grafana Support.&lt;/p&gt;
&lt;h3 id=&#34;attributes-mode-default&#34;&gt;Attributes mode (default)&lt;/h3&gt;
&lt;p&gt;Non-matching spans are included in the response but have their attributes and intrinsics redacted. Only the following minimal fields remain visible on redacted spans:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;traceId&lt;/code&gt;, &lt;code&gt;spanId&lt;/code&gt;, &lt;code&gt;parentId&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;name&lt;/code&gt;, &lt;code&gt;kind&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;timestamps&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;status&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can extend the set of always-visible fields by configuring &lt;code&gt;allowed_attributes&lt;/code&gt;, which sets a list of scoped attributes and intrinsics that are never redacted, For example, you can set &lt;code&gt;span:name&lt;/code&gt;, &lt;code&gt;resource.service.name&lt;/code&gt;, &lt;code&gt;event:name&lt;/code&gt;, or &lt;code&gt;scope.version&lt;/code&gt; so they are never redacted, even from non-matching spans. Contact Grafana Support to configure &lt;code&gt;allowed_attributes&lt;/code&gt; for your organization.&lt;/p&gt;
&lt;h3 id=&#34;spans-mode&#34;&gt;Spans mode&lt;/h3&gt;
&lt;p&gt;Non-matching spans are removed from the response entirely. This can result in broken traces where a returned span has no matching parent, creating gaps in the span tree.&lt;/p&gt;
&lt;h3 id=&#34;error-mode&#34;&gt;Error mode&lt;/h3&gt;
&lt;p&gt;If any span in a requested trace does not match the LBAC policy, the entire request returns a 404 error. This is the strictest mode and is suited for environments where partial trace visibility is not acceptable.&lt;/p&gt;
&lt;p&gt;For Search, metrics, and autocomplete endpoints, only spans matching the LBAC rules appear regardless of the configured redaction mode.&lt;/p&gt;
&lt;h2 id=&#34;manage-lbac-rules&#34;&gt;Manage LBAC rules&lt;/h2&gt;
&lt;p&gt;To edit an existing LBAC rule, follow these steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open your stack and select your &lt;strong&gt;Tempo&lt;/strong&gt; or &lt;strong&gt;Cloud Traces&lt;/strong&gt; data source.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Permissions&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Scroll to &lt;strong&gt;Data access&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select the rule you want to edit and click the Pencil (Edit) icon.&lt;/li&gt;
&lt;li&gt;Modify &lt;strong&gt;Attribute filters&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Save&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To delete an existing LBAC rule, follow these steps:&lt;/p&gt;
&lt;p&gt;Open your stack and select your &lt;strong&gt;Tempo&lt;/strong&gt; or &lt;strong&gt;Cloud Traces&lt;/strong&gt; data source.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Select &lt;strong&gt;Permissions&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Scroll to &lt;strong&gt;Data access&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Select the rule you want to edit.&lt;/li&gt;
&lt;li&gt;Select the &lt;strong&gt;X&lt;/strong&gt; (Delete) icon.&lt;/li&gt;
&lt;li&gt;Confirm deletion.&lt;/li&gt;
&lt;/ol&gt;
]]></content><description>&lt;h1 id="configure-team-label-based-access-control-for-tempo-or-cloud-traces">Configure team label-based access control for Tempo or Cloud Traces&lt;/h1>
&lt;div class="admonition admonition-note">&lt;blockquote>&lt;p class="title text-uppercase">Note&lt;/p>&lt;p>Label-based access control for traces is currently in &lt;a href="/docs/release-life-cycle/">public preview&lt;/a>. Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available.&lt;/p></description></item></channel></rss>