<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Giam</title>
    <description>The latest articles on DEV Community by Giam (@giam).</description>
    <link>https://dev.to/giam</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3116827%2F1c0871df-2a9b-4d08-9c7e-07724fc07dde.png</url>
      <title>DEV Community: Giam</title>
      <link>https://dev.to/giam</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/giam"/>
    <language>en</language>
    <item>
      <title>Logs, Metrics, Traces… Leaks? The Case for Auditable Observability</title>
      <dc:creator>Giam</dc:creator>
      <pubDate>Wed, 21 May 2025 09:45:00 +0000</pubDate>
      <link>https://dev.to/giam/logs-metrics-traces-leaks-the-case-for-auditable-observability-3mep</link>
      <guid>https://dev.to/giam/logs-metrics-traces-leaks-the-case-for-auditable-observability-3mep</guid>
      <description>&lt;p&gt;You’ve got dashboards. You’ve got alerts. You’ve got logs going back six months. But can you answer this one question?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“Who accessed this data, and were they supposed to?”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Welcome to the next era of observability: auditable observability — where what you collect isn’t the only concern. It’s about who sees it, how it’s protected, and what trails they leave behind.&lt;/p&gt;

&lt;p&gt;And if you think your observability stack is ready, think again.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Ugly Truth About Modern Observability
&lt;/h2&gt;

&lt;p&gt;Observability has evolved fast. In every SRE and DevOps team I know, there’s a rich landscape of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prometheus for metrics ✅&lt;/li&gt;
&lt;li&gt;Loki or Elasticsearch for logs ✅&lt;/li&gt;
&lt;li&gt;Tempo or Jaeger for traces ✅&lt;/li&gt;
&lt;li&gt;Grafana dashboards on top ✅&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What’s missing?&lt;br&gt;
&lt;strong&gt;Access control. Audit trails. Data governance.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here’s what that looks like in real life:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A junior engineer accidentally sees production logs from a different tenant.&lt;/li&gt;
&lt;li&gt;An on-call rotation includes people who can query everything.&lt;/li&gt;
&lt;li&gt;Nobody knows who queried sensitive traces — because there’s no log of queries at all.&lt;/li&gt;
&lt;li&gt;An auditor asks you for proof that no one tampered with historical metrics… and you come up blank.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Observability without auditability is a security risk in disguise.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Cost of Getting It Wrong
&lt;/h2&gt;

&lt;p&gt;Regulations like SOX, HIPAA, and GDPR aren’t just legal footnotes — they’re expectations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Immutable audit logs must be stored securely.&lt;/li&gt;
&lt;li&gt;Access to observability data must be logged and governed.&lt;/li&gt;
&lt;li&gt;Personal data in logs must be protected, redacted, or deleted on request.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your observability stack can’t answer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“Who accessed logs from this time window?”&lt;/li&gt;
&lt;li&gt;“Can we prove this trace wasn’t altered?”&lt;/li&gt;
&lt;li&gt;“Which team owns this metric?”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;…then you’re flying blind in the eyes of auditors, security teams, and your own customers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Observability Was Built for Visibility — Not Auditability
&lt;/h2&gt;

&lt;p&gt;Most open-source tools weren’t built with multi-tenancy or compliance in mind.&lt;/p&gt;

&lt;p&gt;Take Prometheus, Loki, or Tempo:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They’re great at ingesting data.&lt;/li&gt;
&lt;li&gt;They’re okay at organizing it by labels.&lt;/li&gt;
&lt;li&gt;They’re terrible at controlling who can access what.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;RBAC in Grafana helps — but only at the dashboard level.&lt;br&gt;
It doesn’t restrict queries. It doesn’t filter log lines. It doesn’t know about labels that matter to your platform (e.g. tenant_id, team, region, sensitivity=high).&lt;/p&gt;

&lt;p&gt;So most teams try to patch it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Build reverse proxies that inject tenant labels.&lt;/li&gt;
&lt;li&gt;Run a Grafana per customer or per team.&lt;/li&gt;
&lt;li&gt;Hope everyone plays nice with naming conventions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s fragile. It’s hard to maintain. And it scales poorly.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Shift Toward Auditable Observability
&lt;/h2&gt;

&lt;p&gt;In 2025, the trend is clear:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Observability is no longer just about uptime.&lt;/li&gt;
&lt;li&gt;It’s part of your security surface.&lt;/li&gt;
&lt;li&gt;It must be auditable, accountable, and access-controlled.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Leading teams are asking:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“Can we enforce RBAC or LBAC on observability data itself?”&lt;/li&gt;
&lt;li&gt;“Do our logs have traceability and tamper-resistance?”&lt;/li&gt;
&lt;li&gt;“Are our metrics labeled in a way that enables per-tenant access control?”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These aren’t nice-to-haves anymore. They’re table stakes — especially for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multi-tenant platforms&lt;/li&gt;
&lt;li&gt;Enterprise customers&lt;/li&gt;
&lt;li&gt;Healthcare, fintech, and regulated industries&lt;/li&gt;
&lt;li&gt;Security-conscious orgs under zero-trust mandates&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Auditable Observability Looks Like
&lt;/h2&gt;

&lt;p&gt;Here’s what good looks like in 2025:&lt;/p&gt;

&lt;p&gt;✅ Logs, metrics, and traces are labeled by tenant, team, and sensitivity&lt;br&gt;
✅ Access to data is scoped by labels, roles, and tokens&lt;br&gt;
✅ All queries are logged, audit trails are immutable&lt;br&gt;
✅ Data is stored in long-term object storage with WORM (Write Once, Read Many) policies&lt;br&gt;
✅ Observability is integrated into compliance reports and security reviews&lt;/p&gt;

&lt;h2&gt;
  
  
  How We Solved It
&lt;/h2&gt;

&lt;p&gt;This problem frustrated us for way too long.&lt;/p&gt;

&lt;p&gt;We had all the right tools — but no way to control or audit observability data access at the level we needed.&lt;/p&gt;

&lt;p&gt;So we built &lt;a href="https://usegiam.com/" rel="noopener noreferrer"&gt;usegiam.com&lt;/a&gt; — a lightweight access control platform that brings observability governance to your stack.&lt;/p&gt;

&lt;p&gt;🔐 What it does:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enforce who can access what, based on labels in Prometheus, Loki, Tempo, and Thanos and more&lt;/li&gt;
&lt;li&gt;Add query filters automatically based on the user/team/service&lt;/li&gt;
&lt;li&gt;Audit all queries - with tamper-resistant trails&lt;/li&gt;
&lt;li&gt;Integrate with your SSO and RBAC provider&lt;/li&gt;
&lt;li&gt;Deploy as a proxy in front of your observability backends — no vendor lock-in&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Built for SREs. Loved by compliance teams.&lt;br&gt;
No need to go Enterprise just to keep your data safe.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Now?
&lt;/h2&gt;

&lt;p&gt;You wouldn’t ship code without access control.&lt;br&gt;
You wouldn’t expose S3 buckets without IAM.&lt;/p&gt;

&lt;p&gt;So why are we still exposing logs and metrics to everyone?&lt;/p&gt;

&lt;p&gt;With the rise of platform engineering, multi-tenant environments, and cloud-native complexity, observability is security-critical infrastructure.&lt;/p&gt;

&lt;p&gt;And the teams that realize this first?&lt;br&gt;
They’re going to be the ones who sleep best during the next incident — or audit.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Observability data is sensitive — and often unprotected.&lt;/li&gt;
&lt;li&gt;Most stacks don’t enforce proper access control or audit trails.&lt;/li&gt;
&lt;li&gt;Regulations require logs and metrics to be immutable, scoped, and monitored.&lt;/li&gt;
&lt;li&gt;You need observability that’s not just visible — but auditable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 If this hits close to home, try &lt;a href="https://usegiam.com/" rel="noopener noreferrer"&gt;usegiam.com&lt;/a&gt;.&lt;br&gt;
Start making your observability stack secure, compliant, and access-aware.&lt;/p&gt;

</description>
      <category>sre</category>
      <category>devops</category>
      <category>startup</category>
      <category>security</category>
    </item>
    <item>
      <title>Are Your Loki Logs Safe? Scalable Solutions for Segregation and Authorization</title>
      <dc:creator>Giam</dc:creator>
      <pubDate>Sun, 11 May 2025 15:28:53 +0000</pubDate>
      <link>https://dev.to/giam/unlocking-safe-observability-fresh-approaches-to-loki-log-segregation-and-authorization-4iib</link>
      <guid>https://dev.to/giam/unlocking-safe-observability-fresh-approaches-to-loki-log-segregation-and-authorization-4iib</guid>
      <description>&lt;h2&gt;
  
  
  1. Introduction: Logs, Scale, and Responsibility
&lt;/h2&gt;

&lt;p&gt;In today’s cloud-native world, logs are more than just developer breadcrumbs; they are operational lifelines, forensic goldmines, and, in regulated environments, potential liabilities. As engineering teams scale, so do their logs — and with scale comes complexity: multiple teams, multiple environments, and often, multiple tenants.&lt;/p&gt;

&lt;p&gt;Grafana Loki has rapidly emerged as a go-to log aggregation system thanks to its horizontal scalability, and seamless integration with the wider Grafana stack. But as more teams adopt Loki to centralize logging, a crucial question arises: &lt;strong&gt;who should have access to which logs?&lt;/strong&gt; Centralization without control invites chaos — which is why forward-thinking teams are looking beyond the basics.&lt;/p&gt;

&lt;p&gt;While Loki shines in many areas, log segregation and access control require careful planning, execution and maintenance. This guide dives deep into how Loki handles log isolation, authentication, and authorization — and how to scale it securely and sanely.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Understanding Loki’s Architecture and Log Model
&lt;/h2&gt;

&lt;p&gt;At its core, Loki is designed for efficiency. Unlike systems like Elasticsearch or Splunk, Loki doesn’t index the full content of logs. Instead, it indexes only metadata: the labels. These are key-value pairs like &lt;code&gt;app&lt;/code&gt;, &lt;code&gt;namespace&lt;/code&gt;, or &lt;code&gt;env&lt;/code&gt;, attached to each log stream at ingestion.&lt;/p&gt;

&lt;p&gt;Loki is horizontally scalable and built for cloud-native environments. Logs are pushed to Loki by agents such as Promtail, Fluent Bit, or the Grafana Agent. Loki chunks, compresses, and stores log data in an object store (e.g., S3, GCS), while only maintaining a lightweight index of labels.&lt;/p&gt;

&lt;p&gt;This architecture drastically reduces operational cost and complexity but comes with trade-offs. This means that access control with Loki is not based on user identity or log contents, but on metadata boundaries.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. What Is Log Segregation and Why It Matters
&lt;/h2&gt;

&lt;p&gt;Log segregation is the practice of logically and securely separating log data based on its origin, sensitivity, or intended audience. Whether you're managing logs for hundreds of microservices, multiple teams, or even customer tenants, the ability to partition logs is critical.&lt;/p&gt;

&lt;p&gt;Why it matters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Security&lt;/strong&gt;: Prevent unauthorized access to sensitive data (e.g., customer PII, internal system details).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compliance&lt;/strong&gt;: Meet regulations like GDPR, HIPAA, SOC2 which require data access controls and auditability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clarity&lt;/strong&gt;: Reduce cognitive noise by showing engineers only the logs relevant to their service or team.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without proper segregation, logs from staging and production, or across teams, can easily be commingled — leading to confusion, accidental data leaks, or worse.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Multi-Tenancy in Loki: The First Line of Isolation
&lt;/h2&gt;

&lt;p&gt;Loki supports multi-tenancy via the X-Scope-OrgID HTTP header. When this is enabled (via auth_enabled: true), every log push or query must include this header to identify the tenant.&lt;/p&gt;

&lt;p&gt;This provides hard isolation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each tenant’s logs are stored and indexed separately.&lt;/li&gt;
&lt;li&gt;Queries scoped to one tenant cannot access another tenant’s logs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Common ways to map tenants:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One tenant per team (e.g., team-payments)&lt;/li&gt;
&lt;li&gt;One tenant per environment (e.g., prod, dev)&lt;/li&gt;
&lt;li&gt;One tenant per customer (for SaaS platforms)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While effective, managing large numbers of tenants can become operationally heavy. Loki has no native UI or API for tenant management in OSS. At scale, you need to track tenant IDs, assign them to agents, enforce limits, and ensure proper access from front-ends like Grafana.&lt;/p&gt;

&lt;p&gt;In fact, &lt;em&gt;Grafana's enterprise offering is often required&lt;/em&gt; to manage multi-tenancy cleanly - especially if you're looking to apply data source permissions, access policies, or provide per-tenant visibility through Grafana itself. That can quickly become costly and complex to manage, particularly for teams operating in hybrid or self-hosted environments.&lt;/p&gt;

&lt;p&gt;This is where lightweight, purpose-built access management solutions like &lt;a href="https://usegiam.com/" rel="noopener noreferrer"&gt;Giam&lt;/a&gt; shine. GIAM provides a simple but powerful way to enforce and manage tenant boundaries on top of Loki — without requiring a full Grafana Enterprise stack. It gives teams a centralized UI and policy engine to define which users or services can access what, across tenants and environments.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Labels: Useful for Querying, Not for Securing
&lt;/h2&gt;

&lt;p&gt;Labels are essential in Loki for organizing and querying logs efficiently. But labels are &lt;strong&gt;not&lt;/strong&gt; a security mechanism.&lt;/p&gt;

&lt;p&gt;Why?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Any user with access to a tenant can query any label combination.&lt;/li&gt;
&lt;li&gt;There is no built-in way to restrict access to certain labels or streams.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's a common trap: relying on labels like &lt;code&gt;env="prod"&lt;/code&gt; or &lt;code&gt;team="A"&lt;/code&gt; for access control. But unless you pair this with enforced tenant separation, anyone with access to that tenant can still query &lt;code&gt;{env="prod"}&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The best practice: use labels for structure and hygiene, but enforce true security boundaries with &lt;strong&gt;tenants&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That said, many real-world setups involve shared tenants or overlapping responsibilities - especially during migrations, shared infrastructure operations, or multi-team debugging. In such cases, organizations need &lt;strong&gt;fine-grained, label-aware authorization&lt;/strong&gt; on top of tenant boundaries.&lt;/p&gt;

&lt;p&gt;This is where &lt;a href="https://usegiam.com/" rel="noopener noreferrer"&gt;Giam&lt;/a&gt; becomes especially powerful: it allows teams to define access policies not just at the tenant level, but at the label or log stream level. For example, Giam can enforce that a user can only query logs where &lt;code&gt;team="frontend"&lt;/code&gt; or &lt;code&gt;env="dev"&lt;/code&gt;, even within a shared tenant - enabling safer collaboration without over-segmentation or extra Loki clusters.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Authentication &amp;amp; Authorization in Loki: What’s Built In (and What’s Not)
&lt;/h2&gt;

&lt;p&gt;By default, open-source Loki provides &lt;strong&gt;no authentication or authorization&lt;/strong&gt;. It assumes you're running it behind an external proxy, gateway, or identity provider.&lt;/p&gt;

&lt;p&gt;Common setups include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;OAuth2-Proxy&lt;/strong&gt; in front of Loki, authenticating users and injecting the correct &lt;code&gt;X-Scope-OrgID&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NGINX with Basic Auth&lt;/strong&gt; for basic protection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;kube-rbac-proxy&lt;/strong&gt; to integrate with Kubernetes RBAC.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Grafana&lt;/strong&gt; as a front-end, using per-org configurations and multiple data sources.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;However, this approach pushes a lot of complexity to the edge:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You must correctly map users to tenants.&lt;/li&gt;
&lt;li&gt;You must ensure headers can't be spoofed.&lt;/li&gt;
&lt;li&gt;There's no built-in concept of users, roles, or audit logs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While feasible, this creates a fragile setup. As organizations grow, the need for robust, centralized access control becomes clear.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://usegiam.com/" rel="noopener noreferrer"&gt;Giam&lt;/a&gt; steps in here as a purpose-built solution for this very gap. Rather than duct-taping identity and policy enforcement across proxies, Giam acts as a secure, centralized guardrail for Loki — validating user identity, injecting tenant context, and applying access rules consistently. It reduces the overhead of maintaining proxy chains and enables structured policy enforcement that grows with your team.&lt;/p&gt;




&lt;h2&gt;
  
  
  7. Real-World Challenges: From Compliance to Complexity
&lt;/h2&gt;

&lt;p&gt;As teams and environments grow, the cracks start to show:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tenant sprawl&lt;/strong&gt;: Without lifecycle management, tenant IDs accumulate. Misconfiguration leads to data going to the wrong place.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privilege creep&lt;/strong&gt;: Shared access tokens or data sources give broad access over time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit gaps&lt;/strong&gt;: With no query-level logging in OSS, it's hard to trace who accessed what.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Policy enforcement&lt;/strong&gt;: There's no way to enforce “User A can only query logs from app X in environment Y”.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In regulated industries, this becomes untenable. For example, a healthcare company must ensure that engineers can only access logs for services they're responsible for, and that all access is auditable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://usegiam.com/" rel="noopener noreferrer"&gt;Giam&lt;/a&gt; address these growing pains by offering a centralized control plane for log access — enabling policy enforcement, per-user audit trails, and scalable access governance without stitching together multiple tools.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. Best Practices for Scalable and Secure Log Segregation
&lt;/h2&gt;

&lt;p&gt;To operate Loki securely at scale:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Enable multi-tenancy&lt;/strong&gt; early. Don’t delay separating teams or environments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use infrastructure as code&lt;/strong&gt; to manage tenants and access. Helm charts and Terraform modules help.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Guard Loki with authentication&lt;/strong&gt;: use OAuth2-Proxy or similar to verify identity and inject tenant headers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Separate ingestion and query endpoints&lt;/strong&gt;: often different services need different access levels.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement query auditing&lt;/strong&gt; at the proxy or Grafana level.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Track per-tenant usage and errors&lt;/strong&gt; using Loki’s own metrics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alert on anomalies&lt;/strong&gt;: unusual query patterns, volume spikes, or failed auth.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These steps help minimize blast radius, improve accountability, and ease operations — and with tools like &lt;a href="https://usegiam.com/" rel="noopener noreferrer"&gt;usegiam.com&lt;/a&gt;, many of these practices can be automated and standardized, making them less error-prone and more consistent across teams.&lt;/p&gt;




&lt;h2&gt;
  
  
  9. The Case for Advanced Access Control
&lt;/h2&gt;

&lt;p&gt;There comes a point where reverse proxies, scripts, and convention-based policies start to buckle. At this stage, many teams turn to centralized solutions like &lt;a href="https://usegiam.com/" rel="noopener noreferrer"&gt;usegiam.com&lt;/a&gt; that bring policy-driven access control, auditability, and seamless IAM integration — without the usual complexity. Large organizations need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Centralized tenant management&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fine-grained RBAC/ABAC policies&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;API tokens with scoped permissions&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Audit logs for queries and access events&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Seamless integration with enterprise SSO/IAM&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These aren't luxuries — they're requirements for secure, compliant observability. Solutions that offer policy-driven log access control, visibility into usage, and delegation of access management to teams can be a game-changer.&lt;/p&gt;

&lt;p&gt;They reduce operational burden, prevent misconfigurations, and provide confidence that your log data isn’t becoming a liability.&lt;/p&gt;




&lt;h2&gt;
  
  
  10. Conclusion: Making Loki Work for You — Securely and Sanely
&lt;/h2&gt;

&lt;p&gt;Loki lays a rock-solid foundation for log aggregation — it’s scalable, cost-effective, and fits naturally into the Grafana ecosystem. But when it comes to access control, segregation, and security, it deliberately keeps things light, leaving much of the responsibility to you.&lt;/p&gt;

&lt;p&gt;For smaller teams, that simplicity can be an advantage. A few proxies, some label discipline, and you’re up and running. But as platforms grow, so do the stakes — and so does the need for real access governance.&lt;/p&gt;

&lt;p&gt;At scale, you need more than good intentions. You need policy enforcement, auditability, and fine-grained access, all without slowing down your developers. That’s where purpose-built solutions come into play.&lt;/p&gt;

&lt;p&gt;With the right architecture, Loki becomes more than a place to stash logs — it becomes a secure, self-service platform for every team. Platforms like &lt;a href="https://usegiam.com/" rel="noopener noreferrer"&gt;usegiam.com&lt;/a&gt; help you make that leap — delivering the controls, guardrails, and visibility you need to operate responsibly at scale, without rebuilding everything from scratch.&lt;/p&gt;

</description>
      <category>monitoring</category>
      <category>multiplatform</category>
      <category>devops</category>
      <category>security</category>
    </item>
    <item>
      <title>RBAC vs. LBAC: Which Scales for Multi-Tenant Dashboards?</title>
      <dc:creator>Giam</dc:creator>
      <pubDate>Mon, 05 May 2025 08:00:00 +0000</pubDate>
      <link>https://dev.to/giam/rbac-vs-lbac-which-scales-for-multi-tenant-dashboards-589l</link>
      <guid>https://dev.to/giam/rbac-vs-lbac-which-scales-for-multi-tenant-dashboards-589l</guid>
      <description>&lt;p&gt;The Multi-Tenant Dashboard Dilemma&lt;br&gt;
Multi-tenancy is a reality for many DevOps and platform teams, especially when managing observability platforms like Grafana. Ensuring secure, isolated data access for multiple tenants often reveals limitations in traditional RBAC solutions, prompting a shift toward more granular methods like LBAC.&lt;/p&gt;

&lt;p&gt;This article explores RBAC and LBAC in Grafana, highlighting real-world best practices, pitfalls to avoid, and actionable insights to scale efficiently.&lt;/p&gt;

&lt;h1&gt;
  
  
  RBAC in Grafana: The Basics
&lt;/h1&gt;

&lt;p&gt;Role-Based Access Control (RBAC) assigns permissions based on defined roles (Admin, Editor, Viewer), controlling user actions like dashboard creation or data source management. RBAC excels in simplicity, making it ideal for straightforward access needs in small, single-tenant setups.&lt;/p&gt;

&lt;p&gt;Pros:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easy to implement&lt;/li&gt;
&lt;li&gt;Well-understood by engineers
Cons:&lt;/li&gt;
&lt;li&gt;Quickly becomes unmanageable at scale&lt;/li&gt;
&lt;li&gt;Limited granularity, causing "role explosion" in complex scenarios&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  What is LBAC (Label-Based Access Control)?
&lt;/h1&gt;

&lt;p&gt;LBAC enhances access control by dynamically filtering data based on labels or attributes at query-time, rather than just static user roles. Grafana recently introduced LBAC for its enterprise data sources, enabling teams to share dashboards safely across tenants by enforcing label-specific policies.&lt;/p&gt;

&lt;p&gt;Pros:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fine-grained data isolation&lt;/li&gt;
&lt;li&gt;Scalable across multiple tenants without duplicating dashboards or data sources&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Initial setup complexity&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;RBAC&lt;/th&gt;
&lt;th&gt;LBAC&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Granularity&lt;/td&gt;
&lt;td&gt;Coarse (role-based)&lt;/td&gt;
&lt;td&gt;Fine (label-based)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Management Ease&lt;/td&gt;
&lt;td&gt;Easier initially; complexity grows&lt;/td&gt;
&lt;td&gt;Complex initially; scalable long-term&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scalability&lt;/td&gt;
&lt;td&gt;Limited due to role explosion&lt;/td&gt;
&lt;td&gt;Highly scalable via dynamic policies&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data Isolation&lt;/td&gt;
&lt;td&gt;Limited data-level control&lt;/td&gt;
&lt;td&gt;Strong data-level isolation&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;RBAC alone can quickly lead to unwieldy role management. LBAC complements RBAC by handling data-level permissions dynamically, ensuring each tenant sees only relevant data.&lt;/p&gt;

&lt;h1&gt;
  
  
  Challenges in Multi-Tenant Grafana with RBAC Only
&lt;/h1&gt;

&lt;p&gt;Teams attempting multi-tenancy with only RBAC encounter significant challenges:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Role Explosion: Creating numerous roles per tenant quickly becomes unmanageable.&lt;/li&gt;
&lt;li&gt;Security Risks: Shared data sources may inadvertently expose data across tenants due to insufficient query-level restrictions.&lt;/li&gt;
&lt;li&gt;Operational Overhead: Separate Grafana instances or duplicated dashboards are resource-intensive and inefficient.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  How LBAC Solves These Challenges
&lt;/h1&gt;

&lt;p&gt;Label-based policies address these challenges head-on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simplified Management: One shared Grafana instance with LBAC reduces overhead.&lt;/li&gt;
&lt;li&gt;Enhanced Security: Dynamic, per-request data filtering ensures tenants only see permitted data.&lt;/li&gt;
&lt;li&gt;Greater Flexibility: Easily onboard new tenants or update policies without structural changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  RBAC and LBAC Together: Best Practices for Multi-Tenancy
&lt;/h1&gt;

&lt;p&gt;For multi-tenant dashboards, relying solely on RBAC can become complex and ineffective. Combining RBAC with LBAC is a recommended best practice:&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Establish RBAC Roles and Teams
&lt;/h2&gt;

&lt;p&gt;Start by clearly defining roles such as Admin, Editor, and Viewer. Assign these roles based on specific responsibilities—like dashboard creation, editing, or read-only access—adhering strictly to the principle of least privilege. Group users into teams when possible, regularly reviewing permissions to maintain appropriate access levels. &lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Introduce Label-Based Policies
&lt;/h2&gt;

&lt;p&gt;Enhance security by applying LBAC to dynamically filter data visibility at query-time, using labels like tenant IDs, environment names, customer segments, or project identifiers. Properly labeled metrics and logs ensure that each tenant sees only the data they are authorized to access.&lt;/p&gt;

&lt;p&gt;For instance, data sources might include labels such as tenant_id: "tenant123" or environment: "production". Queries automatically enforce these label constraints, providing strict data isolation without manual intervention.&lt;/p&gt;

&lt;p&gt;This model scales especially well in shared environments. For instance, a managed service provider running a single Grafana instance can safely serve multiple clients by filtering queries on tenant labels, ensuring strict data isolation without added operational burden.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Choose the Right Tool for Enforcement
&lt;/h2&gt;

&lt;p&gt;Grafana Cloud and Grafana Enterprise both offer native RBAC and LBAC features, which are excellent options for organizations already invested in Grafana’s commercial offerings. However, these solutions can quickly become costly, especially for SMBs, smaller teams, or users of Grafana Open Source, which lacks built-in LBAC capabilities.&lt;/p&gt;

&lt;p&gt;Tools like &lt;a href="https://www.usegiam.com/" rel="noopener noreferrer"&gt;Giam&lt;/a&gt; offer an efficient alternative. Giam integrates seamlessly with Grafana, providing external enforcement of both RBAC and LBAC without plugins, custom forks, or code changes. Policies are managed centrally and enforced per-request, providing precise and scalable access control.&lt;/p&gt;

&lt;h3&gt;
  
  
  Benefits of Combining RBAC and LBAC with &lt;a href="https://www.usegiam.com/" rel="noopener noreferrer"&gt;Giam&lt;/a&gt;:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Centralized Management: All policies managed from a single, intuitive interface.&lt;/li&gt;
&lt;li&gt;Granular Data Isolation: Tenant-specific data is protected at the query-level, eliminating risk of accidental exposure.&lt;/li&gt;
&lt;li&gt;Audit Trail: Detailed logs of data access ensure compliance with security audits.&lt;/li&gt;
&lt;li&gt;Zero Operational Overhead: No separate Grafana instances or duplicate dashboards required—significantly reducing administrative burden.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Looking Ahead: Future Trends
&lt;/h1&gt;

&lt;p&gt;As "zero trust" security gains traction, dynamic access control methods like LBAC are increasingly critical. Expect continuous evolution toward hybrid RBAC+LBAC models, supported by external policy enforcement tools, simplifying secure multi-tenancy at scale.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;Which scales better, RBAC or LBAC? The answer: both, used together. RBAC lays a manageable foundation, while LBAC provides granular control needed for secure, scalable multi-tenancy. Solutions like Giam offer seamless integration, avoiding the complexity of custom solutions and empowering DevOps teams to focus on delivering value.&lt;/p&gt;

&lt;p&gt;Curious to see RBAC + LBAC in action for your dashboards? &lt;a href="//mailto:info@usegiam.com"&gt;Request a demo&lt;/a&gt; and experience simpler, more secure multi-tenant dashboards today.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>security</category>
      <category>multitenancy</category>
      <category>metrics</category>
    </item>
  </channel>
</rss>
