-
Notifications
You must be signed in to change notification settings - Fork 916
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
Fix sslConfig for multiple datasource to handle when certificateAuthorities is unset #6282
Conversation
…rities is unset Signed-off-by: Craig Perkins <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6282 +/- ##
=======================================
Coverage 67.45% 67.46%
=======================================
Files 3368 3368
Lines 65423 65422 -1
Branches 10559 10557 -2
=======================================
+ Hits 44134 44136 +2
Misses 18716 18716
+ Partials 2573 2570 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Craig Perkins <[email protected]>
@@ -55,7 +55,7 @@ export function parseClientOptions( | |||
config.ssl?.certificateAuthorities | |||
); | |||
|
|||
sslConfig.ca = certificateAuthorities || []; | |||
sslConfig.ca = certificateAuthorities; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we also need to fix the interface to make ca as optional I think, at line 16
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should already be covered because DataSourceSSLConfigOptions is a Partial
@@ -56,7 +56,7 @@ export function parseClientOptions( | |||
config.ssl?.certificateAuthorities | |||
); | |||
|
|||
sslConfig.ca = certificateAuthorities || []; | |||
sslConfig.ca = certificateAuthorities; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we also need to fix the interface to make ca as optional I think, at line 16
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should already be covered because DataSourceSSLConfigOptions is a Partial
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see, thanks!
@cwperks Can you fix the test which is failing https://github.com/opensearch-project/OpenSearch-Dashboards/actions/runs/8459709350/job/23211770139?pr=6282 |
Signed-off-by: Craig Perkins <[email protected]>
@BionIT Pushed a fix for the tests. |
Creating a manual backport. The backport bot still has not run after the label was added. |
…rities is unset (#6282) * Fix sslConfig for multiple datasource to handle when certificateAuthorities is unset Signed-off-by: Craig Perkins <[email protected]> * Add to CHANGELOG Signed-off-by: Craig Perkins <[email protected]> * Adjust test in tls_settings_provider.test.ts Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]> (cherry picked from commit 40da92c) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
…rities is unset (opensearch-project#6282) * Fix sslConfig for multiple datasource to handle when certificateAuthorities is unset Signed-off-by: Craig Perkins <[email protected]> * Add to CHANGELOG Signed-off-by: Craig Perkins <[email protected]> * Adjust test in tls_settings_provider.test.ts Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]> (cherry picked from commit 40da92c)
…rities is unset (#6282) (#6296) * Fix sslConfig for multiple datasource to handle when certificateAuthorities is unset Signed-off-by: Craig Perkins <[email protected]> * Add to CHANGELOG Signed-off-by: Craig Perkins <[email protected]> * Adjust test in tls_settings_provider.test.ts Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]> (cherry picked from commit 40da92c) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
Fixes the logic in TLS configuration for multiple datasources to match the behavior of opensearch_client_config.ts which sets the
ca
portion of the ssl config toundefined
(instead of empty list) when thedatasource.ssl.certificateAuthorities
setting is not set inopensearch_dashboards.yml
.Issues Resolved
Check List
yarn test:jest
yarn test:jest_integration