HandbookXIV the VallumEncryption at rest and in transit
XIVthe Vallum, Defend itEncryption at rest and in transit
In plain words
Encryption in transit, using TLS, protects data moving between machines, and encryption at rest protects data stored on disks and in backups; each guards against different threats, and neither stops someone with a valid login.
Where you see it
A large customer's security questionnaire asks Harbor both: is traffic encrypted between services, and are databases and backups encrypted at rest? The database volumes and S3 buckets turn out to be encrypted, but the workers connect to Postgres without TLS.
What goes wrong
- Expecting disk encryption to stop attackers in your app
Encryption at rest protects against a stolen disk or backup file. It does nothing against SQL injection or a stolen app password, because the database decrypts for anyone who connects legitimately.
- TLS only at the edge
HTTPS ends at the load balancer, and traffic inside the network travels in plain text. Encrypt service-to-service and database connections too, especially across networks you don't fully control.
- Keys stored next to the data
An encryption key in the same database, bucket or repo as the data it protects adds little. Keep keys in a key management service, such as AWS KMS, with access limited and logged.
What to tell your agent
Quick check
Sign in to earn +10 XP for itHarbor's database disk is encrypted at rest. An attacker gets the app's database password from a leaked .env file. What does the disk encryption protect?