Documentation / Team and security
Security and privacy
What the model can do, what it can see, what leaves OpenDB and how your secrets are stored.
OpenDB stacks several protections. None of them relies on the model's goodwill alone.
What the model can do
- Tools depend on the mode. In read-only mode, the agent has no tool able to write. See Modes and approvals.
- Your privileges apply to the agent. Every query it writes is checked against what you are allowed to do.
- Reads run read-only at database engine level.
- Queries are parameterized: values are passed separately from the SQL.
- A human decides on sensitive operations: deletion, structure change, record creation, email, file deletion.
- The number of steps is limited, and you can stop an answer at any time.
Checks applied to every query
| Check | What it refuses |
|---|---|
| Read-only | Anything that is not a read, in the read tools |
| Administration | Managing accounts, roles, privileges, databases and the server, in every mode |
| Single statement | Several statements in one call |
| Hidden tables | Any query that mentions a hidden table, the system catalogs and dynamic SQL |
| Privileges | Any operation your privileges do not allow |
Note These checks read the text of the query and refuse when in doubt. They can therefore reject a legitimate query, for instance if the name of a hidden table appears inside a text value. The rights of the database account and the engine's read-only transactions remain the underlying barrier.
What the model can see
- Artifacts do not go through the model. Tables, key figures and charts are loaded by your browser. See Artifacts.
- Hidden tables are only known to it by name.
- Results are bounded: at most 1,000 rows per query, 200 by default.
- The database password is never sent to it.
- Other users' files are invisible to it.
- The schema diagnostic only reads structure, never a row.
What the model does see: the text of your questions, the structure of the accessible tables, and the rows it reads with ReadQuery to answer you.
Reduce what leaves even further
| Means | Effect |
|---|---|
| Local model with Ollama | Nothing leaves your machine |
| Anonymized clone | The model only reads fake data |
| Hidden tables | The model knows nothing of the content of sensitive tables |
What leaves OpenDB
- Emails: only to allowed recipients, after review, with attachments taken from your exports folder. See Sending emails.
- External agents: through the MCP server, read-only and with your privileges. See MCP server.
- AI provider: the agent's requests go to the provider you chose.
OpenDB sends no data anywhere else.
Requests hidden in the data
Text read from the database or from a file may contain an instruction aimed at the model. The agent is instructed never to follow it and to report it to you. Approvals and the recipient allowlist limit what such an instruction could achieve.
Your secrets
| Secret | Protection |
|---|---|
| Database connection settings | Encrypted before storage |
| Provider API keys | Encrypted, never shown in full again |
| SMTP configuration | Encrypted, the password is never sent back to the browser |
| MCP tokens | Only their hash is stored, the token is shown once |
The encryption key is in ~/.opendb/config/.env. Back this file up.
Traceability
| Log | Content |
|---|---|
~/.opendb/logs/agent.log |
Requests, answers, pending approvals, tokens used |
~/.opendb/logs/mcp.log |
Every call from an external agent: who, on which project, with what |
~/.opendb/logs/{cloning}/ |
The log of each cloning run |
| SQL editor history | The queries you ran |
Known limits
- You can hide a table from the agent, not a column. To protect a column, clone the database and anonymize it.
- API keys are shared by the whole instance, not specific to each user.
- The MCP server works read-only and only locally.
- On MySQL and MariaDB, a structure change made of several statements can remain partly applied if it fails.
Good practice
- Give OpenDB a database account with only the rights it needs.
- Keep read-only as the default mode.
- Change the root account's password, and create one account per person.
- Clone and anonymize before using a third-party provider on personal data.
- Read every approval: the query shown is the one that will run.