I am trying to validate a client certificate in Azure API management using context.Request.Certificate.Verify()
method.
I have tried the following steps:
- I have created self signed root CA certificate and then created a client certificate and key file.
- Now from postman, I am trying to call a method attaching the client certificate. I have verified that the certificate is sent to APIM via trace.
- Have uploaded the root CA certificate in APIM -> CA certificates. While uploading I converted to ".cer" file as it is not accepting ".crt" file and set the Store as "Trusted root".
- In APIM policy, have used the method to validate the client certificate via
context.Request.Certificate.Verify()
.
Now, when I try to call APIM api with client certificate, the above method (step 4) is always coming as False, verified from apim trace. Not sure, what and where I am doing wrong things. Any help/guidance or any article is really helpful.