|
| 1 | +.. _kafka-connect-mongodb: |
| 2 | + |
| 3 | +======================================= |
| 4 | +Connect your Kafka Connector to MongoDB |
| 5 | +======================================= |
| 6 | + |
| 7 | +.. default-domain:: mongodb |
| 8 | + |
| 9 | +.. contents:: On this page |
| 10 | + :local: |
| 11 | + :backlinks: none |
| 12 | + :depth: 2 |
| 13 | + :class: singlecol |
| 14 | + |
| 15 | +Overview |
| 16 | +-------- |
| 17 | + |
| 18 | +This guide shows you how to configure your MongoDB Kafka Source or Sink |
| 19 | +Connector to connect to and authenticate with a MongoDB cluster. |
| 20 | + |
| 21 | +The MongoDB Kafka Connector uses the MongoDB Java Driver to connect to |
| 22 | +your MongoDB cluster. The MongoDB Java Driver enables you to use any of |
| 23 | +the **authentication mechanisms** available in that version of the driver |
| 24 | +using a **Connection URI**. |
| 25 | + |
| 26 | +To read more about the terms above, see the following MongoDB Server Manual |
| 27 | +entries: |
| 28 | + |
| 29 | +- :manual:`Authentication Mechanisms </core/authentication-mechanisms/>` |
| 30 | +- :manual:`Connection String URI Format </reference/connection-string/>` |
| 31 | + |
| 32 | +Identify Your MongoDB Java Driver Version |
| 33 | +----------------------------------------- |
| 34 | + |
| 35 | +Each MongoDB Kafka Connector version uses a specific version of the |
| 36 | +MongoDB Java Driver. Check the version of the Java Driver in the connector's |
| 37 | +dependency list to ensure that it supports the authentication mechanism. |
| 38 | + |
| 39 | +If you are using the Uber JAR, you can find the dependency file from the |
| 40 | +same place that you downloaded that distribution. For links to the |
| 41 | +distributions, see the :ref:`Installation Reference Table <kafka-connector-installation-reference>`. |
| 42 | + |
| 43 | +To check whether a specific MongoDB Java Driver version supports your |
| 44 | +authentication mechanism, see the table below or visit the |
| 45 | +`reference documentation for the driver release version <http://mongodb.github.io/mongo-java-driver/>`__. |
| 46 | + |
| 47 | +.. list-table:: |
| 48 | + :header-rows: 1 |
| 49 | + :stub-columns: 1 |
| 50 | + :widths: 20 10 10 |
| 51 | + |
| 52 | + * - MongoDB Java Driver Version |
| 53 | + - 4.x |
| 54 | + - 3.x |
| 55 | + |
| 56 | + * - SCRAM / MONGODB-CR |
| 57 | + - ✓ |
| 58 | + - ✓ |
| 59 | + |
| 60 | + * - X.509 |
| 61 | + - ✓ |
| 62 | + - ✓ |
| 63 | + |
| 64 | + * - MONGODB-AWS |
| 65 | + - ✓ |
| 66 | + - |
| 67 | + |
| 68 | + * - Kerberos (GSSAPI) |
| 69 | + - ✓ |
| 70 | + - ✓ |
| 71 | + |
| 72 | + * - LDAP (PLAIN) |
| 73 | + - ✓ |
| 74 | + - ✓ |
| 75 | + |
| 76 | +Configure Your Connection URI |
| 77 | +----------------------------- |
| 78 | + |
| 79 | +To configure your MongoDB Kafka Source or Sink Connector, specify your |
| 80 | +connection URI in the ``connection.uri`` setting. Refer to the configuration |
| 81 | +guides for more detail: |
| 82 | + |
| 83 | +- :doc:`Sink Configuration Properties </kafka-sink-properties>` |
| 84 | +- :doc:`Source Connector Guide </source/connector-guide>` |
| 85 | + |
| 86 | +For more information on how to build your connection URI, navigate |
| 87 | +to the :guilabel:`Authentication` section in the |
| 88 | +`MongoDB Java Driver reference documentation <https://mongodb.github.io/mongo-java-driver/>`__ |
| 89 | +that corresponds to your connector version. |
| 90 | + |
| 91 | +If you need to configure SSL/TLS, see our :doc:`Configure SSL/TLS Guide </kafka-configure-ssl>`. |
0 commit comments