#x509 authenticate issue with Mongoose/MongoDB

2 messages · Page 1 of 1 (latest)

stray flicker
#

Hello,
I'm always getting this
error: Uncaught MongooseServerSelectionError: connection <monitor> to _someUuid closed
when using self-signed certificate to authenticate against remote Mongo server.

I've tried both npm:mongoose and npm:mongodb, but they're neither working.
Mongo server log says {"error":{"code":141,"codeName":"SSLHandshakeFailed","errmsg":"no SSL certificate provided by peer; connection rejected"}, but I'm sure I provided these SSL certs.

Deno.readTextFileSync() could read these certs, so it's probably not filesystem permission issue.
Using npx ts-node won't cause this error, and will authenticate successfully.

Deno: 1.30.3/1.31.1
npm:mongoose: 6.10.0/7.0.0
npm:mongodb: 5.0.1
native snow