Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-4496

How to pass MongoDB TLS certificate to create debezium mongodb kafka connector?

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • None
    • mongodb-connector
    • None
    • False
    • False

      I am using  debezium mongoDB plugin to create strimzi kafka mongodb connector. 

      We have MongoDB cluster with three replicas. I have enabled preferred TLS and authentication type as MongoDB-X509.

      We have three broker strimzi kafka cluster and connect cluster with all required plugins (i.e. mongoDB provided by debezium) up and running.

      I am using below json file to create connector, but not sure how to pass certificate as there is no option available to pass certificate.

       

      {
        "name": "production-connect-0",
        "config":

      {     "connector.class": "io.debezium.connector.mongodb.MongoDbConnector",     "mongodb.hosts": "rs0/mongodb-0.mongodb.vikas-mongo-cluster1.svc.cluster.local:27017,mongodb-1.mongodb.vikas-mongo-cluster1.svc.cluster.local:27017,mongodb-2.mongodb.vikas-mongo-cluster1.svc.cluster.local:27017",     "mongodb.name": "retail",     "mongodb.ssl.enabled": "true",     "mongodb.ssl.invalid.hostname.allowed": "true",     "mongodb.ssl.tlsCertificateKeyFile": "/tmp/connect/mongo-server.pem",     "mongodb.ssl.tlsCAFile": "/tmp/connect/mongo-ca.pem"   }

      }

      getting below Error, attched in sanpshot.

       

      As per the official debezium documentation and source code available on github repo:-

      1. https://debezium.io/documentation/reference/1.7/connectors/mongodb.html#debezium-mongodb-connector-required-configuration-properties
      2. https://github.com/debezium/debezium/blob/main/debezium-connector-mongodb/src/main/java/io/debezium/connector/mongodb/MongoDbConnectorConfig.java

      it is mentioned only two parameters to pass i.e.

      1. mongodb.ssl.enabled
      2. mongodb.ssl.invalid.hostname.allowed

      Not sure how to pass extra two tls paramters i.e "tlsCertificateKeyFile" and "tlsCAFile" which is required for mongoDB connection.

      have posted same question on stack overflow as well, here is the reference link:-

      https://stackoverflow.com/questions/70462408/how-to-pass-mongodb-tls-certificates-while-creating-debezium-mongodb-kafka-conne

      Please let me know workaround on it or any alternative approach if available?

       

       

       

              Unassigned Unassigned
              bharat15-ml Bharat Bhushan Singh (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: