-
Notifications
You must be signed in to change notification settings - Fork 0
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
HostCertificateNotFound exception on ES Cloud hosted instance #1
Comments
I have tried adding a ca.crt file to the assets but when giving a path to the
In my pubspec.yaml I have:
|
Found an issue with running macOS apps in sandbox - solved one issue - run into another! |
Hi @robin-dojo, the error indicates that TLS is not configured properly in the client, which ES Cloud demands. This involves supplying a public key to the client in the configuration (the client does not support public key exchange automatically), just as yo have tried to do. Unfortunately, the documentation about secure connections are still lacking , and examples does not include this use case. I'll update the examples list soon. The current version of the client does not support the flag I will also at an option to pass the public key as bytes if files are not an option for you. |
@robin-dojo, see issues #2 and #3 |
Thanks @kengu! I tried to create and use a public key created with the online configurator tool but was then getting an unknown grpc error what I was unable to diagnose. I'll look to see if the certificate was incorrect somehow! |
According to this (if I understand it correctly) you shouldn't need to set up any certs to connect to the ES Cloud clusters. |
Yes, I believe that ES cloud have a public CA with a wildcard certificate that is available (installed) on most client machines (OS-level) already, and is used by Dart to validate TLS connections between the client and ES cloud. I do not have a ES cloud available for testing myself, so I can not confirm it. I will however, do a review of the code again to see if there is something that prevents the use of already installed CAs on the client machine for validation (default trust store). |
It would help if you post any stack traces here for me to analyse
|
@robin-dojo A new version has been released, 0.3.0 supports now If this resolves it, please feel free to close this issue as confirmation. |
I'll try this out later today. Thank you for the update! |
This is working a charm with my default trust store 👍 |
I am trying to connect to an ES cloud-based instance but I am getting the
HostCertificateNotFound
exception, however, I don't think this should happen as there would be nowhere for us to add the certificate to the host.There are some differences in how we create our settings with C# compared to dart:
I'm not sure if there is another bit of config I need with dart?!
The text was updated successfully, but these errors were encountered: