i have found myself in a situation where i need to issue client certificates for authentication purposes. For that i need a root or intermediate certificate which will sign the client ones. That automatically results in a need for a secure storage for the signing certificate. I have an Azure subscription and it provides a Key Vault, which can store and create certificates. I was happy about the creation part, because it means that i won't have any of the signing certificates on my machine, not even briefly in memory. Or so i thought...
Turns out that Key Vault does not provide any cryptographic operations on the certificate object (Key Vault - Key does for example). This means that i will have to download the whole certificate from the Vault, having the Private Key leave the "secure location". At this point i'm questioning the "secure" part, as in my understanding it should not be possible to export the private key, but it is.
I need a .Net solution, so i have looked at Azure SDK for .Net and Azure Key Vault REST API but they do not provide what i need.
Am a looking in a wrong place or is Azure Key Vault not meant to be used this way?
The simplified (i'll leave out the authentication to all services) workflow i initially thought about is something like:
RSA.Create()
for example)System.Security.Cryptography.X509Certificates.CertificateRequest
for example)But it seems to be not possible.
So the solution that i found is as follows: