Hi, I am trying to do the same.
I am using Node SDK 4.1.2 and Enterprise Edition 6.6.2 build 9588
I have a local Couchbase user which i can log in just fine, I have a LDAP user which i can log into the Couchbase UI just fine. However, i cannot use the LDAP user to log in via my app
I found this info on this doc:
If LDAP is enabled, Couchbase Server will only allow PLAIN sasl authentication which by default, for good security, the SDK will not allow. Although this can be overridden in a development environment, by explicitly enabling PLAIN in the password authenticator, the secure solution is to use TLS.
However, even though the doc says you can “enable PLAIN password authenticator”, there is no info on how to do it. But by digging thru the the NodeJS API documentation docs, i found this doc:
So i tried
const connectionOptions = {
authenticator: new couchbase.PasswordAuthenticator(options.username, options.password),
};
this.cluster = await couchbase.connect(dbServer, connectionOptions);
I thought my search was over, however, unfortunately this did not change anything. I still am seeing this error when i run with couchbase with debug level login
[2022-08-05 13:15:24.640] [74879,31014787] [debug] 26ms, [bcf2bd8b-274d-4148-f4d7-187e0e1315bf/d5b59193-64f6-41bd-121d-2c1039a12357/plain/-] <server.com/10.10.10.10:11210> stop MCBP connection, reason=node_not_available