hastic-zzz / hastic-server

Hastic data management server for analyzing patterns and anomalies from Grafana
GNU General Public License v3.0
330 stars 23 forks source link

Mongodb Authentication failure with shared cluster #946

Open arunbenoyv opened 3 years ago

arunbenoyv commented 3 years ago

Hi, We have a shaded MongoDB cluster hence in the connection string we have to provide the authSource user:password@mongo-qr--svc:port/?authSource=admin

In mongodb_connector.ts https://github.com/hastic/hastic-server/blob/master/server/src/services/data_service/db_connector/mongodb_connector.ts

function getDbConfig only fetches user, password, url, dbName and not the authSource

and while initialising the client authsource is taken form dbName authSource: dbConfig.dbName

This is a feature that we would like to have.