How to Configure Neon Encryption at REST

Published
Length
3 min read

Luis Felipe Dias

All posts

You do not need to turn on neon encryption at rest by hand. The cloud platform encrypts all stored database files, branches, and backups by default. Many teams check this box during a security review and move on. Still, broad database roles still let logged-in users read plain text tables. How neon encryption at rest works Neon splits compute nodes from the underlying storage layer in the cloud. When you create a project, the platform sets up encrypted cloud volumes. Every data page, write-ah

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

You do not need to turn on neon encryption at rest by hand. The cloud platform encrypts all stored database files, branches, and backups by default. Many teams check this box during a security review and move on. Still, broad database roles still let logged-in users read plain text tables.

How neon encryption at rest works

Neon splits compute nodes from the underlying storage layer in the cloud. When you create a project, the platform sets up encrypted cloud volumes. Every data page, write-ahead log, and snapshot sits on encrypted disks. The cloud provider manages the master keys and rotates them on a schedule.

Because the storage system handles this work, your team skips manual key setup. You pick your cloud region and create your database branches as normal. Child branches share the same encrypted page history as the parent branch. This design keeps test and staging branches protected on disk from day one.

When a compute node wakes up, it fetches pages from the storage layer. The storage engine decrypts those pages in memory so Postgres can read them. When Postgres writes new rows, the storage layer encrypts the blocks again. Your apps do not need special code to use this storage feature.

What disk encryption solves and what keeps the session active

Disk encryption protects your data if someone steals a physical drive or snapshot. It also helps your team meet basic audit rules for cloud storage. Without the cloud storage keys, raw disk blocks look like random noise. This stops outside attackers who try to read underlying cloud volumes directly.

Still, storage encryption does not protect data from active database sessions. Once a user or app logs in, Postgres returns rows in plain text. If an engineer logs in with a broad role, they read every table. Disk keys cannot tell a safe query from a bulk data dump.

Shared database roles make this gap much worse for growing engineering teams. Many teams hand out one admin role for debugging and support work. Anyone with that password can run a select query on customer tables. Disk encryption does nothing to mask emails, phone numbers, or card numbers.

Encryption at Rest + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Why database roles need query-level controls

Native Postgres roles decide who can log in and which tables they read. You can set up read-only roles to block accidental table drops or deletes. You can also use row-level rules to filter which rows a role sees. Yet maintaining dozens of custom Postgres roles across many branches takes constant work.

Even a strict read-only role returns raw text for every permitted column. When a developer runs a query to check a bug, sensitive fields appear. Masking rules that rewrite matched fields in results help reduce this exposure. Teams also need clear audit logs that tie each query to a person.

Combining default storage protection with session-level controls gives you much better coverage. Storage keys lock down the hard drives and backup files in the cloud. Query controls govern what people and scripts can run during a live session. Together, they protect customer records both on disk and in flight.

Add query and result controls beside Postgres

Grants and pools govern who logs into PostgreSQL. Yet every query in an open session still runs with that role's full scope. In practice, hoop.dev sits inline in the wire protocol beside your database as a sidecar for your Postgres. For every plain or prepared query an agent or human runs against production, hoop.dev decides to pass, mask, block, or escalate it for review.

When a tool or agent sends SQL, hoop.dev Postgres controls block banned statements before execution or hold risky ones for human approval via an AI Analyzer you configure. Matched sensitive columns in result rows are masked in memory before they reach the caller. Each query and decision is logged per listener, which generates evidence for SOC 2, HIPAA, and GDPR audits. View the binary on GitHub.

Frequently asked questions

Do I need to enable neon encryption at rest myself?

No, the platform turns it on by default for every new project. All database branches, write-ahead logs, and backups use encrypted cloud storage from the start.

Does disk encryption hide sensitive columns from logged-in users?

No, the database decrypts data pages in memory for any valid user session. To hide emails or card numbers in query results, you need data masking.

Are database branches encrypted in the same way as the main branch?

Yes, branches share the same underlying storage architecture and encrypted page blocks. Every child branch you create inherits the same disk protection as the main branch.

The query runs. The emails stay hidden.