←Back to Documentation

Encryption

EntropyDB does not encrypt data itself, on disk or on the wire. This page says what to put around it instead.

What EntropyDB does not do

  • No encryption at rest. RocksDB files, the embedded control-plane database and backups are plain files. The setting entropydb.security.enable-encryption is read by nothing.
  • No TLS on the HTTP API (8080) or on the PostgreSQL protocol (5432). Clients that require TLS (sslmode=require) cannot connect to 5432.
  • Traffic between cluster nodes is authenticated, but not encrypted. With ENTROPYDB_CLUSTER_SECRET set, nodes prove they know the secret, but replicated data crosses the network in clear.
  • Field-encryption classes exist in the code but are not connected to storage or queries, and their keys exist only in memory. Do not rely on them.

At rest: encrypt the volume

Put the data directory (and the backup directory) on an encrypted volume. Examples:

  • LUKS/dm-crypt on Linux;
  • EBS encryption on AWS;
  • persistent-disk encryption on GCP (on by default);
  • Azure Disk Encryption;
  • FileVault on a Mac.

Encrypt backups when you copy them off the host, for example with age or gpg, or by using an encrypted bucket.

In transit: a TLS reverse proxy

Keep the server bound to 127.0.0.1 or a private address (the default for bin/entropydb, the Linux installer and the Compose files). Terminate TLS in front of it. For example, with Caddy:

db.example.com {
    reverse_proxy 127.0.0.1:8080
}

For the PostgreSQL protocol a plain TLS proxy does not help, because PostgreSQL negotiates TLS inside its own protocol. Use an SSH tunnel or a VPN instead:

ssh -N -L 5432:127.0.0.1:5432 db-host
psql "host=127.0.0.1 port=5432 user=<email> dbname=<database> sslmode=disable"

Run cluster nodes on a private network (a VPC subnet, the Helm chart's NetworkPolicy, or WireGuard between hosts), and keep ports 7100, 7101 and 8102 closed to everything else.

More

The full list of controls the server enforces, and the gaps, is in docs/operations/security.md in the repository.