> For the complete documentation index, see [llms.txt](https://docs.toucanai.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.toucanai.cloud/govern/security-model/data-access-boundaries.md).

# Data access boundaries

{% hint style="info" %}
**Target Audience**: Developers & non-technical users defining how Toucan AI accesses data in multi-tenant products.
{% endhint %}

### TL;DR

Toucan AI separates **platform data** (stored in Toucan) from **your business data** (stored in your connected databases). Access to your data is always gated by authentication, permissions, and row-level security — not by copying your warehouse into Toucan.

***

### When to use this

Use this page with [Security boundaries (embed)](/embed/embedding-overview/security-boundaries.md) to design a secure integration and understand shared responsibilities.

***

### Three data zones

| Zone                     | What it is                                                                | Where it lives                                 |
| ------------------------ | ------------------------------------------------------------------------- | ---------------------------------------------- |
| **Platform**             | Accounts, dashboards, chart configs, AI history, encrypted DB credentials | Toucan AI database                             |
| **Your database**        | Tables and rows (source of truth)                                         | Your infrastructure                            |
| **Request-time results** | Rows returned for a chart or AI answer                                    | Processed per request — not a bulk Toucan copy |

See [Data storage & retention](/govern/security-model/data-storage-and-retention.md) for query flow and caching.

***

### How access is enforced

* **Embed tokens** carry identity, permissions, and attributes for security rules (all database configuration can be passed as attributes).
* **Row-level security (RLS)** filters which rows each user can query.
* **Column-level security** can restrict which columns are visible.
* **Organization isolation** separates one customer’s Toucan configuration from another’s.

***

### Security responsibilities

| Responsibility                     | Your app / backend | Toucan AI platform |
| ---------------------------------- | :----------------: | :----------------: |
| End-user authentication            |          ✅         |          —         |
| Embed token generation             |          ✅         |          —         |
| API key storage                    |          ✅         |          —         |
| Define RLS attributes & rules      |          ✅         |          —         |
| Enforce RLS at query time          |          —         |          ✅         |
| Store platform config & AI history |          —         |          ✅         |
| Store your table data              |     ✅ (your DB)    |  — (queries only)  |

***

### Typical risks

* Missing RLS on sensitive tables
* Sensitive content in AI chat that gets stored in conversation history

***

### Related pages

* [Token security](/govern/security-model/token-security.md)
* [API security](https://github.com/ToucanToco/toucan-ai/blob/main/docs/govern/security-model/api-security.md)
* [Data storage & retention](/govern/security-model/data-storage-and-retention.md)
* [PII & personal data](/govern/security-model/pii-and-personal-data.md)
* [Third-party subprocessors](/govern/security-model/third-party-subprocessors.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.toucanai.cloud/govern/security-model/data-access-boundaries.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
