Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Supabase 5 min read Announcement mediumAdept

Supabase Vault

Supabase Vault is a Postgres extension, built as a thin layer over pgsodium and libsodium, that stores secrets such as API keys and access tokens encrypted on disk and in backups. Unlike pgcrypto, which requires passing raw keys through SQL where they can leak into logs, replication streams and clients, Vault references keys by ID and derives them from a per-database root key held outside SQL by pgsodium's Server Key Management. Secrets go into the vault.secrets table and are decrypted on the fly through the vault.decrypted_secrets view. Encryption uses AEAD, so the associated-data column is authenticated alongside the secret, and custom keys can be created with pgsodium.create_key().

Related posts

  • Supabase Vault is now in Beta

    Supabase mediumAdept

    Supabase Vault is a Postgres extension and dashboard UI for storing encrypted secrets and encrypting columns, built on pgsodium's Transparent Column Encryption. Secrets are stored on disk with libsodium-based authenticated encryption with associated data (AEAD), so backups and replication streams stay encrypted and unforgeable. Decrypted values are exposed through auto-generated views such as decrypted_<table>. Only key IDs live in the database, while root keys are managed outside SQL by Supabase. Planned extensions include end-to-end encryption, group encryption via signcryption, and public key management.

  • Supabase Security Retro: 2025

    Supabase easyNovice

    Supabase's 2025 security work centered on safer defaults around Postgres Row Level Security and API exposure. Changes include RLS enabled by default for dashboard-created tables, event triggers to enforce RLS on tables created elsewhere, and alerts plus Splinter-based Security Advisors for misconfigurations. Long-lived JWT anon/service_role keys are being replaced by publishable and revocable secret keys, with asymmetric JWT signing and automatic revocation of keys leaked to GitHub. Legacy keys will be removed in late 2026, and pg_graphql will be disabled by default on new projects. The HackerOne VDP has resolved 139 reports with a median first response of 8 hours, and paid bounties are planned for 2026.

  • Why we chose Turso to secure AI credentials

    Turso mediumAdept

    Eden, a gateway and control plane for database, API and AI traffic, uses Turso's in-process SQLite-compatible storage with AES-256-GCM whole-database encryption so a single Rust binary can run beside the workloads it governs without a separate Postgres. Whole-database encryption was chosen over column-level encryption, which is fragile across migrations and still leaks schema and row counts. To avoid forking the product, a compatibility layer (TursoPool, TursoConnection) mimics the tokio_postgres client surface and rewrites Postgres SQL at the connection boundary: bind parameters, NOW(), row locks, INTERVAL arithmetic, casts, JSON aggregation and ON CONFLICT predicates. File-backed deployments refuse to start without a 64-hex-character key and run with WAL and synchronous=NORMAL, and tests assert the on-disk file has no plaintext SQLite header.

  • Storage is now available in Supabase

    Supabase mediumAdept

    Supabase Storage is an object store built as a custom TypeScript/Fastify API server behind Kong, with object metadata and access policies kept in each project's Postgres database and objects stored in S3. Existing servers like Minio, Ceph and Zenko were rejected because they couldn't use Postgres as their datastore, carried features unnecessary on managed backends, and didn't map to Supabase Auth. Authorization uses Postgres Row Level Security on a storage.objects table: if a user can select or delete the row, they can read or delete the object, so policies are written in SQL and listing filters happen in the database. Uploads stream through Node streams to S3 with minimal buffering, trading off knowing the object size upfront, and objects get a default 1-hour Cache-Control header.

  • Introducing JWT Signing Keys

    Supabase mediumAdept

    Supabase Auth now supports asymmetric JWT signing keys (RSA or elliptic curve), letting apps verify tokens locally using public keys published at a JWKS endpoint instead of calling the Auth server or sharing a forgeable secret. Migration is a reversible, zero-downtime sequence: import the legacy secret, generate a standby key pair, rotate to sign with the new private key, then revoke the old secret. A new getClaims() client function verifies tokens via the Web Crypto API with cached public keys, and any JWT library such as jose works too. New publishable and secret API keys replace the JWT-based anon and service_role keys, with asymmetric keys becoming the default for new projects from October 2025 and legacy keys phased out by late 2026.

The quest for software engineering knowledge.

Look:
Layout: