- Symptom
- P1010: User was denied access on the databaseError: self-signed certificate in certificate chain
- Cause
- Prisma 7 connects through node-postgres instead of the Rust engine, and node-postgres verifies server certificates by default. sslmode=require in the URL also means full verification there and overrides any ssl object passed alongside it.
- Fix
- Remove sslmode from the URL and give the adapter the provider's CA certificate. Turning verification off with rejectUnauthorized false works but skips the identity check.
- Apply
const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL, // without sslmode ssl: { ca: process.env.DATABASE_CA_CERT }, })- Affected
- Prisma ORM 7.0 and later with @prisma/adapter-pg
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders