v.22.1Improvement

Support authSource option for MongoDB storage

Support authSource option for storage MongoDB. Closes #32594. #32702 (Kseniia Sumarokova).
Added support for the authSource option in the MongoDB storage engine in ClickHouse.

Why it matters

The feature allows users to specify the authentication database when connecting to MongoDB, solving issues where authentication credentials need to be validated against a database other than the default. This improves compatibility and security for MongoDB integrations.

How to use it

When defining a MongoDB table engine in ClickHouse, include the authSource option in the connection parameters to specify the authentication database.
Example:
CREATE TABLE my_table (
...
) ENGINE = MongoDB('host:port', 'database', 'collection', 'username', 'password', 'authSource=admin');