Azure / application-gateway-kubernetes-ingress

This is an ingress controller that can be run on Azure Kubernetes Service (AKS) to allow an Azure Application Gateway to act as the ingress for an AKS cluster.
https://azure.github.io/application-gateway-kubernetes-ingress
MIT License
677 stars 420 forks source link

Setup per-site WAF policy #1574

Open benlau opened 12 months ago

benlau commented 12 months ago

Hello,

According to the document for waf-policy-for-path, it should choose the WAF policy via annotation, but it will apply to all the site and all paths. How can I associate a different WAF policy per different site?

For example, apply WAF Policy 1 to www.example1.com and WAF Policy 2 to www.example2.com .

The document: https://github.com/Azure/application-gateway-kubernetes-ingress/blob/master/docs/annotations.md#azure-waf-policy-for-path

Thanks for any advice

akshaysngupta commented 10 months ago

If you can split your ingress by host name, you can set different waf-policy-for-path annotation allowing you to have two waf policies.