Run Kuriko

Access policy

Who can do what in an install lives in one file, policy.yaml, in the install's folder of your installs repo. To change access, edit it and run kuriko policy apply.

Changing access

  1. Edit policy.yaml

    In the install's folder, in any editor. The common changes are below.

  2. Apply

    Terminal
    kuriko policy apply

    Run it anywhere in your installs repo; with several installs, it asks which. It shows exactly what will change and asks before doing anything. If anyone would lose access, the default answer is no. Then it offers to commit and push, so your repo records who had access, and when.

    Output
    → What changes    + sales@acme.com: read on warehouse: deals, accounts (masked: contact_email)    + people can connect with Codex Apply these changes? [Y/n]

To see what a change would do without making it, for example while reviewing a pull request, run kuriko policy plan. It checks the file and shows the same changes, and never touches anything.

Common changes

Make a group admins or builders

policy.yaml
roles:  platform@acme.com: Admin  eng@acme.com: Builder

Admins see everyone's access and the audit log; builders make tools. Everyone else who can sign in is a Viewer. Details in roles.

Let a group use a data source

policy.yaml
access:  - group: sales@acme.com       # or everyone    connector: warehouse    resources: [deals, accounts]    access: read              # or write, which includes read

The data source has to be in connectors first. Setting one up is on Data sources.

Hide fields, or show only some rows

policy.yaml
access:  - group: sales@acme.com    connector: warehouse    resources: [deals]    access: read    mask: [contact_email]     # comes back as •••    rows:      rep_email: $me          # each rep sees only their own deals

More in Row rules.

Allow an AI app

policy.yaml
clients:  - claude-code  - claude  - codex                     # remove the # in front to allow one

The apps Kuriko knows by name are in clients.

Checking what someone has

  • In their AI tool: ask Kuriko whoami. It shows their role and the data access policy.yaml gives them, as of their last sign-in.
  • Groups: kuriko groups lists your Google groups and marks the ones policy.yaml uses. Kuriko only looks at those, so someone's other groups never show up in Kuriko.
  • History: your installs repo shows every change to the file; Kuriko's audit log shows each apply and who ran it.

policy.yaml reference

acme-kuriko/policy.yaml
# Google groups -> Kuriko role. Everyone else who can sign in is a Viewer.roles:  platform@acme.com: Admin  eng@acme.com: Builder  ops@acme.com: Builder # Data sources tools can use. Credentials stay in Secret Manager; this file only names them.connectors:  hubspot:    name: HubSpot    kind: api    base_url: https://api.hubapi.com    secret: hubspot-private-app-token    resources:      contacts:                 # the name tools use        path: /crm/v3/objects/contacts        rows: results        add: { path: /crm/v3/objects/contacts, body: { properties: $row } }   # tools may add contacts  warehouse:    name: Warehouse    kind: bigquery            # no secret: the dataset's owners grant Kuriko read access    dataset: analytics # Who may use which data. write includes read.access:  - group: everyone    connector: hubspot    resources: [contacts]    access: write  - group: finance@acme.com    connector: warehouse    resources: ["*"]          # every table    access: read  - group: sales@acme.com    connector: warehouse    resources: [deals, accounts]    access: read    mask: [contact_email]     # comes back hidden # AI apps people may connect with. Remove the # to allow one.clients:  - claude-code  - claude  - codex  # - cursor

The file has four sections. Anything not in it doesn't exist: a group with no role is a Viewer, a data source that isn't listed can't be used, nobody can use data no grant gives them, and only the AI apps in clients can connect.

roles

Maps one of your Google groups to a Kuriko role. Someone in several groups gets the highest role any of them gives. Groups inside groups count.

RoleWho it's for
AdminThe platform team: sees everyone's access and the audit log, manages any tool.
BuilderPeople who build tools with their AI tool.
ViewerEveryone else, automatically. You never need to list it.

connectors

Each entry is a data source tools can use, under an id tools refer to it by (lowercase, like hubspot). Each names a secret in Secret Manager (except BigQuery, which needs none). Kuriko's gateway is given access to exactly the secrets named here, and loses it when they're removed.

kindSettingsResources are
bigquerydataset, and project if it isn't Kuriko'sTables and views
snowflakesecret (private key), account, user, role, warehouse, database, schemaTables and views
postgressecret (connection URL), schemaTables
apibase_url, secret, auth, resources (name → path, rows, paging, and add to take new rows); per-person adds oauthThe resources you describe

Add credentials: per-person to an api source for each person to connect their own account. Every setting, with examples, is on Data sources.

access

A list of grants. Each gives a group access to some of a data source's resources.

FieldValue
groupOne of your Google groups (a group email, like sales@acme.com), or everyone for anyone who can sign in.
connectorThe id of a data source in connectors.
resourcesWhat's granted: table or view names for a database or warehouse, or the resource names the connector lists (an API's resources). ["*"] means every table, including ones added later.
accessread, or write (which includes read). Write only on resources that take new rows: an api resource with add.
maskOptional. Field names that come back hidden (as •••) for this group.
rowsOptional. Only the rows that match: see Row rules.

Someone in several groups gets all of their grants. A field is masked only if every grant that gives them the resource masks it, so the less restricted grant wins. A table is in at most one grant per group, data source and access level: list several resources in one grant, or give tables their own grants to give each its own row rule.

Row rules

A grant can cover only some rows. The same tool then shows each person the rows their own groups allow: a sales dashboard shows each rep their own deals, and finance the closed ones without who closed them.

policy.yaml
access:  - group: sales@acme.com    connector: warehouse    resources: [deals]    access: read    rows:      rep_email: $me          # each rep sees only their own deals  - group: finance@acme.com    connector: warehouse    resources: [deals]    access: read    rows:      stage: [won, lost]      # finance sees closed deals,    mask: [rep_email]         # without who closed them
  • Every field in rows must match. A list means any of those values.
  • $me is the email of whoever is using the tool, matched whatever its case.
  • Values are compared as text, so 5 matches "5". A list field, like an array of tags, matches if any of its items does.
  • For a database or warehouse, fields are column names; for an API, the fields of each row, with dots for nested ones (assignee.email).

Rules go into the data source's own query, so a tool gets the person's rows, not a filtered page of everyone's, and Kuriko checks each row again before it leaves. Someone in several groups sees every row any of them allows, and each row is masked only by the groups that allowed it: a rep who is also in finance sees their own deals with names, and other people's closed deals without. On a write grant, a rule decides which rows someone may add: with rep_email: $me, a rep can only add deals as themselves.

clients

Which AI tools may connect to your Kuriko. Whatever connects acts as the person who signed in, with their access, so only the clients you list can start a sign-in. Kuriko knows the well-known ones by name; add any other by its client metadata document URL. kuriko install asks which to allow, and writes the rest into the file commented out.

NameClientCan connect
claude-codeClaude CodeYes
claudeClaude (claude.ai, desktop and mobile)Yes
codexCodex (CLI and IDE extension)Yes
vscodeVS Code (GitHub Copilot)Yes
cursorCursorYes
lovableLovableYes
chatgptChatGPT (chatgpt.com and its apps, including Codex there)Yes. One entry covers all of ChatGPT
replitReplitNot yet: signs in without a metadata document
boltBoltNot yet: same
v0v0Not yet: being checked

Listing one that can't connect yet is refused, with the reason, when you plan.

policy.yaml
clients:  - claude-code  - claude  - codex  # - vscode  # - cursor  # - lovable  # - replit     # not yet  - https://tools.example.com/oauth/client-metadata.json

Without a clients section, Claude and Claude Code can connect. Take a client out and it stops getting tokens within seconds; its sessions end within an hour.

Safety checks

  • Mistakes stop before anything changes. Every problem in the file is listed at once. A value that looks like a pasted credential, where a secret's name belongs, is refused.
  • Nothing changes under you. If access changed since apply showed you the plan, it stops and asks you to run it again. A data source a tool depends on can't be removed.
  • Every change is audited, under the name of whoever applied it.

policy.yaml is the only way to change access. If an admin asks their AI tool to grant access, Kuriko replies with the YAML to add to the file instead, so every change goes through the file. How Kuriko handles the secrets the file names is on Security.

Coming soon: access requests. A builder's AI tool files a request, and approving it opens a pull request with the policy.yaml change.