Back to blog
Ontology Access Control: Who Sees What Your Agents Know

This blog is written by AI for SEO

Ontology Access Control: Who Sees What Your Agents Know

HelixDB9 min read

The way to control who can see data in an enterprise ontology is to tie every fact and link in it to a source, and let a user see only what is grounded by sources they can read. That is how Helix Foundry does it. Role-based access control (RBAC), directory sync and source-grounded access work together, so an agent acting for a user inherits that user's view and nothing more.

The problem is easy to miss because it does not exist in the systems you already secure. Your CRM has permissions. So does your ERP, your document store and your ticketing tool. The moment you merge them into one ontology, you have a new object that links a customer to a contract to a ticket to a Slack thread, and none of those original permissions travel with it by default. This guide covers the general problem first, compares the approaches, then shows how Foundry answers it.

Why an ontology creates an access control problem

An ontology creates an access control problem because it joins records from many systems into one connected model, and a join can reveal what no single source would show a given user.

Take a simple case. Finance can see invoices. Support can see tickets. Neither team can see the other's system. An ontology links a vendor to its invoices and to the tickets mentioning it. A support user asking "what do we know about this vendor?" now gets a graph that includes payment amounts they were never allowed to read in the finance tool. Nobody broke a rule in either source. The merge did it.

Agents make this sharper. An agent queries on a user's behalf, often with broad credentials, and it summarises. A summary can carry a restricted fact into a place no row-level rule can follow. If the agent's service account sees everything, every user of that agent effectively does too.

Three leak paths matter most:

  • Direct reads: a user queries an entity whose properties came from a source they cannot see.

  • Link inference: a relationship between two entities discloses that a restricted record exists, even if its contents are hidden.

  • Agent summaries: a model answers from retrieved context and repeats a fact the user should not have.

The permissions you set in the sources are the authoritative ones. The ontology has to honour them, not replace them with a second, hand-maintained rule set that drifts.

How do you control who can see data in an enterprise ontology used by AI agents?

You control it by enforcing access at retrieval time, as the requesting user, using permissions that trace back to the sources the data came from.

Four properties make that work, whatever tool you use:

  1. Identity flows through. The agent acts as the user, or under a governed identity with that user's scope, not under a blanket service account.

  2. Every fact has provenance. Each value and relationship records which source (a connection, a table, a document set) it came from, so there is something to check against.

  3. The check happens before the model sees anything. Filtering the generated answer is too late, because the restricted fact has already entered the context.

  4. Changes propagate. When someone leaves a team or a source is unshared, their view shrinks without a manual cleanup of the ontology.

If an access design cannot answer "which source did this fact come from, and can this user read that source?", it will leak somewhere. Provenance turns access control from a policy document into something the system can compute.

Approaches compared: object-level rules, RBAC, ABAC and source-grounded access

Object-level rules, RBAC, ABAC and source-grounded access each answer a different question, and the right choice depends on how much of the rule set you want to write and maintain by hand.

Approach How access is decided Strength Where it hurts
Object-level rules A permission set attached to each entity or object type Precise, familiar from tools like Palantir's ontology permissions Someone has to author and maintain rules per object as the model grows
RBAC A user's role (owner, admin, member) Simple to reason about and audit Roles are coarse; they say what you may do, not which data you may see
ABAC Attributes of user, resource and context, such as department or region Expressive, handles row-level and contextual rules Policies multiply; correctness depends on tagging every record with the right attributes
Source-grounded access Whether the user can read the source each fact came from Rules are inherited from systems that already have them; no parallel policy to keep in sync Only as fine-grained as the source grants; it follows your source boundaries

The honest trade-off: object-level rules and ABAC give you more expressive control, and a mature Palantir deployment can model very detailed policy. The cost is that you now own a second permission model over a graph that changes whenever your data does. RBAC alone is not enough for an ontology, because a role does not tell you which merged facts a person may read.

Source-grounded access takes a different bet. Instead of asking you to restate who can see what, it asks one question per fact: can this user read the source behind it? Combined with RBAC for administration, that covers the common enterprise case with far less to maintain. It does not replace an ABAC engine if you need rules that cut across a single source, such as "only rows for my region" inside one table.

How Helix Foundry does it: RBAC, directory sync and source-grounded access

Helix Foundry grounds every fact and link in the ontology in a source, so a user who cannot see a source cannot see anything in the ontology grounded by it. Foundry is the app that connects your databases, tools and documents, drafts one ontology over them and loads it into HelixDB as a connected graph, with each value traced to the row or document quote it came from. Its docs describe the flow, and the code is open source at github.com/HelixDB/helix-foundry under Apache 2.0.

The access model has three parts, all on by default in the enterprise setup:

  • RBAC. Workspace roles are owner, admin and member. Owners and admins manage connections, ontologies, members and access. Members read according to what they have been granted.

  • Directory sync. People and groups come from your enterprise directory, so access is assigned to members and teams rather than maintained by hand.

  • Source-grounded access. Owners and admins can grant a member access to a connection, a single table or a document set. A user then sees only the entities, facts, documents and relationships supported by sources they can read. If a source contributes only part of an ontology, they see only that part. Access to the sources and to the ontology itself is authenticated.

That answers the merge problem directly. In the finance and support example above, the support user holds no grant on the finance connection. Payment amounts grounded in it never appear in their view of the vendor, and the link to them does not surface either.

Two behaviours are worth knowing before you rely on it. The point of this design is that there is no side door: access to the ontology follows access to the source.

Agents, local runs, BYOC and your own models: where the data and the checks live

Where Foundry runs decides where your data sits, and the access checks travel with the ontology wherever it is deployed.

Foundry can run locally, deploy into your own cloud (BYOC, bring your own cloud), and work with self-hosted models, your own inference and a bring-your-own-model setup. It is built on object storage, which is how it scales, with encryption at rest. If your concern is data leaving your boundary, running it in your cloud with your own inference keeps both the graph and the model calls inside it. See the guide to a self-hosted ontology platform for that setup.

One distinction matters for security reviews. The local install from the repository is for one person on their own computer: single-user on localhost, with no sign-in, and it should never be exposed to a network. Authenticated, role-based access is the managed and enterprise deployment, not the laptop install. Don't stand up the local build and put it on a shared host.

For agents, Foundry connects through the Helix MCP, so a coding agent such as Claude Code or Codex can work against the ontology. Evaluate that connection the way you would any agent: confirm which identity it runs as and which sources that identity can read, because that is the boundary the ontology enforces. Foundry's own AI use is also worth reading before you roll out.

Trade-offs and what to verify before you roll it out

Source-grounded access is only as fine-grained as your sources, so verify the boundaries before you trust it.

The real limits:

  • Granularity follows the grant. You can grant a connection, a table or a document set. If you need rules inside a single table, such as per-region rows, that takes a different mechanism, so split the data into separate sources or handle it upstream. Build a checklist for restoring broad access so it is deliberate.

  • Raw database access bypasses it. Foundry loads into HelixDB, and the HelixDB database itself does not provide per-user permissions or row-level security. Anyone with direct access to the underlying project can read around the app's checks. Keep that access to administrators and treat Foundry as the access layer.

  • Owners and admins see everything. Plan role assignment accordingly.

Before rollout, test it like an attacker would:

  1. Create a member with a single source grant and confirm the ontology shrinks to match.

  2. Query a link that crosses into a source they cannot read and confirm it does not surface.

  3. Remove a person from a group in your directory and confirm their view changes.

  4. Ask the agent a question whose answer lives only in a source the user cannot read, and confirm it cannot answer it.

  5. Confirm who holds direct project access and that nobody else does.

If a test fails, fix the grant, not the prompt. A prompt cannot reliably hide data the system already retrieved.

Make access follow the source, then test it before agents depend on it

An ontology is only safe to hand to agents if what a user sees is bounded by what their sources allow. The cleanest way to get that is to ground every fact in a source and check the source, not a second rulebook. Clone helix-foundry, connect two sources with different audiences, restrict a test member to one of them, and run the five checks above before you point any agent at it.

Build with HelixDB

Give your coding agent the setup prompt, or sign up and deploy a database.

Sign up