Coder Social home page Coder Social logo

Comments (8)

shubhamranjan avatar shubhamranjan commented on July 24, 2024 1

Thanks for reporting. I will check it out and will plan out the switch to Grpc.Net.Client

from dotnet-etcd.

shubhamranjan avatar shubhamranjan commented on July 24, 2024 1

I just need to do some final tests with watch etc and will move to stable once everything seems fine.

from dotnet-etcd.

shubhamranjan avatar shubhamranjan commented on July 24, 2024 1

This seems a big change on how certs used to be loaded before. Have already pushed a few changes, should be able to test em and release a new version soon.

from dotnet-etcd.

shubhamranjan avatar shubhamranjan commented on July 24, 2024

I have tested and released a pre-release version. You may check it out.

Version: 5.0.0-alpha

Thanks !

from dotnet-etcd.

baseTwo avatar baseTwo commented on July 24, 2024

That's fantastic news! I did some testing with it, and it seems to work just fine with .net 5 on Alpine linux. Features used on the client: PutAsync, GetAsync, GetRangeAsync, DeleteAsync and TransactionAsync. Thanks for the quick support! Could you provide a timeline for it to go into a final 5.0.0 version please?

from dotnet-etcd.

baseTwo avatar baseTwo commented on July 24, 2024

I am testing now using certificates, and getting the following exception when creating the EtcdClient whilst specifying the caCert, clientKey and clientCert parameters:

System.InvalidOperationException: SslCredentials with non-null arguments is not supported by GrpcChannel. GrpcChannel uses HttpClient to make gRPC calls and HttpClient automatically loads root certificates from the operating system certificate store. Client certificates should be configured on HttpClient. See https://aka.ms/aspnet/grpc/certauth for details.
at Grpc.Net.Client.Internal.DefaultChannelCredentialsConfigurator.SetSslCredentials(Object state, String rootCertificates, KeyCertificatePair keyCertificatePair, VerifyPeerCallback verifyPeerCallback)
at Grpc.Core.SslCredentials.InternalPopulateConfiguration(ChannelCredentialsConfiguratorBase configurator, Object state)
at Grpc.Net.Client.GrpcChannel..ctor(Uri address, GrpcChannelOptions channelOptions)
at Grpc.Net.Client.GrpcChannel.ForAddress(Uri address, GrpcChannelOptions channelOptions)
at dotnet_etcd.multiplexer.Balancer..ctor(List`1 nodes, String caCert, String clientCert, String clientKey, Boolean publicRootCa)
at dotnet_etcd.EtcdClient..ctor(String connectionString, Int32 port, String caCert, String clientCert, String clientKey, Boolean publicRootCa)
....

It may be possible to configure the client certificates directly on the GrpcChannelOptions.HttpHandler property.

// Add client cert to the handler var handler = new HttpClientHandler(); handler.ClientCertificates.Add(certificate); // Create the gRPC channel var channel = GrpcChannel.ForAddress(baseAddress, new GrpcChannelOptions { HttpHandler = handler });

from dotnet-etcd.

baseTwo avatar baseTwo commented on July 24, 2024

I managed to get a secure connection working by providing the new 5.0.2-alpha EtcdClient constructor with the HttpClientHandler containing the certificates.

from dotnet-etcd.

shubhamranjan avatar shubhamranjan commented on July 24, 2024

Thanks for the update. Will release a stable version soon.

from dotnet-etcd.

Related Issues (20)

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.