rajanadar / VaultSharp

A comprehensive cross-platform .NET Library for HashiCorp's Vault, a secret management tool
http://rajanadar.github.io/VaultSharp
Apache License 2.0
493 stars 134 forks source link

Read ca_chain #317

Closed mklimczuk closed 1 month ago

mklimczuk commented 1 year ago

I need to somehow get default issuer's CA certificate chain. I found there is a method IVaultClient.V1.Secrets.PKI.ReadCACertificateAsync(CertificateFormat, string). As far as I tested and checked the source code it allows me to get only the root certificate in PEM or DEF format, but CertificateFormat.pem_boundle is not really supported. I found there is an endpoint in Vault that returns the whole chain GET v1/pki/ca_chain.

Link to the Vault API Docs that support this feature The Vault Docs URL

Additional context Currently, I have a workaround with simply just making the rest call, since it's not a protected resource and it's quite a strait forward, but maybe it would be valuable to introduce such functionality in the lib. Is it somehow fitting to Your roadmap?