# Security and privacy model

How your project is kept apart from others, who can see what, and what is recorded. The legal statement is the [privacy policy](https://rezincore.com/privacy.html); this page is the working detail behind it.

> Rezin Core is in development and has not yet been through an independent security audit.

## How projects are kept apart

- Each project has its own section of the database and its own database roles. Those roles are confined to that section: they cannot reach another project or the platform's own tables.
- Every API request runs as the application's role, never as the database owner.
- Inside a project, each **organization's** rows and files are separated by row-level security that the database itself enforces. See [Row-level security and policies](https://rezincore.com/docs/database/row-level-security.md).
- A project key works only for its own project.

## Encryption

- Connections use HTTPS.
- Passwords are stored only as Argon2id hashes.
- Secrets, stored files and backups are encrypted at rest (AES-256-GCM) with a key kept apart from the data.
- Authenticator secrets are stored sealed; recovery codes, links, one-time codes, tokens and keys only as hashes.

## The audit trail

Everything that happens in a project is recorded: who, what kind of thing, when, and whether it succeeded. Never the values. See [Usage and logs](https://rezincore.com/docs/usage-and-logs.md#the-audit-record).

It cannot be edited or erased. Each entry is chained to the one before, and the chain is checked every hour.

## Who at Rezin Core can see your data

Our staff console shows us that your project exists, how large and how busy it is, and whether it is healthy. It does **not** show us your tables, files, secrets, users or logs. This is enforced by the server on every request, not by hiding links.

### Support access, given by you

If you want our help, an owner of your workspace can give one named member of our staff access to one project, on the project's **Project** page:

- for a set time, from 1 hour to 7 days;
- to look only, or to look and change. With "look only" every change is refused, including the SQL workspace and revealing a secret;
- it ends by itself, and you can end it sooner;
- every owner of the workspace is emailed when it is given.

### Emergency access

In a genuine emergency a member of staff can open a project for one hour without being asked.

- They must have their own authenticator step on.
- They must first write down why.
- Every owner of the workspace is emailed immediately.
- The reason, and everything they open or change, is recorded on your project's own record, where you can read it and it cannot be erased.
- An owner can end it early.

### What you can see

While a member of staff is inside your project, each request they make is on your project's **Activity → Record** page. Giving, using, ending and running out of access are all recorded there.

### What staff can still see

Counts and sizes of each project. The names and email addresses of console accounts, so we know who to contact. The address of each request served, never its content. For email, the kind of message and the recipient's domain.

### The limit every host has

The people who administer our servers are technically able to reach the underlying machines. That access is limited to named administrators, is governed by our agreement with you, and is not used to read customer data.

## Backups

- Taken nightly. The 14 most recent are kept.
- Sealed with a key kept apart from them.
- The newest is test-restored, to prove it can be.
- They cover the whole server, your project included. A project's **Overview** page shows when the last one ran.

Restoring a single project from a backup is not a self-service action; ask Rezin Core. A second copy kept in another location is not in place yet.

## Where data is kept

On servers Rezin Core owns and operates, in the United States. A small number of providers carry traffic and deliver email; they are named in the [privacy policy](https://rezincore.com/privacy.html).

## Known limits

Said plainly:

- A project's SQL role can see the *names* of other projects' tables and functions through Postgres's own catalog. It cannot read their contents.
- A file's kind is whatever the uploader declares. Contents are not inspected.
- A signed file link cannot be recalled before it expires, except by deleting the file.
- A webhook, and an AI assistant you connect, send your project's data outside Rezin Core, to where you chose.
- Rezin Core has had no independent security audit, and no agreement covering health information is in place with the email provider, which is why emails carry fixed wording only.

## Your part

- Keep secret keys on your own servers.
- Write a policy for every table, and check it with **View as**.
- Turn on the authenticator for every console account.
- Give tools the smallest token that does the job.
- Read your project's Logs.

## Reporting a problem

If you believe you have found a security problem, write to the address on the [privacy policy](https://rezincore.com/privacy.html).
