question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: Improve gRPC client Certificate handling

See original GitHub issue

It would help, if it was possible to use a pfx file with password, or a thumbprint from the client. This would make it easy to setup HTTPS with the client for different deployment types.

something like this:

example 1:

cert = new X509Certificate2(Path.Combine(_environment.ContentRootPath, "sts_dev_cert.pfx"), "1234");

example 2:

using (X509Store store = new X509Store(StoreName.My, StoreLocation.LocalMachine))
{
  store.Open(OpenFlags.ReadOnly);
  var certs = store.Certificates.Find(X509FindType.FindByThumbprint, certificateThumbprint, false);
  cert = certs[0];
  store.Close();
}

example 3:

var vaultConfigSection = Configuration.GetSection("Vault");
var keyVaultService = new KeyVaultCertificateService(vaultConfigSection["Url"], vaultConfigSection["ClientId"], vaultConfigSection["ClientSecret"]);
cert = keyVaultService.GetCertificateFromKeyVault(vaultConfigSection["CertificateName"]);

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
JamesNKcommented, Aug 31, 2019

Raise Grpc.Core related improvements at https://github.com/grpc/grpc

1reaction
wazzamatazzcommented, Aug 31, 2019

The new HttpClient-based client is great, but it’s only an option if you’re using .NET Core 3.0 on the client side. Improving certificate handling for the Grpc.Core-based client as described above would be a great help when working with a target framework that doesn’t support .NET Standard 2.1.

Read more comments on GitHub >

github_iconTop Results From Across the Web

In GRPC, how to selectively require Client Certificate for a ...
In TLS mutual authentication, I am aware that ClientAuth(io.grpc.netty.shaded.io.netty.handler.ssl.ClientAuth to be precise) has three modes ...
Read more >
Performance Best Practices
A user guide of both general and language-specific best practices to improve performance.
Read more >
Practical guide to securing gRPC connections with Go and ...
Contrary to popular belief, you don't need to manually provide the Server certificate to your gRPC client in order to encrypt the connection....
Read more >
Channel credentials - gRPC for WCF Developers
How to implement and use gRPC channel credentials in ASP.NET Core 3.0. ... The standard form of channel credentials uses client certificate ......
Read more >
Consuming a gRPC Service
gRPC clients can be injected in your application code. Consuming gRPC services requires the gRPC classes to be generated. Place your proto files...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found