No direct method to retrieve the public key of a Transit key in VaultSharp Latest #396
vanusquarm
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi VaultSharp team,
I've been working with the Transit secrets engine via VaultSharp and noticed that there doesn’t appear to be a dedicated method to retrieve the public key of a named transit key.
Currently, the only way to get the public key seems to be using ExportKeyAsync and specifying TransitKeyCategory.Encryption, version = "latest", and the key name. This works, but it’s not immediately clear from the API that this is how you obtain the public key. There’s also ReadWrappingKeyAsync, but that returns the wrapping key for importing keys, which is slightly different from simply exporting the public key of an existing key.
It would be helpful to have a dedicated method like ExportPublicKeyAsync(string keyName) that directly returns the public key for a given transit key. Or better, include public-key in the TransitKeyCategory.
Is there any plan to add such a method, or is there a recommended approach that I might be missing?

Thanks for your guidance!
Beta Was this translation helpful? Give feedback.
All reactions