[KAFKA-351] Certain passwords raise an error in the URI Created: 09/Feb/23  Updated: 27/Oct/23  Resolved: 22/Feb/23

Status: Closed
Project: Kafka Connector
Component/s: Source
Affects Version/s: 1.8.1
Fix Version/s: None

Type: Question Priority: Unknown
Reporter: Marta Carrasco Assignee: Ross Lawley
Resolution: Works as Designed Votes: 0
Labels: web-serivce
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: JPEG File mongodberror.jpg     PNG File options.PNG    

 Description   

When attempting to connect to a mongodb replicaset, if a password contains a "%", the following error will appear in kafka connect hub: Invalid value [URI] for configuration connection.uri: URLDecoder: Illegal hex characters in escape (%) pattern - Error at index 0 in: [string after %]

 

URI structure:

mongodb://user@password@host:port,user@password@host:port,user@password@host:port

There are no options to connect to the cluster with a username and password so it cannot be used as a workaround. We are forced to use the URI as shown in the options.png screenshot.

Connector version:
mongodb/kafka-connect-mongodb:1.8.1



 Comments   
Comment by Ross Lawley [ 22/Feb/23 ]

Hi marta.carrasco@airenetworks.es,

Thank you for reaching out. The Connection String requires usernames and passwords containing certain characters have to be URL encoded:

If the username or password includes the following characters:

: / ? # [ ] @

those characters must be converted using percent encoding.

For future reference as this sounds like a support issue, I wanted to give you some resources to get this questions like this answered more quickly:

  • Our MongoDB support portal, located at support.mongodb.com
  • Our MongoDB community portal, located here
  • If you are an Atlas customer, there is free support offered 24/7 in the lower right hand corner of the UI

Just in case you have already opened a support case and are not receiving sufficient help, please let me know and I can facilitate escalating your issue.

All the best,

Ross

Generated at Thu Feb 08 09:06:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.