-1

I am working with Azure API management. I have deployed a self-hosted gateway on my local machine, and I want to associate custom client certificates for security. I have successfully uploaded a custom certificate to Azure API Management in the Portal and associated it with the API.

Now I need to associate this certificate with the self-hosted gateway. I cannot find any clear material on the internet. How I can do this step?

2 Answers2

0

This is covered in Microsoft's document Add a custom CA certificate - Azure API Management:

Create custom CA for self-hosted gateway

If you use a self-hosted gateway, validation of server and client certificates using CA root certificates uploaded to API Management service is not supported. To establish trust, configure a specific client certificate so that it's trusted by the gateway as a custom certificate authority.

Use the Gateway Certificate Authority REST APIs to create and manage custom CAs for a self-hosted gateway. To create a custom CA:

  1. Add a certificate .pfx file to your API Management instance.
  2. Use the Gateway Certificate Authority - Create Or Update REST API to associate the certificate with the self-managed gateway.
esqew
  • 42,425
  • 27
  • 92
  • 132
  • Thanks for the answer, but actually I already followed the instructions in this tutorial and I am struggling with the second step: Use the Gateway Certificate Authority REST API to associate the certificate with the self-managed gateway. It is not clear how to perform this step – user17319690 Nov 03 '21 at 15:20
  • Can you elaborate a bit more? It's pretty clear by following the link provided that you need to make a POST request against the specified URL, passing all the necessary parameters you need to associate the certificate. Which part *specifically* are you having trouble understanding? – esqew Nov 03 '21 at 15:21
  • When I make the request, I get an error Response Code 400 as below { "error": { "code": "ValidationError", "message": "Representation was empty.", "details": null } } – user17319690 Nov 03 '21 at 15:52
0

For error Response Code 400 { "error": { "code": "ValidationError", "message": "Representation was empty.", "details": null } }

you have to set your request body to :

"properties": { "isTrusted": true }