v.22.1Improvement

Allow Empty Credentials for MongoDB Engine

Allow empty credentials for MongoDB engine. Closes #26267. #32460 (Kseniia Sumarokova).
Allow using empty credentials with the MongoDB engine in ClickHouse.

Why it matters

This feature addresses the problem where users could not connect to MongoDB instances that do not require authentication because the ClickHouse MongoDB engine previously required non-empty credentials. By allowing empty credentials, it improves compatibility and ease of use for connecting to unauthenticated MongoDB deployments.

How to use it

When creating a table with the MongoDB engine, users can now specify empty strings for the username and password parameters to connect without credentials. For example:

CREATE TABLE mongo_table
ENGINE = MongoDB('host:port', 'database', 'collection', '', '');