Good morning. Here are my environment details:
- Apache Kafka 3.7.1
- Mongodb Connector 1.13.0
- Using TTLFileConfigProvider Kafka Connect ConfigProvider that refreshes its data from a file based on a provided TTL: GitHub - geuscht-m/TTLFileConfigProvider: A proof of concept for a Kafka Connect ConfigProvider that refreshes its data from a file based on a provided TTL. Based on the stock FileConfigProvider.
- JDK 17
- Mongo Db 6.0.12 Community
- DMZR IBM BNP
Description of issue:
We use the MongoDB Kafka Connector to source data from MongoDB to Kafka. We have setup a username/password in MongoDB, and Kafka uses those credentials to connect to MongoDB. We periodically change the password for this account in order to stay in security compliance. We programmed a Vault Config Provider to update the new user/password, the config provider will trigger a restart of the connector. Unfortunately, the password is not being refreshed:
ERROR Error encountered in task ec002i000948-kf002i000165-AP24944-mongosink-ibm-case-0. Executing stage ‘TASK_PUT’ with class ‘org.apache.kafka.connect.sink.SinkTask’, where consumed record is {topic=‘ec002i000948-kf002i000165-AP24944-mongosink’, partition=0, offset=284, timestamp=1727880678452, timestampType=CreateTime}. (org.apache.kafka.connect.runtime.errors.LogReporter:66)
com.mongodb.MongoCommandException: Command failed with error 13 (Unauthorized): ‘command update requires authentication’ on server xxxx:30603. The full response is {“ok”: 0.0, “errmsg”: “command update requires authentication”, “code”: 13, “codeName”: “Unauthorized”, “$clusterTime”: {“clusterTime”: {“$timestamp”: {“t”: 1727880664, “i”: 15}}, “signature”: {“hash”: {“$binary”: {“base64”: “+B0f4QqYw9v2i6CcbjhCVaEHrvE=”, “subType”: “00”}}, “keyId”: 7386466953021358081}}, “operationTime”: {“$timestamp”: {“t”: 1727880063, “i”: 1}}}
Can someone please give me guidance on this?
Thank you in advance.
William Crowell