Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Add datasource with test connect failed #6281

Closed
Tracked by #5872
zhyuanqi opened this issue Mar 27, 2024 · 5 comments · Fixed by #6282
Closed
Tracked by #5872

[BUG] Add datasource with test connect failed #6281

zhyuanqi opened this issue Mar 27, 2024 · 5 comments · Fixed by #6282
Assignees
Labels
bug Something isn't working multiple datasource multiple datasource project v2.14.0

Comments

@zhyuanqi
Copy link
Collaborator

Describe the bug

Connect failed to remote datasource. After change data_source.ssl.verificationMode: none in config file, connection succeed

To Reproduce
Steps to reproduce the behavior:

  1. Go to Datasource
  2. Click on Create datasource connection
  3. Add a datasource and test connection
  4. Datasource connection failed.
  5. In the config/opensearch_dashboards.yml file, after change data_source.ssl.verificationMode: none. Connection would work

Expected behavior
Expect test connection to work

Dashboards Version
Main branch

Plugins

Please list all plugins currently enabled.

Screenshots

If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Browser and version [e.g. 22]

Additional context

Add any other context about the problem here.

@zhyuanqi zhyuanqi added bug Something isn't working untriaged labels Mar 27, 2024
@BionIT
Copy link
Collaborator

BionIT commented Mar 27, 2024

The bug is introduced in https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6171/files
The reason is because when passing the sslConfig object, ca field is set to empty array while ca should be optional

@BionIT BionIT added the multiple datasource multiple datasource project label Mar 27, 2024
@cwperks
Copy link
Member

cwperks commented Mar 27, 2024

Looks like the default of empty list should be removed here.

This would match the behavior of the existing opensearch_client_config

@cwperks
Copy link
Member

cwperks commented Mar 27, 2024

@zhyuanqi @BionIT Thank you for filing this issue. I opened a Draft PR to address the issue here: #6282

If the datasource.ssl.certificateAuthorities setting is not present in opensearch_dashboards.yml then the sslConfig portion of the client config should contain undefined instead of empty array.

@kavilla
Copy link
Member

kavilla commented Apr 2, 2024

@cwperks , looks like this didn't get into 2.13 cut so I have added the label 2.14 and will resolve this issue. If this is incorrect please, update it as needed.

Thank you.

@kavilla kavilla closed this as completed Apr 2, 2024
@cwperks
Copy link
Member

cwperks commented Apr 2, 2024

This is good to be closed. The backport to 2.x was merged yesterday: #6296

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working multiple datasource multiple datasource project v2.14.0
Projects
None yet
4 participants