Source permissions & identity mappings
A collection’s group binding decides which groups can retrieve from it. For content synced by a connector there is a second gate: each document carries the ACL of its source item (Slack channel members, Drive sharing, Confluence restrictions, …), and a signed-in user only receives a connector chunk when one of their mapped source principals is on that ACL. Uploaded files have no ACL; the group binding alone governs them.
The filter
Section titled “The filter”For a chat call made by a signed-in end user (portal JWT), retrieval keeps a chunk when:
collection_id ∈ the group's collectionsAND ( source = "upload" OR (source = "connector" AND acl ∩ (user's mapped principals ∪ {"public"}) ≠ ∅))The user’s principals are read from kb_connector_identity_mappings on every grounded call,
so a new or deleted mapping applies to the next question. A user with no mappings still sees
uploads and connector items stamped public (Notion pages, crawled web pages, public repos
and public-link Drive files). If the mapping lookup fails, retrieval fails closed to
that same public-only set.
Principal formats
Section titled “Principal formats”Mappings must match what the connector stamps, exactly:
| Connector | Principal format | Example |
|---|---|---|
| Google Drive | gdrive:user:<email> (lowercase), gdrive:group:<email>, gdrive:domain:<domain> |
gdrive:user:ana.berg@acme.com |
| Slack | slack:user:<user id>, slack:channel:<channel id> |
slack:user:U04ABCD1234 |
| Confluence | confluence:user:<accountId>, confluence:group:<id>, confluence:space:<KEY> |
confluence:space:ENG |
| GitHub | github:user:<login>, github:team:<slug> |
github:team:platform |
| Jira | jira:project:<KEY>:role:<name>, jira:project:<KEY>:group:<id>, jira:security:<KEY>:<level> |
jira:project:OPS:role:Developers |
| SharePoint | sp:user:<object id>, sp:group:<object id>, sp:tenant:<tenant id> |
sp:group:3f2b9c1e-… |
| Notion, web crawler | public only |
public |
Manage mappings (admin API)
Section titled “Manage mappings (admin API)”Base http://localhost:5050/v1/admin/kb-connector-identities, admin JWT.
| Method | Path | Purpose |
|---|---|---|
| GET | (base path) | List mappings (?end_user_id=42&connector_type=slack) |
| POST | (base path) | Create one mapping (201); an existing identical triple is refreshed instead |
| POST | /bulk |
Upsert many mappings; idempotent |
| DELETE | /{mapping_id} |
Delete one mapping (204) |
curl -s -X POST http://localhost:5050/v1/admin/kb-connector-identities \ -H "Authorization: Bearer $ADMIN_JWT" -H "Content-Type: application/json" \ -d '{"end_user_id": 42, "connector_type": "slack", "source_principal": "slack:user:U04ABCD1234", "mapping_source": "manual"}'r = requests.post( f"{BASE}/v1/admin/kb-connector-identities", headers={"Authorization": f"Bearer {ADMIN_JWT}"}, json={ "end_user_id": 42, "connector_type": "slack", "source_principal": "slack:user:U04ABCD1234", "mapping_source": "manual", },)mapping = r.json()const res = await fetch(`${BASE}/v1/admin/kb-connector-identities`, { method: "POST", headers: { Authorization: `Bearer ${ADMIN_JWT}`, "Content-Type": "application/json" }, body: JSON.stringify({ end_user_id: 42, connector_type: "slack", source_principal: "slack:user:U04ABCD1234", mapping_source: "manual", }),});const mapping = await res.json();Response 201:
{ "id": "kbidn-01K8ZT2C4E6G8J0L2N4Q6S8U0W", "tenant_id": "default", "end_user_id": 42, "connector_type": "slack", "source_principal": "slack:user:U04ABCD1234", "mapping_source": "manual", "verified_at": null, "created_at": "2026-10-28T09:40:12.004811+00:00", "updated_at": "2026-10-28T09:40:12.004811+00:00", "created_by": "admin"}| Field | Values | Example |
|---|---|---|
end_user_id |
the portal user’s numeric ID, ≥1 | 42 |
connector_type |
one of the eight connector types | "google_drive" |
source_principal |
1–512 chars, exact principal string | "gdrive:user:ana.berg@acme.com" |
mapping_source |
manual (default), scim, oidc_claim, self_link |
"scim" |
404 when end_user_id is not a user of this tenant. A user may hold several principals
per connector (for example a slack:user: and several slack:channel: entries); the filter
ORs across all of them.
Bulk import
Section titled “Bulk import”For SCIM jobs or a scripted import, post the whole set; rows for users not in the tenant are skipped rather than failing the batch:
curl -s -X POST http://localhost:5050/v1/admin/kb-connector-identities/bulk \ -H "Authorization: Bearer $ADMIN_JWT" -H "Content-Type: application/json" \ -d '{"mappings": [ {"end_user_id": 42, "connector_type": "github", "source_principal": "github:user:anaberg", "mapping_source": "scim"}, {"end_user_id": 43, "connector_type": "github", "source_principal": "github:team:platform", "mapping_source": "scim"} ]}'{"created": 1, "updated": 1, "skipped": 0}Derive mappings from SSO email
Section titled “Derive mappings from SSO email”For connectors whose principals are the user’s email, Brutor can create the mapping at sign-in
instead of you maintaining it. Today that is Google Drive only (gdrive:user:<email>).
-
Leave the tenant switch
kb_oidc_auto_derive_enabledon (it defaults totrue;PATCH /v1/admin/tenants/{tenant_id}withfalseturns it off). -
On the Google Drive connector, set
"auto_derive_from_oidc": true(create or PATCH), or tick the option in the connector form. -
When a user signs in through SAML SSO with a verified email, an
oidc_claimmappinggdrive:user:<lowercased email>is upserted. Unverified emails are skipped, and existing manual mappings are left alone.
Self-service from the portal
Section titled “Self-service from the portal”A signed-in user can see and remove their own mappings through the Core Proxy, but cannot create them: a self-asserted principal would let anyone claim another person’s documents.
| Method | Path (Core Proxy :8100, portal JWT) | Result |
|---|---|---|
| GET | /v1/portal/kb-identities |
The caller’s mappings |
| GET | /v1/portal/kb-identities/connectors |
Static list of linkable connector types (self_link_available is false for all) |
| POST | /v1/portal/kb-identities |
Always 501 self_link_oauth_not_wired; mappings come from an admin, SCIM or SSO derivation |
| DELETE | /v1/portal/kb-identities/{mapping_id} |
204, or 404 for any mapping that is not the caller’s |
curl -s http://localhost:8100/v1/portal/kb-identities \ -H "Authorization: Bearer $PORTAL_JWT" -H "X-Tenant-ID: default"{ "mappings": [ { "id": "kbidn-01K8ZT2C4E6G8J0L2N4Q6S8U0W", "connector_type": "slack", "source_principal": "slack:user:U04ABCD1234", "mapping_source": "manual", "verified_at": null, "created_at": "2026-10-28T09:40:12.004811+00:00", "updated_at": "2026-10-28T09:40:12.004811+00:00", "created_by": "admin" } ], "total": 1}Errors on this surface use {"error": "<code>", "message": "<text>"}.
Related
Section titled “Related”- Source connectors: where the ACLs come from
- Retrieval & grounding: where the filter runs
- Users & API keys

