<p>I am trying to implement the following workflow to setup in the Azure:</p>
<ol>
<li>Private AKS cluster to deploy my applications - Already provisioned</li>
<li>An ingress controller (AGIC preferably) for routing traffic to pods - Already provisioned</li>
<li>An APIM for generating JWT tokens - Not provisioned yet until I figure out it is possible</li>
</ol>
<p>What I need is, when a user tries to access a URL (eg: test.example.de), the traffic flow should be as follows:</p>
<p>a. A user Hits the DNS and that DNS is routed to the Application Gateway created by the AGIC</p>
<p>b. Then APP Gateway, without sending the traffic to the Ingresss and then to services and pods, it SHOULD authenticate with APIM to generate a JWT token or to validate if the user has permissions.</p>
<p>c. If user has permissions ,the traffic will be routed to the ingress and then to the service and the pods.</p>
<p>d. If user doesn't have permissions, don't route the traffic</p>
<p>I looked into this azure doc [1], but it seems like it doesn't perform JWT authentication.</p>
<p>Can someone please help me?</p>
<p>[1] - <a href="https://learn.microsoft.com/en-us/azure/architecture/reference-architectures/apis/protect-apis" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/azure/architecture/reference-architectures/apis/protect-apis</a></p>

Jananath Banuka
<p>its not possible to do exactly as you want to currently: <a href="https://learn.microsoft.com/en-us/answers/questions/92829/does-agic-support-jwt-validation" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/answers/questions/92829/does-agic-support-jwt-validation</a></p>
<p>APPGW cant do JWT validation, hence AGIC cant</p>
<p>according to the article <a href="https://medium.com/@jw_ng/using-azure-application-gateway-with-api-management-service-f9b9b2cd1731" rel="nofollow noreferrer">linked in that thread</a> - you can use APIM as an intermediary to do validation</p>
