Giter Site home page Giter Site logo

Comments (11)

robin-dojo avatar robin-dojo commented on September 25, 2024 1

I'll try this out later today. Thank you for the update!

from eventstore-client-dart.

robin-dojo avatar robin-dojo commented on September 25, 2024 1

This is working a charm with my default trust store 👍

from eventstore-client-dart.

robin-dojo avatar robin-dojo commented on September 25, 2024

I have tried adding a ca.crt file to the assets but when giving a path to the publicKeyPath parameter - it's looking in another place. How do I get it to access the assets?

HostCertificateNotFound (HostCertificateNotFound{message: Host certificate file
'/Users/<username>/Library/Containers/com.example.myAppName/Data/certs/ca.crt' not found})

In my pubspec.yaml I have:

flutter:
  assets:
    - lib/images/
    - certs/

from eventstore-client-dart.

robin-dojo avatar robin-dojo commented on September 25, 2024

Found an issue with running macOS apps in sandbox - solved one issue - run into another!

from eventstore-client-dart.

kengu avatar kengu commented on September 25, 2024

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 tlsVerifyCert that would disable validation of certificates. I'll add this support asap. In the meantime, the only way to work around this issue is to supply a valid crt-file with the ES cluster public key. I don't think the flag tls=false will work with ES Cloud unfortunately. Note that using tlsVerifyCert=false when supported, raise security concerns, since the client will connect to any tls connection on the other side. So you need to find a way to supply the public key as a file if you want the full security of a tls connection to the cluster.

I will also at an option to pass the public key as bytes if files are not an option for you.

from eventstore-client-dart.

kengu avatar kengu commented on September 25, 2024

@robin-dojo, see issues #2 and #3

from eventstore-client-dart.

robin-dojo avatar robin-dojo commented on September 25, 2024

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!

from eventstore-client-dart.

robin-dojo avatar robin-dojo commented on September 25, 2024

According to this (if I understand it correctly) you shouldn't need to set up any certs to connect to the ES Cloud clusters.

from eventstore-client-dart.

kengu avatar kengu commented on September 25, 2024

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).

from eventstore-client-dart.

kengu avatar kengu commented on September 25, 2024

It would help if you post any stack traces here for me to analyse

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!

from eventstore-client-dart.

kengu avatar kengu commented on September 25, 2024

@robin-dojo A new version has been released, 0.3.0 supports now tlsVerifyCert=false and uses default trust store on client machine when publicKeyPath is not given.

If this resolves it, please feel free to close this issue as confirmation.

from eventstore-client-dart.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.