<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/v12.4/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/v12.4/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/v12.4/administration/data-source-management/teamlbac/configure-teamlbac-for-loki/</link><pubDate>Fri, 03 Apr 2026 19:43:06 +0000</pubDate><guid>https://grafana.com/docs/grafana/v12.4/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/v12.4/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/v12.4/administration/data-source-management/teamlbac/configure-teamlbac-for-prometheus/</link><pubDate>Fri, 03 Apr 2026 19:43:06 +0000</pubDate><guid>https://grafana.com/docs/grafana/v12.4/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;p&gt;To be able to use LBAC for Prometheus data sources, you need to enable the feature toggle &lt;code&gt;teamHttpHeadersMimir&lt;/code&gt; on your Grafana instance. Go to the feature toggles page in setting to enable the feature.&lt;/p&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/v12.4/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/v12.4/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;p&gt;To be able to use LBAC for Prometheus data sources, you need to enable the feature toggle &lt;code&gt;teamHttpHeadersMimir&lt;/code&gt; on your Grafana instance. Contact support to enable the feature toggle for you.&lt;/p&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/v12.4/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/v12.4/administration/data-source-management/teamlbac/create-teamlbac-rules/</link><pubDate>Fri, 03 Apr 2026 19:43:06 +0000</pubDate><guid>https://grafana.com/docs/grafana/v12.4/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></channel></rss>