Hi,
In Norway it is a legal requirement that transactions from POS systems are digitally signed. For this a certificate is used.
We have an environment upgraded to 10.0.8. The certificate is stored in Azure Key Vault, and we have defined the secret in D365FO key vault parameters.
In Commerce Runtime we have an extension that uses a CRT API for retrieving the certificate from KeyVault. We use the following code for getting the certificate.
X509Certificate2 certificate; var getCertRequest = new GetUserDefinedSecretCertificateServiceRequest("SigningCertificate"); string getCertStringResponse = request.RequestContext.Execute(getCertRequest).SecretStringValue; certificate = new X509Certificate2(Convert.FromBase64String(getCertStringResponse));
The certificate is returned, but without the private key. The private key is needed for the signing of the transaction data.
Have you used this API, or used another way of getting a certificate from Azure Key Vault in a CRT extension?
I have also tried to use GetUserDefinedSecretStringValueServiceRequest which returns the certificte as a string. This throws an error in core CRT when converting the certificate to System.String.
https://docs.microsoft.com/en-us/dynamics365/retail/dev-itpro/manage-secrets
Regards,
Morten Løpen