What you will learn in this TP
- Create teams and users through the API
- Separate folders per team
- Remove default permissions
- Create a time-limited service account
- Check each profile's access
Introduction #
What you will learn in this section
- Create teams and users through the API
- Separate folders per team
- Remove default permissions
- Create a time-limited service account
- Check each profile's access
Context. Your Grafana is shared by three departments. Today everyone sees and edits everything. You must separate them without creating three instances.
Prerequisites: a machine with Docker and Docker Compose, curl and jq · Estimated time: 60 min
Three teams, three protected folders, one user per team and a service account for CI.Setup #
Guided steps, with their solution.
1. Start Grafana
Why? A throwaway instance lets you test safely.
Start Grafana with Docker Compose and check/api/health.2. Create an admin service account
Why? Scripts must not use the admin account.
With theadminaccount, create thetp-adminservice account (Admin role) and a one-day token.3. Create teams and users
Why? Rights go to teams, never to people one by one.
Create the Production, Infrastructure and Development teams, one user (Viewer role) per team, and add each user to their team.4. One folder per team
Why? Without removing default permissions, every Viewer would see every folder.
Create one folder per team, give edit rights to the owning team and view rights to the Infrastructure team on the Production folder. Replace the default permissions.5. Check access
Why? Separation is proven by acting as each user.
With each user account, list visible folders. Then explain why, in Grafana OSS, the Development team could still query data sources from Explore.
Difficulty level : ●●●○○ (3/5)
My progress
Sign in to track your progress and take notes. Sign in
💬 Recent discussions about this course
- Grafana : une variable « service » qui dépend de la variable « environnement »✓ solved · 1 reply(ies)
Ask a question about this lesson →See all discussions about this course
Course Glossary
Alerting
The process of notifying teams (via email, Slack, Teams) when a specific event, threshold breach, or anomaly is detected.
HTTP Code 200 (OK)
An HTTP status code indicating that the client's request was successfully processed by the server.
HTTP Code 403 (Forbidden)
An HTTP status code indicating that the server understood the request but refuses to authorize it, usually due to a lack of permissions.
HTTP Code 404 (Not Found)
An HTTP status code indicating that the requested resource could not be found on the server.
Grafana
An open-source interactive data visualization platform that allows users to create, explore, and share analytic dashboards from multiple time-series d...
Recommended Articles
Grafana administration and security: organizations, teams, RBAC, service accounts and authentication
Running Grafana in a company: organizations, teams, folders, roles and RBAC, data source permissi...
Automating Grafana: HTTP API, Terraform and dashboard lifecycle
Industrializing Grafana: HTTP API (folders, dashboards, users, data sources), Terraform provider,...
Enterprise features
Grafana Enterprise features (also in paid Grafana Cloud tiers): fine-grained RBAC, data source pe...
Correlations in Grafana: jump from one data source to another
Create links between data sources in Explore: query and external correlations, variables, regex a...
Grafana best practices: dashboards, provisioning, performance and security
Grafana best practices: designing readable dashboards, variables, dashboards as code, provisionin...
Grafana cross-dashboard variables: share variables across dashboards
Create your Grafana variables once and reuse them everywhere: global or folder scope, enabling, a...
Grafana announcement banner: inform every user
Show a message at the top of every Grafana page: enabling it, the Message field with Markdown and...
Grafana in high availability: multi-instance architecture, PostgreSQL and load balancer
Making the Grafana server available: standalone or multi-instance architecture, shared PostgreSQL...
The LGTM stack (Loki, Grafana, Tempo, Mimir): architecture and setup
Grafana Labs' LGTM stack: Loki for logs, Grafana for visualization, Tempo for traces, Mimir for m...