Multidatasource connection dosen't work

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):

  • Opensearch 2.6
  • Firefox 111.0.1

Describe the issue:

Hello
I have two Opensearch cluster.
I want to use the mulitdata sources feature for connect both on Opensearch Dashboards, but the connection test fail.

No logs on both cluster or on Dashboards except a 400 :

{"type":"response","@timestamp":"2023-04-03T14:59:39Z","tags":[],"pid":14,"method":"post","statusCode":400,"req":{"url":"/internal/data-source-management/validate","method":"post","headers":{"host":"dev-dashboards.test","user-agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/111.0","accept":"*/*","accept-language":"en-US,en;q=0.5","accept-encoding":"gzip, deflate, br","referer":"https://dev-dashboards.test/app/management/opensearch-dashboards/dataSources/e4ba2eb0-cf9f-11ed-956b-11f632522619","content-type":"application/json","osd-version":"2.6.0","content-length":"197","origin":"https://dev-dashboards.test","dnt":"1","sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"same-origin","x-forwarded-for":"10.2.182.15","securitytenant":"__user__"},"remoteAddress":"10.1.1.1","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/111.0","referer":"https://dev-dashboards.test/app/management/opensearch-dashboards/dataSources/e4ba2eb0-cf9f-11ed-956b-11f632522619"},"res":{"statusCode":400,"responseTime":128,"contentLength":9},"message":"POST /internal/data-source-management/validate 400 128ms - 9.0B"}

Have you ever seen this problems ?

Configuration:

opensearch.hosts: ['https://cluster1:9200']
opensearch.ssl.verificationMode: certificate
opensearch.username: dashboardserver
opensearch.password: xxxxxxx
opensearch.requestHeadersWhitelist: [authorization, securitytenant]
opensearchDashboards.index: ".opensearch_dashboards"

server.ssl.enabled: true
server.ssl.certificate: "/usr/share/opensearch-dashboards/config/cluster1.pem"
server.ssl.key: "/usr/share/opensearch-dashboards/config/cluster1.key"

opensearch_security.cookie.secure: true
opensearch_security.multitenancy.enabled: true
opensearch_security.multitenancy.tenants.preferred: [Private, Global]
opensearch_security.readonly_mode.roles: [kibana_read_only]

opensearch_security.auth.type: ["basicauth","openid"]
opensearch_security.auth.multiple_auth_enabled: true

opensearch_security.openid.base_redirect_url: https://dev-dashboards.test
opensearch_security.openid.verify_hostnames: false
opensearch_security.openid.refresh_tokens: false
opensearch_security.openid.scope: "openid profile email"

opensearch_security.openid.connect_url: "https://dev-dashboards.test/auth/realms/MYSPACE/.well-known/openid-configuration"
opensearch_security.openid.client_id: dev-dashboards.test
opensearch_security.openid.client_secret: xxxxxxxx

Relevant Logs or Screenshots:

@CyberGod can you assist?

Up about this question
The problem persists with opensearch 2.8

getting same …any work around to resolve it

{“type”:“response”,“@timestamp”:“2023-06-26T22:08:13Z”,“tags”:,“pid”:29220,“method”:“post”,“statusCode”:400,“req”:{“url”:“/internal/data-source-management/validate”,“method”:“post”,“headers”:{“host”:“xxx.xx.com:5600”,“accept”:“/”,“sec-fetch-site”:“same-origin”,“osd-version”:“2.5.0”,“accept-language”:“en-US,en;q=0.9”,“accept-encoding”:“gzip, deflate, br”,“sec-fetch-mode”:“cors”,“content-type”:“application/json”,“origin”:“https://xxx.xx:5600”,“user-agent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5 Safari/605.1.15…“Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5 Safari/605.1.15”,POST /internal/data-source-management/validate 400 84ms - 9.0B”}

sab would you be able to try disable the multiple auth use basic only?

@sab is there any error message on the client(browser) side? Could you use firrfox network inspector tool to take a look at that failed request? The message may not pop up on UI, but it should come back as response content

this seems like a solution worked for me: [Feedback] OpenSearch Dashboards Multiple OpenSearch Clusters Support · Issue #2829 · opensearch-project/OpenSearch-Dashboards · GitHub