RousselTMLEARNING

Observability

Securing Observa: authentication, roles and multi-tenancy

Configure access to Observa: local accounts, LDAP and Active Directory, OIDC, SAML, auth proxy, roles and permissions, service accounts, audit and label-based multi-tenancy with OpenTelemetry.

1. Authenticating #

Local accounts, directory, SSO or proxy.

Methods #

Authentication and authorization
Every method leads to a session carrying groups and an effective role. · Illustration: Observa documentation
MethodDetails
Local accountspasswords hashed with argon2id, minimum length PASSWORD_MIN_LENGTH (10)
LDAP / Active Directorybind with a service account, user filter, group sync (LDAP_SYNC_INTERVAL_MINUTES)
OIDCKeycloak, Entra ID, Okta…; groups read from the groups claim
SAML 2.0signed assertions required by default
Auth proxyidentity read from a header (X-WEBAUTH-USER), only from allowed addresses

LDAP / Active Directory #

auth:
  env:
    LDAP_ENABLED: "true"
    LDAP_URL: ldaps://ad.example.com:636
    LDAP_BIND_DN: CN=svc-observa,OU=Services,DC=example,DC=com
    LDAP_USER_BASE_DN: DC=example,DC=com
    LDAP_USER_FILTER: (sAMAccountName={username})
    LDAP_ATTR_USERNAME: sAMAccountName
    GROUP_ROLE_MAPPING: "GG-Observa-Admins:Admin,GG-Observa-Editors:Editor"
secrets:
  ldapBindPassword: "…"
Best practice : Use ldaps:// (636) and a read-only bind account; map directory groups to roles with GROUP_ROLE_MAPPING instead of assigning roles by hand.

OIDC, SAML, proxy #

# OpenID Connect (Keycloak, Entra ID, Okta…)
OIDC_ENABLED=true
OIDC_SCOPES="openid profile email"
OIDC_GROUPS_CLAIM=groups
OIDC_CLIENT_SECRET=<secret>

# SAML 2.0: service provider metadata on /api/auth/saml/metadata
SAML_ENABLED=true
SAML_WANT_ASSERTIONS_SIGNED=true

# Proxy authentication (nginx, oauth2-proxy…)
AUTH_PROXY_ENABLED=true
AUTH_PROXY_HEADER=X-WEBAUTH-USER
AUTH_PROXY_WHITELIST=10.0.0.10/32
Watch out : An empty AUTH_PROXY_WHITELIST means “always denied”. Never widen it to the whole network: anyone able to reach Observa directly could then forge the header and log in as anyone.

The identity demo #

./scripts/generate-env.sh --identity-demo
docker compose -f compose.yml -f examples/identity/docker-compose.yml up -d --no-build
# Keycloak : http://localhost:8180 · Mailpit : http://localhost:8025
DirectoryAccounts
LDAPalice / Alice12345 · bob / Bob1234567 · carol / Carol12345
Keycloak (OIDC, SAML)dave / Dave123456 · erin / Erin123456

Ideal to test group → role mappings and multi-tenancy before plugging in the company directory.

2. Authorizing #

Roles, permissions, service accounts and audit.

Roles and permissions #

Roles and permissions
The role sets the baseline; per-object permissions refine it.

Service accounts #

Automations (CI, scripts, AI agents through MCP, Sigma API) authenticate with service account tokens prefixed obs_, sent in the Authorization: Bearer obs_… header. Give each use its own account, with the minimal role (Viewer for read-only).

Audit #

The audit log records logins, changes, AI assistant actions and MCP tool calls (mcp.tool). It tells you who deleted a dashboard, silenced an alert or let an agent create a rule.

3. Isolating: multi-tenancy #

A label scope per user and per group.

The rule #

Administration → Multi-tenant menu: choose the OpenTelemetry attributes that tell tenants apart (per tenant: tenant.id; per tenant and environment: tenant.id + deployment.environment.name; or a custom list). In Prometheus and Loki, tenant.id becomes the tenant_id label.

TENANCY_ENABLED=true
TENANCY_KEYS=tenant.id,deployment.environment.name

Policies #

Each user or group carries a policy of conditions (=, !=, =~, !~) combined with AND or OR. The effective scope is the union of the user's policy and their groups' policies.

Group acme-ops : tenant.id = "acme"  AND  deployment.environment.name =~ "prod|preprod"
User bob : tenant.id = "globex"
=> bob, member of acme-ops, sees (acme and prod|preprod) or (globex)
Multi-tenant scope
The same engine applies to dashboards, Explore, alerts and the AI assistant.

How it is enforced #

SourceMechanism
Prometheus, Mimir, Thanos, VictoriaMetricsmatchers injected into every PromQL selector
Lokimatchers injected into every LogQL selector
Elasticsearch, OpenSearchboolean filter on tenant fields
Other sourcesdenied to restricted users, unless declared shared
Alerts, silences, SLOs, incidentsfiltered by labels; created with the tenant labels
Common mistake : Without a policy, the default access applies: choose none (recommended). With all, a new user synced from the directory sees every customer.
Good to know : The funnel in the top bar narrows the view within the allowed scope; it never widens it.

Sources #

Related articles

Discovering Observa: the self-hosted observability console

What Observa is, what it adds to Grafana OSS, its five-service architecture, its parity with Grafana Cloud an…

Installing Observa: Docker Compose, Kubernetes and configuration

Deploy Observa in two minutes with Docker Compose, in production on Kubernetes with Helm, then configure it: …

Connecting sources and collecting telemetry for Observa

Declare data sources in Observa (UI or provisioning), handle authentication, PKI, mTLS and proxy, then prepar…

Keep learning

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!