SSL Connection with NodeJS SDK

Hi,

We have a Couchbase Server setup with SSL. I followed the guide to setup couchbase node module using external C-SDK. But when i follow the basic guide given in the documentation on 'Authentication;

On this line
// Authenticate with the cluster
cluster.authenticate(new couchbase.CertAuthenticator());

I get an error CertAuthenticator is not a constructor/function.
I looked into the couchbase.js inside the couchbase module and i cannot find CertAuthenticator exported.

Am i missing some part of the setup?

Hey @KaustubhKhati,
I imagine you are currently using our 3.0 SDK as opposed to the 2.4 version which is the documentation you linked to. Due to a minor issue with the C SDK that Node.js depends on at the time of the Node.js SDK release, it is not currently possible to specify the certificate authentication options via the SDK directly via the options, but instead it needs to be passed through the connection string you use with the SDK. You can see an example of that here:
https://docs.couchbase.com/c-sdk/2.10/managing-connections.html#ssl
Cheers, Brett

Hi @brett19 I have lined the 2.5 doc dont know how it is redirecting to 3.0.
But anyways thanks for replying. I will try that out.

Hi @brett19 I am using Nodejs SDK 2.6.5, and passing certpath through the connection string as you mention, but still through general ssl issue. should I upgrade to SDK 3.0 ? I don’t want to make too many code changes for my old project.