Roles and Permissions#
A member's project role decides what they can do with the project's semantic projects. The built-in roles are Data owner, Data scientist, Observer and Feature store restricted; a custom project role is a Data owner or Data scientist with some permissions removed.
What each role can do#
| Action | Data owner | Data scientist | Observer | Permission |
|---|---|---|---|---|
| List semantic projects, open their overview, builds, metrics, saved queries, dimensions and tags, and read the definition files | Yes | Yes | Yes | View & query |
| Query metrics from the UI, Python, the CLI, dbt clients and BI tools | Yes | Yes | Refused by Trino | View & query |
| Read the connection details | Yes | Yes | Yes | View & query |
| Read the query history | Every member's | Their own | Their own | View & query |
| Register a semantic project and change its root path, format and deployment mode | Yes | Yes | No | Create & edit |
| Compile and promote builds | Yes | Yes | No | Create & edit |
| Save and delete definition files in the editor | Yes | Yes | No | Create & edit |
| Create Superset dashboards from metrics | Yes | Yes | No | Create & edit |
| Delete a semantic project, whoever owns it | Yes | Yes | No | Delete |
| Transfer ownership of a semantic project | Yes | No | No | Create & edit |
| Run an export now | Yes | No | No | Run exports, with Jobs |
| Own a semantic project whose exports run | Yes | No | No | Run exports, with Jobs |
| Attach and remove tags | Yes | Yes | No | Tags |
- The Permission column names the Semantic layer permission of a custom project role that the action needs, except Jobs and Tags, which are permissions of their own. A custom role that removes the permission is refused with 403, in the UI and over REST, and the UI hides the buttons for it.
- An Observer reads the semantic project, but their metric queries fail, since Trino gives an Observer no access to the project's feature groups. Observers have no Superset account, so they get no semantic connection in Superset.
- Feature store restricted members are refused every semantic layer request with 403
SEMANTIC_LAYER_FORBIDDEN, since a semantic project reads every feature of a feature group. - A metric query runs on Trino as the member who asks, so each member sees only the rows and columns their own Trino rules allow, see Who a query runs as.
Owner#
The member who registers a semantic project becomes its owner, whatever their role. The export jobs run as the owner, who must be a Data owner whose role allows Semantic layer: Run exports. A semantic project a Data scientist registers therefore has exports without jobs, with the status OWNER_NOT_DATA_OWNER, until a Data owner transfers it to a Data owner. Everything else a semantic project does works the same whoever owns it.
Access to the definition files#
Hopsworks reads and writes the definition files as the member who asks, so HopsFS permissions apply on top of the project role, as in the file browser.
| Request | Without HopsFS read access to the root path | Without HopsFS write access |
|---|---|---|
| Compile | 403 SEMANTIC_LAYER_FORBIDDEN, Cannot read the root path ...; no build is recorded, and the serving build stays as it is | Not needed |
| Open the editor | 403 SEMANTIC_LAYER_FORBIDDEN, Cannot read the files under ... | The editor is read only |
| Query metrics, list metrics and saved queries | Not needed: they come from the served build | Not needed |
A member's home folder under Users/ is readable only by that member. Keep definitions that several members change in a shared dataset, such as Resources, or in a git repository cloned in the project, so every Data owner and Data scientist can compile them.
API keys#
An API key acts with its user's role, and needs:
| Scope | For |
|---|---|
FEATURESTORE | Semantic projects, builds, definition files, tags, exports and the query history. |
TRINO | Everything the semantic gateway answers, from listing metrics to running a query, since the gateway connects to Trino as the key's user. |
JOB | Running an export now. |