why is client certificate attachment a property of inbound flow rather than backend flow?

Martin Kallukalam 170 Reputation points
2024-06-17T00:14:11.8066667+00:00

I am using the below policy to attach client certificate for authenticating with backend (origin)
<authentication-certificate certificate-id="certid" />

It all works great.

But this policy is only applicable in inbound section only and not in backend.
Logically it makes sense to have this policy applicable in backend section and not in inbound section, because it is authentication mechanism with backend ie on the outbound traffic from gateway to backend(origin)
Trying to understand the logic why this policy is applicable in inbound and not in backend?

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,908 questions
0 comments No comments
{count} votes

Accepted answer
  1. JananiRamesh-MSFT 23,256 Reputation points
    2024-06-18T09:04:33.5366667+00:00

    @Martin Kallukalam Thanks for reaching out. The <authentication-certificate> policy you’re using is indeed applied in the inbound section of the API Management policy.

    Inbound section: This is where the request first hits the API Management service. At this point, the service can manipulate the request before it gets sent to the backend. This is why the <authentication-certificate> policy is applied here - it’s at this stage that the certificate is attached to the request.

    Backend section: This is where the request is forwarded to the backend service. At this point, the request has already been prepared and is ready to be sent. The backend service then uses the certificate for authentication.

    So, while it might seem more logical for the <authentication-certificate> policy to be in the backend section, it’s actually necessary for it to be in the inbound section so that the certificate can be attached to the request before it’s sent to the backend.

    I hope this helps clarify things! do let me know incase of further queries, I would be happy to assist you.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful