-
Notifications
You must be signed in to change notification settings - Fork 892
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
[MD] Issue connecting to data source cluster with self-signed certificates #4524
Comments
I am able to reproduce the issue. Even with
related code: OpenSearch-Dashboards/src/plugins/data_source/server/client/client_config.ts Lines 22 to 25 in 24bde32
Those issues can also be part of #2009, that we should have a way to support configuration of datasource clients, including SSL configuration |
Hello! @zhongnansu I would like to share my collaboration with this Issue. I created a docker-compose lab to reproduce the problem described in this Issue.
|
I have the same issue. The setting |
Workaround as described by carlos-neto-trustly here: Set and environment variable Node docs: https://nodejs.org/api/cli.html#node_extra_ca_certsfile This worked for me. |
Hi.
Settings for opensearch_dashboards.yml in the "clusterA":
We also tried setting env for opensearch-dashboards in clusterA, but without success:
The remote-root.pem contains chain of certificate for clusterB's opensearch. However, adding the datasource works correctly with Is it possible to set up 'datasource' when a remote cluster using |
I ran into this issue while looking into setting up multiple datasources when the security-dashboards-plugin is installed. I left a comment on the issue in the security-dashboards-plugin repo that has a zip containing a docker setup with 2 clusters that demonstrates the issue. opensearch-project/security-dashboards-plugin#1782 (comment) |
+1 if we can prioritize a fix that would be awesome! I think ideally the client should be using the same settings as the connection to the local cluster specified in the dashboards configuration. |
This is due to ssl config for rejectUnauthorized is hardcoded as true for now in data source client config, tested that changing this to false will not validate the certificate. Thus to solve this, we can expose a property
The reason I think a new config is better is because opensearch.ssl.verificationMode is for local cluster setting, while we are actually configure for connected data sources here. But open to other suggestions, @derek-ho @cwperks |
Thanks. That should work, and I agree that we may want different values for different datasource that is not the backing one. However, this begs this question - would this apply to all datasources? If that is the case and not specific to a datasource, I think we should call it out in the documentation that we are assuming all datasources are compatible with the ssl setting. I know that @cwperks had the same question for TLS settings - are we assuing/calling it out that a built in assumption is that the config works for all datasources? |
@BionIT For ultimate flexibility, TLS would need to be configured on a per data-source basis. Would I am thinking about TLS configuration in 2 ways:
|
When configuring TLS for Dashboards, there are 2 separate traffic flows that need to be secured:
For 2, ultimate flexibility would mean configuring this per data-source, but there could be a common configuration for multiple data-sources. The settings to configure 2) are: SSL Verification Mode: This setting allows you to specify how OpenSearch Dashboards verifies the certificates from OpenSearch nodes.
Possible values for this setting include:
SSL Certificate Authorities: If you're using self-signed certificates or certificates signed by your organization's CA, you need to specify the path to the CA certificate(s) used to sign the certificates for OpenSearch nodes.
This next one is only required if clientcert auth is set to REQUIRED. Client Certificate and Key: Specify the paths to the certificate and key files that OpenSearch Dashboards will use to authenticate itself to the OpenSearch cluster.
|
close as per #6171 |
I had problems creating a data source connection to an OpenSearch with HTTPS protocol (created with a self-signed certificate). I received this problem:
Response:
When I configure a new data source connection to an OpenSearch with HTTPS protocol with a valid certificate, it works as expected. It also works when I configure OpenSearch with HTTP protocol.
Do you have some tips or suggestions? Is it a requirement that the data source connection with HTTPS must have a valid certificate? I did not find this information in the documentation.
Originally posted by @carlos-neto-trustly in #2829 (comment)
The text was updated successfully, but these errors were encountered: