On this page
Needs Admin (or custom role with rule change + apply), a managed target and a template.
- Rules & templates → Create → Give access (or Give access on a person/template to prefill). Left Access map updates live.
- People: select users, groups or service accounts (Search users and groups… + kind filter). One rule per identity.
- Permissions: pick a template (grouped by engine, version). Permission preview toggles Visual / Raw JSON.
- Targets: check target (prefilled for single-server templates), or pick all databases, a list or a pattern under Database targeting.
- Expires (optional, individual rules only): Ends — Never, 1 hour, 4 hours, 8 hours, 24 hours, 7 days or Pick a date (max 30 days). Hover icon for exact time.
- Description (optional, max 1000 chars): merged rules keep an existing description if set.
- Verify summary (Creates 1 rule · 1 person × 1 target), click Create and apply. Opens rule History.
When Principal refuses or can’t apply#
| Message | Cause | Action |
|---|---|---|
The template will be added to an existing rule |
Person already has a rule on this target (permissions merge). |
Keep if intended. Deleting later removes both templates. |
A group rule already gives this access |
Group and individual rules cannot combine on one target. |
Remove person from group or delete group rule first. |
This person already has a rule on this target |
SSH, app and expiring rules allow one rule per person. |
Edit or delete the existing rule first. |
Principal doesn’t manage this target, so it doesn’t change access on it. |
Target is in Observe mode. |
Click Manage it on the target, then retry. |
None of the chosen databases has a table this template names. |
Named MySQL / MariaDB table absent in chosen databases. |
Run discovery if new, or pick other databases. |
Saved, but not applied |
Rule saved, apply failed (e.g. account name collision). |
Click Open rule (Apply a rule). |
A table that only some databases have#
- On MySQL / MariaDB, a template naming a table (e.g.
migrations) applies that table only where last discovery found it. Whole-database grants apply everywhere. - Grants with
CREATEorALLapply to all chosen databases (MariaDB accepts them before table creation). - Added or dropped tables require re-running discovery and re-applying or updating the template. Principal sees tables only where its role has privileges (Prepare a target).
Custom rules#
Custom rules define permissions inline without a template. Use for one-offs, and use templates for shared access.
Through the API#
- Create: POST
/policies(or idempotent POST/policies):/ensure json{"subject_id": "<group-id>", "target_id": "<target-id>", "template_name": "warehouse-read-only", "description": "Quarterly audit"} - Preview: POST
/policies./{id} /plan /diff - Apply: POST
/policies(/{id} /apply 202+job_id). - Track: GET
/apply-runsor GET/admin./jobs /{id}
Single-call alternative: POST /grants (Grant access from an integration).