# Data Processing Agreement (draft)

> Roles, data, regions, security measures, deletion and breaches for hosted databases. A draft, not yet reviewed by a lawyer.

Source: https://osevel.com/docs/hosted/dpa/

> Draft written with the product (Postgres Faz 1, package 12; section 10 added on 28 November
> 2026 for the other Osevel products). It describes what the system does today. It is not legal
> advice and has not been reviewed by a lawyer: a lawyer reviews it before it is offered to
> customers, and the points marked "to be named" or "[to be confirmed]" are filled in then.
>
> **Hosted databases are not open yet.** Hosting is a working prototype; the beta will be by
> invitation. Sections 1 to 9 describe the design for hosted databases and apply once a customer
> is given one.

## 1. Parties and roles

- **The customer** (the organization that signs up to Osevel) is the **controller** of the
  personal data in its databases, including the people who sign up to its apps through Osevel
  Auth.
- **Osevel** is the **processor** of that data when it hosts the customer's databases, and
  processes it only on the customer's documented instructions: running the database, its auto
  API, Auth and Realtime, backups and restores the customer asks for.
- For databases the customer connects from elsewhere (not hosted by Osevel), Osevel does not
  hold the data: rows reach the panel end-to-end encrypted and the cloud only relays them.
- For the other Osevel products (OsVault, OsApi, OsBox, OsMemory, OsBrain), see section 10.

## 2. Data and purposes

| Category                        | Examples                                                            | Purpose                          |
| ------------------------------- | ------------------------------------------------------------------- | -------------------------------- |
| Database contents               | whatever the customer stores                                        | hosting the database             |
| The customer's app users (Auth) | email, password hash (bcrypt), sign-in times, metadata the app sets | signing in to the customer's app |
| Usage metadata                  | database size, compute time, per interval                           | billing, capacity                |
| Customer account data           | members' emails, passkey public keys, signed organization records   | the panel, access control        |
| Security logs                   | access card use, staff access, freezes, alerts                      | security and audit               |

Osevel does not use customer data for any other purpose, does not sell it and does not train
models on it.

## 3. Where data is processed

- Each database lives in the **region the customer chose** when creating it (EU or US). A data
  plane provisions only databases of its own region, so a database is never placed in another
  region without the customer creating it there. Moving a database means importing it into a
  new one (`osevel database import`).
- Backups leave the data plane **encrypted with a per-database key**; the storage provider
  never sees plaintext.
- Transfers to the US happen only for databases the customer creates in the US region, or for
  subprocessors listed as US-based, under the EU Standard Contractual Clauses.

## 4. Security measures

- Encryption at rest with per-database data keys (wrapped by a regional key); TLS for every
  connection; each project on its own network.
- Access by the customer's people from the panel needs a short-lived access card signed with
  their passkey and checked by the data plane; the cloud cannot make one.
- **Osevel staff reach a customer database only with a grant signed by the customer's owner**,
  or in an emergency with two staff signatures ("break glass"); the customer is notified at
  once and receives a report.
- Owners can **freeze** a database (agents only, or everything); lifting needs two owners.
- The auto API is closed by default (row-level security on every new table); service logins
  and superusers cannot be used from outside.
- Operations are automated and drilled daily on an internal canary database (failover,
  point-in-time restore, disk exhaustion); no runbook reads customer rows.
- Usage records for billing are hash-chained; an invoice is never rated from a changed record.

## 5. Deletion

- **Deleting a database** removes it at once and destroys its backup key (crypto-shredding):
  every backup copy becomes unreadable immediately; the encrypted objects are then deleted with the
  database's storage (tenant deletion).
- **Closing the organization** (a signed record: two owners, or one owner from two devices)
  deletes every hosted database in every region the same way, refuses all access cards and
  accepts no further records. The customer's account and organization data in the Osevel cloud
  are deleted with the account (`DELETE /api/me`, `DELETE /api/organizations/:id`).
- Invoices and the payments they record are kept for the period tax law requires; they contain
  no database contents.
- Before deleting, the customer can take a full copy of any database (`osevel database import`
  into a database of their own, or `pg_dump`).

## 6. Requests from data subjects

The customer answers its own users' requests. Osevel provides the means: the database itself,
the Auth admin API (delete or export a user) and the import/export command. Osevel forwards any
request it receives directly to the customer without answering it.

## 7. Breaches

Osevel informs the customer of a personal data breach affecting the customer's data without
undue delay, and within 48 hours of becoming aware of it, with what is known, so the customer
can meet its own 72-hour duty.

## 8. Subprocessors

The current list is in [subprocessors.md](https://osevel.com/docs/hosted/subprocessors/). Osevel gives 30 days' notice of a
new subprocessor; the customer may object and, if no solution is found, close the organization
without penalty.

## 9. Audits

Osevel answers reasonable written security questionnaires and provides its latest penetration
test summary; on-site audits by agreement. Certifications (SOC 2, ISO 27001) are planned and
not yet held.

## 10. Other Osevel products

Sections 1 to 9 are about hosted databases. The other products work differently: what they send
to the Osevel cloud is sealed on the customer's devices, or stays on the customer's machine.

| Product  | What the Osevel cloud holds                                                                                                                                                                             | What it cannot read                                                    |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| OsBase   | signed organization records; seals of activity logs (a line number and a hash); relays the encrypted channel between browser and connector                                                              | rows, SQL text, the change journal, database credentials               |
| OsVault  | secrets and their names as ciphertext, wrapped keys, the signed log of who may open a vault, vault display names, names and public keys of linked computers, the wrapped recovery box, recovery records | secret values and names; the password; the recovery code (not stored)  |
| OsApi    | nothing of its own: calls, held calls and records stay on the customer's machine and reach the panel over the encrypted channel                                                                         | the calls, the keys, the decisions                                     |
| OsBox    | requests and answers sealed end to end; which computer asked, when, and whether the request was accepted or declined                                                                                    | the servers, versions and tool lists in a request                      |
| OsMemory | random scope ids, sealed records, how many there are, their padded sizes and when they change, wrapped keys                                                                                             | the text of notes; which repository or folder a project's notes are of |
| OsBrain  | a seal of the ledger's latest line (its number and hash)                                                                                                                                                | the ledger's lines                                                     |

- The account data these products need (email address, sessions, security events) is handled by
  Osevel as controller under the Privacy Policy.
- If a customer puts personal data of other people into a secret or a note, Osevel stores it only
  as ciphertext it holds no key to. The OsVault recovery code is the one stated exception: Osevel
  mails it once at set-up and does not store it.
- Whether this sealed storage makes Osevel a processor of that personal data, and whether
  sections 4 to 9 of this agreement should then apply to it in full: [to be confirmed] by the
  lawyer's review. Until then, section 8 (subprocessors) and the deletion rules of the
  Privacy Policy describe what happens to it.
