-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Security
-
Labels:None
-
Server Triage
-
ALL
-
Hi,
ENV: CentOs 7.X, 64 bit, MongoDB Community Edition 4.2.6
I have followed this link and attached the ca, server, client conf files
https://docs.mongodb.com/manual/appendix/security/
Server and Client fails connection
Server
bin/mongod --auth --bind_ip 10.0.2.15 --port 27017 --dbpath /data/node01 \
--tlsMode requireTLS --tlsAllowInvalidHostnames --tlsAllowInvalidCertificates \
--tlsCertificateKeyFile test-server1.pem --tlsCAFile test-ca.pem
Client
bin/mongo --host 10.0.2.15 --port 27017 -u madmin -p xxxxx \
--tls --tlsCertificateKeyFile test-client.pem --tlsCAFile test-ca.pem
client error log
=========
akeFailed: SSL peer certificate validation failed: certificate signature failure src/mongo/scripting/mozjs/mongo.cpp 832
2020-04-28T12:27:24.043-0400 E QUERY [js] Error: couldn't connect to server 10.0.2.15:27017, connection attempt failed: SSLHandshakeFailed: SSL peer certificate validation failed: certificate signature failure :
connect@src/mongo/shell/mongo.js:341:17
@(connect):2:6
2020-04-28T12:27:24.043-0400 D1 - [js] User Assertion: Location12513: connect failed src/mongo/shell/shell_utils.cpp 418
2020-04-28T12:27:24.044-0400 I QUERY [js] MozJS GC prologue heap stats - total: 4391668 limit: 0
2020-04-28T12:27:24.056-0400 I QUERY [js] MozJS GC epilogue heap stats - total: 3452 limit: 0
2020-04-28T12:27:24.059-0400 D1 - [main] User Assertion: Location12513: connect failed src/mongo/scripting/mozjs/proxyscope.cpp 320
2020-04-28T12:27:24.065-0400 F - [main] exception: connect failed
2020-04-28T12:27:24.065-0400 E - [main] exiting with code 1