brianfrankcooper / YCSB

Yahoo! Cloud Serving Benchmark
Apache License 2.0
4.94k stars 2.24k forks source link

Connect to mongodb and couchbase using SSL configuration #952

Open nelsonbrabra opened 7 years ago

nelsonbrabra commented 7 years ago

I've read all readme files but i cant seem to find how to connect with the database using an OpenSSL certificate either with Mongodb or Couchbase2

allanbank commented 7 years ago

I am going to assume that you want to have YCSB authenticate to the server via the client x.509 certificate as part of the TLS connection.

For the MongoDB driver you need to add options to the connection string/uri and add system properties for the Client TLS certificate.

You turn on TLS with the connection via the TLS URI option.

The PKI authentication is via the Authentication URI options. Specifically, use the authSource=$external and authMechanism=MONGODB-X509.

The client certificate is passed as a system property via the standard JSSE System Properties. Specifically:

nelsonbrabra commented 7 years ago

I followed these instructions to configure mongodb for tsl: https://docs.mongodb.com/manual/tutorial/configure-ssl/

made the self-signed certificate and ran mongodb with it following the tips over there, but then im unable to connect with the mongod with YCSB client because i can find a way to enable tsl connection in the client. im really a newbie in this area so im probably missing something really obvious

allanbank commented 7 years ago

Have you tried adding ssl=true to the MongoDB URI you pass on the YCSB command line?

gkmgaurav commented 5 years ago

I have tried ssl=true. But still no success. I am able to connect using the mongo shell and passing the PEMkeyFile and CAFile details. But how to pass these certificates using mongodb url?

sagyvm commented 3 years ago

Facing the same issue

michael-slater-EB commented 3 years ago

Was this ever resolved? Connecting to Couchbase Cloud needs SSL