Securely publishing API in Azure

EnterpriseArchitect 6,161 Reputation points
2025-08-01T03:35:08.42+00:00

What are the security best practice patterns I can use to publish multiple APIs through Azure APIM https://azure.microsoft.com/en-au/products/api-management ?

Shall I put it behind WAF https://azure.microsoft.com/en-us/products/web-application-firewall or Application Gateway https://learn.microsoft.com/en-us/azure/application-gateway/overview ?

Thank you.

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
{count} votes

Accepted answer
  1. Anurag Rohikar 205 Reputation points Microsoft External Staff Moderator
    2025-08-04T12:52:49.5366667+00:00

    Hello EnterpriseArchitect,  Thanks for reaching out on Microsoft Q&A and really appreciate your patience while we looked into this.

    For comprehensive perimeter protection against Layer 7 attacks (e.g., SQL Injection, Cross-Site Scripting), the recommended best practice is to place your APIM instance behind an Azure Application Gateway with Web Application Firewall (WAF) enabled. This approach creates a layered defense-in-depth, ensuring that malicious traffic is inspected and blocked before it can reach your API endpoints.

    While APIM provides built-in security features like authentication (OAuth 2.0, JWT validation), rate limiting, and IP filtering, the WAF adds a critical, dedicated layer for web application security.

    Recommended Architecture

    The most secure and common pattern is:

    1. Azure Application Gateway (with WAF enabled): Acts as the public-facing entry point, terminating SSL/TLS traffic and applying WAF rules.
    2. Azure API Management: Deployed in internal VNet mode, making it inaccessible from the public internet. It receives clean traffic from the Application Gateway and applies API-specific policies.
    3. Backend APIs: The final destination for traffic, often also deployed in a secure VNet.

    Alternatively, if you require global-scale load balancing and WAF protection, you can use Azure Front Door instead of Application Gateway.

    Documentation for reference: 

    For a solution that best suits your requirements, may I ask you to confirm the following details?

    • Are the APIs publicly exposed to the Internet, or are they for internal use?
    • Do you require load balancing and routing features at a global or regional scale?
    • Are there specific compliance standards (e.g., PCI DSS, HIPAA) that you need to adhere to?

    Looking forward to your response to assist you further. Thank You!

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.