Prisma SSL Connection Fails with P1010 Error While Other PostgreSQL Clients Work #28026
Replies: 2 comments 1 reply
-
Hi @jaspritsingh16! What version of postgres are you using? Can you create a minimal Docker setup that reproduces the issue? I would like to share this with our team internally for investigation. |
Beta Was this translation helpful? Give feedback.
-
The SSL configuration for Prisma is different. You must supply a path to a PKCS12 for client authentication using the That is the way to do it when using the Prisma Rust engine. If you use the newer Rust-free adapter-pg that just went GA in 6.16, you would then be using pg directly and the connection string you are trying should work. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Question
Question
Prisma consistently fails to establish SSL connections to PostgreSQL with P1010 "User was denied access on the database" error, while other PostgreSQL clients (psql, Node.js pg library) connect successfully using the same SSL certificates and connection parameters.
This prevents using SSL encryption for database connections in production environments that require client certificate authentication, creating a security gap where other PostgreSQL clients can connect securely but Prisma cannot.
Could someone please investigate why Prisma's SSL implementation fails with client certificate authentication when other PostgreSQL clients succeed with identical certificates and configuration? This appears to be a Prisma-specific SSL handling issue rather than a certificate or server configuration problem.
How to reproduce (optional)
How to Reproduce
Environment Setup
Steps to Reproduce
Setup SSL certificates:
Test with PostgreSQL client (works):
Test with Prisma (fails):
Test with Node.js pg library (works):
Certificate Chain Analysis
Expected behavior (optional)
Expected Behavior
Prisma should successfully establish SSL connections to PostgreSQL when:
Actual Behavior
(not available)
"Information about Prisma Schema, Client Queries and Environment (optional)
Information about Prisma Schema
Client Queries
Environment & Setup
Prisma Version
Additional Testing
Tested Prisma Versions
Tested SSL Parameters
All combinations failed with P1010 error:
sslmode=require|prefer|allow
sslaccept=accept_invalid_certs
rejectUnauthorized=false
checkServerIdentity=false
File Access Verification
Workaround
Currently using non-SSL connections as the only viable solution:
DATABASE_URL='postgresql://user:password@host:5432/database?sslmode=disable'
Beta Was this translation helpful? Give feedback.
All reactions