Skip to content

Security: plentysoftware/plenty-connect

Security

SECURITY.md

Security and privacy

Plenty Connect is the household's own server. It's designed so that only your household's phones and the people who know the household passphrase can get at anything, and so that a copied disk or backup is unreadable.

How it's protected

  • First set-up needs a code from the server's log (or PLENTY_SETUP_CODE), so nobody who reaches a new server first can claim it.
  • Phones sign every request with their own P-256 key (made in the phone's hardware keystore). Requests more than 10 minutes off the clock are refused, and every request's nonce is remembered (on disk, so also across restarts), so a captured request can't be sent again.
  • The encrypted link: everything a phone sends and gets back is encrypted (a new P-256 key per request, HKDF-SHA256, AES-256-GCM) to the server's key, whose fingerprint is in every QR code. At home over plain http, nobody else on the network can read or change it. PLENTY_REQUIRE_ENCRYPTION=1 refuses anything else.
  • Joining: QR codes are single-use and run out. A general code always makes a new person: a phone can't join as someone already on the server.
  • Sharing: every record is private, shared with picked people, or with the household, and the server checks that on every read and write.
  • The web page: the household passphrase is stored as an scrypt hash; sessions are random 256-bit tokens kept only as hashes, in HttpOnly, SameSite=Strict cookies (Secure over https). Requests from other sites are refused. Wrong passphrases are slowed down per address and across all addresses. Strict security headers: a Content Security Policy with no inline scripts, no framing, no referrer, HSTS over https.
  • Encrypted at rest: every record and file is sealed with AES-256-GCM under the data key in keys.json (or PLENTY_DATA_KEY_FILE, to keep it off the data disk).
  • Small and plain: no npm packages at all (only Node itself), runs as an ordinary user in the container, works with a read-only filesystem and no capabilities.

What it can't protect against

  • It isn't end-to-end encrypted: the server can read the household's data, so its web page can show it and let you download it. Anyone with the passphrase can see everything on the web page.
  • Someone with both your data folder and its key.
  • The web page over plain http at home: the passphrase crosses your own network unencrypted. Use https if that matters to you.

See docs/configuration.md for a hardened compose file.

Reporting a problem

Found a way to get at someone's data, or anything else that weakens the promises below? Please tell us privately first: open a security advisory on this repo (only the maintainers can see it). Say what you found and how to repeat it. You'll get an answer within a week, and credit in the release notes if you'd like it.

Please don't open a public issue for security problems until they're fixed.

There aren't any published security advisories