0

Does anyone have an example of how to authenticate to a mongodb 2.5 server (soon to be 2.6) with LDAP authentication using the Java driver?

Dave Wilkin
  • 231
  • 1
  • 3
  • 13

1 Answers1

3

You can find an example in the Java driver source here. Typically, you would use "$external" as the value of the source parameter to the com.mongodb.MongoCredential#createPlainCredential method, as in the shell example in the 2.6 Release Notes.

Note also that since the password is sent as plain test over a network, you should plan to configure your driver and MongoDB cluster to use SSL connections.

jyemin
  • 3,743
  • 23
  • 16