Skip to content

Permissions and groups

Permissions are granted to groups, never to people one by one, and they add up: a person receives the union of the permissions of all their groups. Data permissions are enforced by Trino itself, which queries the API before each statement: the visual editor, SQL, dashboards, the copilot, the API and the MCP server all go through it. See Principles.

Two groups always exist:

GroupRole
Administratorsread everything, can do everything; their permissions cannot be configured
All usersevery person belongs to it; its membership cannot be changed. Whatever is granted to it, everyone has

Other groups are created in Administration › Groups. Grant broad access to dedicated groups rather than to All users.

In Administration › People, an administrator:

  • creates a person, with a password (at least 10 characters) or without one — they will then sign in through single sign-on;
  • invites them: a link valid for 7 days, sent by e-mail if an SMTP server is configured, to be passed on by hand otherwise;
  • sets their groups and attributes;
  • deactivates them: their sessions are closed immediately.

Without being administrators, a group can receive three permissions, which only administrators can grant:

PermissionAllows
Manage data sourcesconnecting databases, changing their settings, starting a sync
Manage metadatalabels, descriptions, semantic types, relationships and values in Structure
Manage permissionsgroups, members, data permissions

Administration › Permissions sets, for a group, access to an entire source, then refines it per schema or per table. For a group, the most specific setting wins; Inherited takes the level from above.

AccessEffect
No accessthe source, schema or table does not exist for the group
Viewall rows and all columns
Restrictedreadable, under the group’s column and row rules; never in native SQL

“View” wins over “Restricted”: if another of the person’s groups reads the whole table, this group’s column and row rules do not apply.

A forbidden table is invisible everywhere: autocomplete does not suggest it, SHOW TABLES does not list it, and a query that mentions it fails with “Data access denied”.

Alongside access, each group receives a query level per source: what it can write against it.

LevelAllows
No queriesreading existing questions and dashboards, without writing any
Visual editorbuilding questions with the mouse
SQLwriting Trino SQL, custom columns and SQL conditions
Native SQLwriting in the database’s dialect, if the source allows it

On a table with Restricted access, each column is configured for the group:

AccessEffect
Readablethe value as is (default)
Maskedthe column exists, but Trino replaces its value
Hiddenthe column no longer exists for the group: absent from SELECT *, rejected if named

The mask of a masked column is a Trino expression on the column, for example substr(email, 1, 3) || '…'. Without an expression, a text keeps its first two characters followed by •••, and any other value becomes NULL.

A table with Restricted access can carry, for a group, a row rule: conditions on its columns, combined with all conditions (and) or at least one condition (or). Operators: is equal to, is not equal to, is one of, is not in, is greater than (or equal to), is less than (or equal to), contains, is empty, is not empty.

A value can reference an attribute of the person reading:

region is equal to {{user.region}}
canal is one of {{user.canaux}}
vendeur is equal to {{user.email}}

The rule is translated into a row filter that Trino adds to every read of the table, wherever it comes from.

  • Attributes are entered on the person (Administration › People), or come from the claims of your OIDC provider. Three are built in and are not entered: {{user.id}}, {{user.email}} and {{user.name}}.
  • Multiple values. An attribute containing commas (Bretagne,Normandie) holds multiple values: is equal to {{user.region}} then lets both regions through.
  • A missing attribute closes access. A person without the referenced attribute sees no rows: a missing attribute never opens access.
  • Multiple groups. A person sees the rows that any one of their rules lets through. A group with Restricted access without a rule on the table reads all its rows.
  • A broken rule closes access. If a referenced column disappears, the rule lets nothing through, rather than everything.

Content — questions, models, metrics, dashboards — is organized in folders, whose permissions are also set per group, in the Folders tab of Administration › Permissions:

PermissionAllows
Nonethe folder is invisible
Viewopening its content
Editcreating, editing, moving and deleting content in it
Manageas well as setting the folder’s permissions

A folder’s permissions apply to its content and its subfolders, unless set more finely. Personal folders remain private. An item can additionally be shared with a person or a group, for reading or editing. The two mechanisms add up: see Sharing.

  • The session is an httpOnly, SameSite=Lax cookie, valid for 14 days by default (SESSION_DAYS); it becomes Secure when the public URL uses https://.
  • Any write made with this cookie requires the X-Eodia-Csrf: 1 header, which another site cannot set.
  • An integration token eoi_… carries its owner’s permissions, no more and no less.

Administration › Audit log keeps a record of every sensitive action: failed sign-ins, password changes, people, groups and members, permissions, sources and metadata, folders, shares and links, tokens, invitations, integration secrets and settings. You can filter it by action type or by person.

eodia insights is free software by Eodia.