# Security and privacy

Ollav hosts HTML that people and AI agents generate, which means arbitrary JavaScript. The design starts from that. This page describes what is actually built today, with no promises we haven't shipped.

## Your data stays in the EU

- Uploaded documents and comment images are stored in **Cloudflare R2 with EU jurisdiction**. Metadata (accounts, comments, versions) is in **Cloudflare D1 with EU jurisdiction**. Both are set when the store is created and can't be moved out later.
- Nightly database backups go to an EU-jurisdiction bucket and are **deleted after 28 days**, so erased data leaves the backups within 30 days.
- Cloudflare is a US company. EU jurisdiction controls where data is physically stored, not which law Cloudflare is subject to. We say this plainly because buyers ask.

## Your content is never used to train AI models

Ollav doesn't train models on your documents, comments or images, and doesn't send them to any model provider. When *your* agent reads comments through the API, it does so with your API key, under your agreement with that provider.

## Untrusted HTML runs on a separate origin

- Documents are served from **a separate content origin** (`content.ollav.app`), never from the app origin that holds sessions and API keys. A prototype's own JavaScript can't read your Ollav session.
- The commenting overlay injected into each document is **credential-free**. It draws pins and works out which element you clicked. Authenticated calls happen in an app-origin frame that talks to it only through `postMessage` with a strict target origin.
- Served documents get `X-Content-Type-Options: nosniff`, a `frame-ancestors` policy and `noindex`, so search engines don't index customer documents.
- Comment images are checked by their file signature (PNG, JPEG, WebP or GIF; SVG is refused) and served only from the content origin, behind a short-lived token that's re-checked on every request.

## Access control

- **Workspaces** with roles: owner, admin, member and guest. A guest sees only the documents shared with them.
- Each document has its own visibility: **workspace** (default, members only), **link** (anyone signed in who has the URL) or **public** (anyone with the URL). Only members can comment, whatever the visibility.
- Access is **re-checked on every request**. When someone leaves a workspace, their session and API keys stop reaching its documents straight away. Unknown, archived and forbidden documents all return the same 404, so an outsider can't tell which documents exist.
- **API keys** for agents have scopes (`upload`, `read`, `comment`), are pinned to one workspace, are stored only as SHA-256 hashes, are shown once, and can be revoked at any time.
- Sign-in uses Google (with full ID-token verification) or a magic link. Sessions are HttpOnly, Secure, SameSite=Lax cookies.

## GDPR: export and deletion, self-serve

- **Export (Art. 15 and 20).** "Download my data" gives any user a ZIP of their profile, memberships, documents with every version, comments, reactions and images. Workspace owners can export the whole workspace. Agents can do the same with `POST /api/exports` or the `export_data` MCP tool.
- **Deletion (Art. 17).** Delete a document, a workspace or your account from the Account page. Stored files nothing else references are removed straight away, and any that fail are retried nightly. An audit log keeps ids and counts, never content, for 365 days.

## Questions

For security questions, a DPA or a vulnerability report, write to **security@ollav.app**. See also the [privacy policy](https://ollav.app/privacy) and [terms](https://ollav.app/terms).
