Skip to content
Maran

How it works

Databases

How a database, its user and its grant are created so one account cannot reach another's data, why the password is shown once, and what dropping does not do.

Each database gets a dedicated user, a per-plan limit on how many an account may have, and a password reset. The server agent can read a database's size, but the panel does not show it yet.

Isolation is built, not assumed

A MySQL or MariaDB server has no idea what a tenant is. It will let one user read another's data if the grant says so, and a panel that leaves that to convention will leak.

So Maran does three things to guarantee isolation:

  1. Every name is prefixed with the account. Two customers cannot collide, on purpose or by accident.
  2. The grant covers only that one database, never a pattern that might match a neighbour's.
  3. A real server is made to refuse. The test does not just check that the grant looks right. It checks that a running database server denies a neighbouring account's data to the user the panel created.

The password is shown once

It is generated by the panel, shown once and never stored, not even encrypted. Recovery is therefore a reset, not a retrieval, and there is no copy for anybody to steal later.

Creating the same database twice reports that it already exists and leaves the first password working. A retry after a lost response must not invalidate a credential the customer has already been shown.

Dropping is final

There is no snapshot, no recycle bin and no delay. Nothing in the drop path consults the backup module, which takes the scheduled account backups. A database is restorable only from a backup that already existed before the drop.

The grant repair, for hosts that ran an older build

The name in a database-level GRANT is a LIKE pattern, not an identifier, and an unescaped _ in it matches any single character. A build before this fix could therefore give an account access it never issued, to a same-length account whose name matched at the right position.

Every grant written from now on is escaped. Rows a previous build already wrote are not rewritten, because changing a live customer's access unattended is worse than leaving it as it was. A host that created databases before the fix carries unescaped rows until an administrator runs the repair from the panel's Databases screen, which reports what it would change before changing anything.