Guides

Keys and roles

Three roles: admin, viewer and gateway. What each can do, and how keys are created and revoked.

Access to the control plane is by key. Every key belongs to one organisation and has one role. The role is checked by the server on every request, so a hidden button is never the only thing standing between a viewer and a change.

#Roles

RoleIntended forCan
adminThe people who manage RakuvoEverything: change layer settings, create and revoke keys, manage alert rules, and read all data.
viewerAnyone who needs to see itRead the summary, charts, runs, memory graph, alerts and usage. Cannot change anything.
gatewayA running gatewayPull the configuration and send traces and memory facts. Cannot read the dashboard data.

#Creating a key

In Team, choose a name and a role. The secret is shown once, when the key is created, and cannot be shown again, so copy it then. Over the API:

bash
curl -X POST "$RAKUVO_API_URL/v1/keys" \
-H "Authorization: Bearer $ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "prod gateway", "role": "gateway" }'

#Revoking a key

Revoke it in Team, or with DELETE /v1/keys/{id}. It stops working immediately. Create a replacement first when it is a gateway key, so the gateway can be restarted with the new one.

#Good practice

  • Give each gateway its own gateway key. A leaked one can only send data and pull settings.
  • Give people viewer keys unless they need to change settings.
  • Name keys after what uses them, so a revoked key is easy to identify.
  • Keys are not personal accounts. Named users, email invitations and single sign-on are not part of the product yet.

#Which routes need which role

Routeadminviewergateway
GET /v1/configyesyesyes
PUT /v1/configyesnono
GET, POST, DELETE /v1/keysyesnono
GET /v1/summary, /v1/series, /v1/runs, /v1/usage, /v1/alertsyesyesno
GET /v1/memory/graphyesyesno
POST /v1/alerts/rules, PUT and DELETE on a ruleyesnono
POST /v1/ingest/events, POST /v1/ingest/memoryyesnoyes