smrt
Open the smrt source on GitHub Switch to dark color scheme
← All packages
Business & operations v0.62.10 New

@happyvertical/smrt-vault-relay

A blind snapshot relay: a deployable service that stores encrypted snapshots per account, signed by devices and gated by the backup.vault feature.

Source ↗

What it gives you

A blind snapshot relay: a deployable service that stores encrypted snapshots per account, signed by devices and gated by the backup.vault feature.

  1. 01The relay stores opaque ciphertext and holds no key material
  2. 02Each device route needs an Ed25519 device signature and the backup.vault entitlement
  3. 03A primary-writer lease with a fencing token controls who publishes
  4. 04A lapsed entitlement stops writes at once and keeps restores open for a retention window

Blind by construction

The relay never parses, decrypts, or validates blob content. It logs an account handle, never a body, a signature, a nonce, or an account id. It still observes framing, sizes, sequences, identifiers, and traffic activity.

Chunked upload and commit

A device begins an upload with the fencing token, uploads fixed-size chunks, and commits. The relay checks every chunk and the SHA-256 digest of the whole ciphertext. A commit makes the snapshot the newest one in one atomic step.

Lapsed subscriptions

When the entitlement lapses, begin, chunk upload, commit, and device delete answer 402. List, latest, download, abort, and lease routes stay open. After the retention days, reads answer 410 and writes keep answering 402. Only an operator sweep deletes lapsed data.

Schema and deployment

The deployment applies migrateVaultRelayV1 and migrateVaultRelayLeasesV1. The relay deploys as a container. The operator sets the quotas, the retained snapshot count and age window, the bucket, the databases, and the domain. The relay has no default for these. The lapse retention days (90), the sequence jump limit (1000), and the lease lifetime (300 seconds) have defaults.