Governance templates
Definition
A governance template is a named, versioned rule template. It records which EU AI Act or GDPR obligations it covers and maps each obligation onto a setting the product already has — a gateway control, an organisation setting, or a status that is only checked. There are two kinds:
- Myra templates — curated by Myra and the same for every organisation: EU AI Act: deployer obligations and GDPR: personal data in AI use. They are read-only.
- Organisation templates — owned by one tenant, created from scratch or copied from a Myra template.
A tenant's catalogue is the Myra templates plus its own templates — the building blocks of the AI-governance layer.
Function
A template keeps a tenant's regulatory intent in one versioned, auditable place instead of re-deriving it per gateway. The catalogue stores and versions templates; it does not change live configuration by itself. The apply engine does that: for a chosen gateway it previews (diff) or applies a template's target controls — on the gateway and on the gateway's organisation. The preview runs through the same resolver as the live request path and the same permission rule as the apply, so it cannot disagree with the result of a later apply.
Leaves
Each target control names a governable leaf from a fixed catalogue. A leaf has:
- a kind — a switch (on/off) or a number of days (a retention, a minimum: "at least N days", within 30–3650);
- a mode — set (apply may write it) or check (the preview shows whether the requirement is met; apply never writes it);
- a scope — the gateway, the organisation (an organisation setting applies to every gateway of the organisation), or the platform (the deployment);
- a writer — who may write it through apply: a template manager (gateway controls), an organisation admin holding the tenant-settings permission (request-log retention, four-eyes approval, agent review), a platform admin only (the monthly compliance report), or nobody (check leaves; PII masking, which is set on the Privacy page).
| Leaf | Mode | Scope | Writer |
|---|---|---|---|
| EU region routing, provider allowlist enforced | set | gateway | template manager |
| PII masking | set (reported only) | organisation | — (Privacy page) |
| Request-log retention (at least N days), four-eyes approval, agent review | set | organisation | organisation admin |
| Monthly compliance report | set | organisation | platform admin |
| SIEM configured | check | gateway | — |
| Audit chain, audit-log retention (at least N days) | check | platform | — |
The catalogue is served by the Governance templates API. The organisation settings are written by the same writer as the organisation settings page, with the same validation, four-eyes approval and audit rows.
Rules and facts
- Myra templates are global and read-only — every organisation sees them at once; nobody can edit or delete them. They ship with the product, so an update reaches every organisation together, as a new version. The catalogue lists the current version only.
- Copy to customise — copying a template creates an ordinary organisation template (version 1, editable, non-authoritative) that records which template it was copied from. Editing the copy never changes the original.
- Organisation templates are per tenant — visible to and changeable by the owning tenant only.
- Versioned identity — a template is identified by a stable key plus an integer version. A key can have several versions.
- Target controls — each element maps one obligation onto one governable leaf with a target value. The payload is untrusted and validated fail-closed: an unknown leaf, a wrong value type, a number of days outside the leaf's bounds, a loosening value or a duplicate leaf is rejected, and nothing changes.
- Never loosening — a template only tightens: a tighten-only switch can only be required on, a retention is a minimum, and apply never shortens a longer retention. Keeping request logs forever counts as satisfied, with a warning that the GDPR storage limitation principle expects a defined period. (The three original gateway/PII controls still accept on or off; the residency floor guards a downgrade.)
- Never escalating — apply writes only what the person applying may set themselves, decided on the server. A setting they may not set is shown as Needs an organisation admin or Needs a platform admin, is not written, and does not stop the rest. A retention above the organisation's maximum needs a platform admin for everyone.
- Four-eyes approval — while the organisation has four-eyes approval on, a request-log retention change by anyone but a platform admin is held until a second admin approves it, as on the organisation settings page; nothing is written before.
- Check leaves never write — a check shows OK, missing or unknown (never treated as OK). The SIEM check reports only whether a target exists, never its configuration.
- Audited — every apply that writes records one
governance.template_appliedevent (template, version, before/after per setting, what was not written); a no-op records nothing. - The residency floor is never lowered — apply can tighten a residency control but never take it below the tenant's or the deployment's enforced floor. A control that would drop below the floor is reported as blocked and not written. A tenant-scoped control is reported and not written at gateway level.
- Deny-all safety — an apply that would leave a gateway with no usable provider is refused, so a template can never take a gateway offline.
- Manual checklist items — an obligation that no governable leaf covers (for example AI literacy, conversation retention, records of processing, transparency) is a Check manually item: the template lists it with the setting and the place where it is set, and applying the template never changes it.
- Authoritative flag — marks whether a template's mapping is compliance-signed content. Templates are non-authoritative by default and then make no compliance claim. The Myra templates are non-authoritative too (no DPO sign-off) and carry a "not legal advice" disclaimer: they are a starting point, not a legal assessment.
- Soft delete — a deleted template disappears from the catalogue, but its key-and-version slot stays reserved. Publish a new version to reuse the key.
- Purged on offboarding — a tenant's templates are removed in the tenant purge.
See also
- Governance — browsing, creating and applying templates.
- Governance templates API — the
target_controlsshape, governable leaves and diff statuses. - Guardrails and EU data residency — controls that templates target.
- Data retention — the request-log and audit-log retention the retention leaves set and check.
- Compliance report API — the monthly compliance report a template can switch on.
- Multi-tenancy — the tenant isolation model.