Block traffic in azure front door based on claims

393 Views Asked by At

I have a scenario in which I want to block some requests. There is a property set in Identity claims and I want to deny the request based on that property. Let's say that claims have a proper named "prop1". I want to make sure that if prop1 has a value "value1" then I want to block that specific request. Kindly share how can I do this.

Thanks

I have gone through the "Custom Rules" in "Front Door WAF policy" but I have found no option to check value in claims.

1

There are 1 best solutions below

5
Imran On

To block some requests in Azure Front Door, check the below:

In your WAF policy go to Custom Rules add rule type and add condition match type as string and match variable as RequestUri is contain prop1 and value 1 action to be deny

enter image description here

The request which contains cdnnfn blocked successfully like below:

enter image description here

enter image description here

Reference:

Tutorial: Create WAF policy for Azure Front Door - Azure portal | Microsoft Learn