Back to blog
Directory Sync for an AI Ontology: Access Follows the Source

This blog is written by AI for SEO

Directory Sync for an AI Ontology: Access Follows the Source

HelixDB9 min read

Ontology directory sync keeps your users and groups in step with your company directory so that access to an ontology follows access to the sources behind it. It is not a login feature. In Helix Foundry, the open-source ontology builder from HelixDB, every fact and relationship is grounded in a source, so a person who cannot read a source cannot see anything in the ontology grounded by it.

That matters the moment you point an AI agent or a whole company at one connected graph. The graph merges Stripe, a CRM, a Postgres database and a folder of contracts into one model. If permissions on that model are looser than permissions on the sources, you have built a leak. This post answers the practical questions in order: what directory sync does, why an ontology needs it, how Foundry handles it, how to set it up, and where the limits are.

The short answer: access follows the source, directory sync keeps the groups current

Access to the ontology follows access to the source, and directory sync keeps the groups that decide that access current. Those are two separate jobs, and mixing them up is the usual mistake.

Source-grounded access answers "what may this person see?" Directory sync answers "who is this person, and which groups are they in today?" If the second answer is stale, the first one is wrong by definition. A contractor who left last month still holds a group, and the group still reads the billing data.

Helix Foundry has RBAC and enterprise directory sync on by default, and access to both the sources and the ontology is authenticated. The rest of this post explains what that means in practice.

What directory sync does, and why an ontology needs it

Directory sync copies people and groups from your company directory into another system and keeps them matched as the directory changes. It is the answer to the old question "what does Active Directory integration mean?": the application stops keeping its own list of users and learns who exists and who belongs where from the directory instead.

The other old question, "how long does Active Directory take to sync?", has no single answer. It depends on the directory, the connector and its schedule, so check the interval your own setup uses and treat it as a real window during which a departed person may still hold a group. That window is exactly why you want group membership, not individual grants, to carry access. Remove someone from a group in the directory and every grant that group held goes with them.

An ontology needs this more than most tools. A normal app has one data store and one permission model. An ontology reads many sources and presents one graph. Without synced groups, you either maintain a second list of who may see what, which drifts, or you give everyone the same view, which leaks. Neither is acceptable when AI agents query the graph on behalf of staff.

Why permissions on an ontology are hard: one graph, many sources, one reader

Permissions on an ontology are hard because one node can carry facts from several sources, and the person reading it may be allowed to see only some of them.

Take a customer record. The name came from your CRM, the invoices from Stripe, the support history from a ticket tool, the contract terms from a PDF. Four sources, four different audiences. A finance analyst may read Stripe and not the call notes. A support lead may read tickets and not billing.

There are three ways to get this wrong:

  • One shared view. Everyone sees the merged graph. Simple, and a leak by design.

  • Permissions copied onto the graph. You re-create the rules on the ontology. They work on day one and diverge from the sources by day thirty.

  • Agents with a service account. The agent can read everything, so anyone who can ask the agent can read everything.

The fix is to stop treating the ontology as its own security domain. Let the source decide. That is the design Foundry follows, and the broader argument is laid out in Ontology Access Control: Who Sees What Your Agents Know.

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

Foundry combines three things: role-based access, directory sync, and source-grounded access to the ontology.

RBAC. A hosted workspace has owners, admins and members. Owners and admins manage connections, ontologies, members and access. Members see only what they are granted.

Directory sync. People and groups come from your company directory, so grants can be assigned to teams rather than to individuals, and group membership tracks the directory.

Source-grounded access. Every value and relationship in the ontology traces to the row or document quote it came from. So a user, or an agent acting for them, can retrieve only what is grounded in sources they are allowed to read. A user who cannot see a source cannot see anything in the ontology grounded by it.

Two more facts keep this honest. Foundry's connectors only read; it never writes to your sources. And access applies to the current ontology data built from the shared sources, so it follows what the graph holds now, not a snapshot.

Setting it up in Helix Foundry: Helix Cloud or BYOC, grants, and agent keys

Set up the workspace first, then connect sources, then grant them to groups. Order matters because a member given their first sources becomes restricted to those sources.

1. Choose where it runs. Helix Cloud at foundry.helix-db.com is the fastest start, and its Set up with your agent flow lets a coding agent do the wiring. If your data must stay in your own cloud, Foundry also deploys BYOC (bring your own cloud) and works with self-hosted models and your own inference.

2. Connect sources. Add a database, a SaaS connector or a document set, test it, and sync its tables. Credentials are entered in Foundry, never through an agent.

3. Grant sources, not people. Owners and admins share sources at three levels: a whole connection, an individual table, or a document set. Create a team, add members, and grant sources once to the team.

4. Issue agent keys. Create a key under Agents and grant it sources. The key can read and ask questions only about the data those sources cover, through the Helix MCP. Copy it when it is created, because it is shown only once.

If you want to see the shape of a first build before touching permissions, Build a Customer Ontology From Attio, Granola and Stripe walks through one.

Keeping groups in step as people join, move and leave

Because grants sit on groups, the directory does the work when someone's role changes. The three events to plan for:

  • Joiners. A new hire lands in their directory groups. Once those groups map to Foundry teams, they inherit exactly the sources that team holds. No one files a ticket to add them to ten tools.

  • Movers. Someone moves from support to finance. Their directory groups change, so their reach changes with them. The risk is the gap before the sync catches up, so confirm your sync interval and do not rely on it for same-minute revocation.

  • Leavers. Disable the account in the directory and drop the groups. Foundry's team model also helps here: deleting a team removes its grants, though members keep any sources granted another way, so audit direct grants as well.

One habit pays off more than any setting. Grant to teams, never to individuals, except for deliberate one-offs. Individual grants are the ones that outlive the person's reason to have them.

Agents deserve the same discipline. An agent key is a standing credential, so scope it to the narrowest set of sources the job needs, and revoke it when the job ends.

Honest limits: table-level grants, the local install, and the database itself

There are three limits worth knowing before you rely on this.

Grants are only as fine as the source. You can share a connection, a table or a document set. If one table mixes data with different audiences, such as a customers table where some rows are restricted, a table-level grant is too broad for it. Split the sensitive data into its own table or document set at the source, then grant accordingly.

The local install is single-user. The open-source install on your computer is for one person, runs on localhost with no sign-in, and stays on 127.0.0.1. It is a way to try Foundry on your own data, not a place for a team. Never expose it to a network. Teams and directory sync belong to the hosted workspace or a BYOC deployment.

HelixDB itself has no per-user permissions. Foundry loads the ontology into HelixDB, the graph-vector database underneath, and HelixDB does not provide per-user permissions or row-level access control. The access model described here is Foundry's, and it is Foundry that enforces it. Tenant partitioning in the database is isolation between tenants, not user-level access.

One related distinction: project-level query access on a Helix project is broader than source sharing, so keep the two apart when you design who can reach what.

How Foundry compares on the criteria that matter

When you evaluate any ontology tool for directory sync, test these criteria, not the feature checkbox.

Criterion What to ask Foundry
Access follows the source Can a user see facts from a source they cannot read? No: access to the ontology is grounded in source access
Group-based grants Can you grant to a team, not only a person? Yes, teams hold source grants
Granularity How fine can a grant go? Connection, table or document set
Agent scoping Can an agent key be limited? Yes, per-key source grants through the Helix MCP
Deployment Can it stay in your cloud? Helix Cloud or BYOC, with self-hosted models
Audit of reads Do connectors write back? No, connectors only read

The last row is easy to overlook and worth keeping. A permissions model is only as safe as the system's refusal to change your sources.

Start with one source, one team, one agent key

Directory sync does not decide what your ontology reveals; the source does, and sync keeps the groups honest. Connect one source in Helix Foundry, grant it to one team, issue one scoped agent key, then ask a question as a person who should not see that source and confirm the answer is empty. Foundry is open source under Apache 2.0 at github.com/helixdb/helix-foundry, and the hosted workspace is at foundry.helix-db.com.

Try Foundry on a sample company

Sign in and Foundry sets up Acme Corp: its database and documents connected into one ontology you can explore and ask questions of, with a source behind every answer. Then connect your own data.