Docs
Live demo

Create a template

Define a reusable permission set once and assign it to people or groups with rules.

On this page

Before you start: Admin role. For a single-server template, run discovery on that target first.

Swipe the screenshot sideways to see all of it, or tap it to open it full size.

Create template: name, engine, a quick start (read-only or read-write), and the scope. This screenshot comes from an earlier version of the design: the console form also asks where the template applies, One server or Any server of a type.
  1. Engine: PostgreSQL, MySQL / MariaDB, ClickHouse or Kubernetes. It decides which permissions you can pick.
  2. Quick start fills common permission sets.
  3. Scope: target-specific (objects of one target) or target-wide (shared objects that are the same on every target).
  1. Open Rules & templates, click Create, choose Create template.
  2. Enter Name (no /, renamable later) and optional Description.
  3. Pick One server (select Server for discovered objects) or Any server of a type (engine only). For SSH use SSH template. For web apps see Put a web application behind Principal sign-in.
  4. Optionally set Longest temporary access and Suggested expiry.
  5. Under Databases, pick Select or All.
  6. Under Permissions, pick a preset (Read-only, Read-write) or add an Object scope (public.*) via Add object scope. Enable Also objects created later for future tables.
  7. Click Create.

The template opens with Access map, Rules and Permissions. Click Give access (Create a rule).

Through the API#

Create with POST /access-templates (masks start with schema, empty body returns 400 request.invalid):

json
{"name":"warehouse-read-only","engine":"postgres",
 "description":"Read-only access to the public schema.",
 "body":{"targeting":{"discovery":{"database":"app"}},
         "grants":[{"target":"public.*","privileges":["SELECT"]}]}}
↑ ↓ to moveEnter to openEsc to close