Access model

Every read and every write in the Ontology is checked against one access model, whether it comes from a person in the Operations view, a developer's SDK client or an agent. Groups say who administers and who may apply each action, row access says which objects a person may see, field access says which fields of those objects they may see, and access labels are required controls that override all three. Agents act on behalf of a person and never exceed that person's access. On request, roles and custom roles add a further layer

GroupsAdministrators, and who may apply each action
Row accessRow policies on object types, evaluated per object
Field accessHide properties from groups, or seal them under a label
Access labelsRequired; a reader must hold every access label on the data

In the platform today

Built
  • The platform service checks every read and write with tests, in all three demo workspaces
  • People are users in ontology.yaml with groups, attributes and access labels, signed in through OpenID Connect as described below
  • Members of the admins group administer; an action type limits who applies it with allowedGroups
  • People also come from the directory, kept in the lake on top of users:: identity providers push people and groups over SCIM 2.0 at /scim/v2, group-mapping rules turn provider groups and token claims into groups, access labels and attributes, memberships can end on a date, and deactivating someone refuses them from the next request, with their automations handed to a service owner, as described on directory, SCIM and offboarding
  • Row access is row policies on each object type, rowPolicy: { property, attribute } or a list of them, which keep the objects whose property is in the user's attribute list for every policy, with '*' for all
  • The policies apply to object reads, links, aggregations, search, SQL over objects.*, the action log, notifications and push updates, and an action refuses an object parameter outside the caller's rows
  • Field access hides a property from the groups in hiddenFrom, and a sealed property is withheld from anyone without its access label
  • An object type, action type or dataset can carry one access label
  • Agents and automations act as a person and never exceed that person's access
On request
  • Roles, custom roles, policy expressions, masking, the explain endpoint, token exchange and "View as"

Principals, users and groups

A principal is anything that can make a request. There are three kinds. Users are people, identified by your identity provider. Service principals are applications and integrations that authenticate with OAuth 2.0 client credentials. Agents are configured reasoners in the agent runtime; an agent is not a principal on its own and can only act inside a request made on behalf of a user, as described below

Access is granted to groups, not to individual users, wherever possible. Groups can come from your identity provider at each sign-in, as described below, from SCIM 2.0 provisioning, or be managed in the platform by Administrators. With SCIM, your identity provider creates, updates and deactivates people and groups at /scim/v2, and a change takes effect on the next request. A deactivated person is refused from their next request with USER_DEACTIVATED, tokens issued before the cut-off stay refused with TOKEN_REVOKED even after reactivation, and the automations, alert rules, connectors and folders they own keep running under a named service owner, recorded on their entry. See directory, SCIM and offboarding

User attributes, such as shops, issueAccess, site or employeeType, are available to policies as user.<attribute>. Attributes come from ontology.yaml, from the person's directory entry, set by an Administrator or pushed over SCIM, and from group-mapping rules that read the identity provider's groups and claims, such as Station-YHZ giving stations: [YHZ], so a shift lead who moves from one shop to another sees the new shop's schedules without anyone editing a policy

Sign-in

Sign-on with OpenID Connect is built in the platform service. Every request carries an access token from your provider, such as Entra ID, Okta or Keycloak. The service checks its signature against the provider's published keys and its issuer, audience and expiry, then maps it to a user in the ontology by user name or email. The app signs in with the authorization code flow and PKCE, refreshes the token before it expires, and signing out ends the provider's session too. Multi-factor authentication is enforced by your provider

# ontology.yaml; the issuer and audience are service settings
auth:
  groupMap:                        # provider group to ontology groups
    Ops-Leads: operations
    QA-Lab: [quality, lab]
  # true adds unknown people with mapped groups and no access labels
  autoProvision: false
  emailDomains: [creamery.example]
  serviceClients:                  # client credentials tokens run as a named service user
    markland-automation: { user: svc.automation, groups: [operations] }

Groups in the token are added to the person's ontology groups, never removed, so a run rebuilt for the same person, on a branch or by an agent, keeps them. Access labels are never taken from the token. Sign-ins and refusals are audited. A service setting lists the browser origins that may call the API from another origin; by default none may. SCIM 2.0 provisioning is on directory, SCIM and offboarding. SAML 2.0 is delivered on request; see the compliance page

Roles

Members of the admins group administer the ontology, and an action type limits who may apply it with allowedGroups. Action types also carry their own action conditions, so a person can be prevented from releasing a batch unless they are in the quality group and the batch has a passing quality check. On request, roles granted to groups on projects and types, and custom roles

Administrator does not mean unrestricted

Administrators see every row, but they do not automatically hold access labels. An administrator who does not hold QUALITY cannot read lab and line results, and holding the access label is a separate grant

Row access

Row access decides which objects of a type a person can see. A row policy on the object type keeps the objects whose property value is in the person's attribute list, with '*' for all, and a list of policies keeps only the objects that pass every one. Administrators see every row

# ontology.yaml, under the object type
rowPolicy: { property: shopId, attribute: shops }

Row policies apply to object reads, links, aggregations, search, SQL over objects.*, the action log, notifications and push updates, and an action refuses an object parameter outside the caller's rows. On request, row policies written as expressions over properties, groups and links

Field access

A property with hiddenFrom does not exist for readers in the listed groups: it is left out of reads, search, aggregation and links, and naming it in a query is an unknown property. A property sealed under an access label is withheld the same way from anyone who does not hold the label, administrators included; see encryption. On request, properties masked for some groups rather than hidden, such as a rounded cost

Access labels

Access labels are required access controls attached to data: a dataset, a column, an object type, a property or an individual object. To see labelled data, a principal must hold every access label on it. Access labels sit above roles and policies: a role or a permissive object policy can never grant access to labelled data the reader does not hold the access label for. They also travel with data, so a column marked FINANCE marks every derived column and property computed from it. The access labels page covers propagation and declassification in detail

How a read is evaluated

Every object read follows the same path, whether it is a single object by primary key, an object set with a link traversal, a search or an aggregation

  1. Resolve the person. The token is validated and the person's groups, attributes and held access labels are loaded, including any granted for a time. If the request is made by an agent, the person is the one the agent acts for
  2. Check the type's access label. If the object type carries an access label the person does not hold, the type answers as not found, so its existence is not disclosed
  3. Apply row policies. Objects outside the person's rows are not returned and do not appear in counts or aggregations
  4. Remove hidden properties. Properties hidden from one of the person's groups, and sealed properties whose access label they do not hold, are left out

Writes follow the same path first, since an action must read its target objects, then add the action type's own checks: who may apply it and its action conditions

Agents and services acting on behalf of a person

An agent never has standing access of its own. Agents and automations run as a person and never exceed that person's access, and a client credentials token runs as the named service user set under auth.serviceClients. On request, an app can act for a signed-in person with a short-lived token

Testing and explaining access

On request, owners can see why someone can or cannot see an object, and view a screen as a chosen person would see it

Limitations

  • Sign-on with OpenID Connect and SCIM 2.0 provisioning are built. SAML 2.0 is delivered on request
  • Groups and access labels from the directory, SCIM and mapping rules are only ever added to the ones in ontology.yaml. To take one away, edit the file or end the membership
  • Policies are evaluated per object type. There is no single policy that spans several types, so a rule shared by types behind an interface is written once per type
  • An agent, automation or service acting for a person can never exceed that person's access, and there is no way to grant an agent standing access of its own

Related