question

RajNair avatar image
0 Votes"
RajNair asked RajNair commented

Front Door Cache Purge - What specific role needed

In my classic front door, is there a specific role i can assign to user or service principal to invalidate the cache in front door? i just need the SPN to do only cache purge on front door , nothing else. Is this possible? If this granular level permission is not available what other options i can use to cache purge on front door. Basically i dont want to give anyother permission to anyone other than cache purge?

Do i have to write a logic app or function to do it if it is not possible?

azure-front-door
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

GitaraniSharmaMSFT-4262 avatar image
0 Votes"
GitaraniSharmaMSFT-4262 answered GitaraniSharmaMSFT-4262 commented

Hello @RajNair ,

Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.

I understand that you would like to assign a specific role to a user or service principal to do only cache purge on front door.

You could restrict the permissions with RBAC custom roles and assign the below role to allow a user to do cache purge on Azure Front Door:
Microsoft.Network/frontDoors/purge/action - Purge cached content from a Front Door

Refer : https://docs.microsoft.com/en-us/azure/role-based-access-control/resource-provider-operations#microsoftnetwork
https://docs.microsoft.com/en-us/azure/role-based-access-control/custom-roles
https://docs.microsoft.com/en-us/azure/role-based-access-control/role-assignments-portal?tabs=current

Kindly let us know if the above helps or you need further assistance on this issue.


Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @GitaraniSharmaMSFT-4262 , If we have multiple front ends and backend.... is there a option to purge specific to an end point? i have multiple custom domains each connecting to specific storage account. But how do we purge contents of a specific domain (end point)?

www.abc.com -> Storageacc1.web.azure.com
www.ddd.com ->Storageacc2.web.azure.com

0 Votes 0 ·

Hello @RajNair ,

Apologies for the delay in my response.

In Azure Front Door (classic), only one endpoint is supported for each Front Door profile. In Azure Front Door Standard and Premium, you can configure multiple endpoints for your Azure Front Door profile.
Refer : https://docs.microsoft.com/en-us/azure/frontdoor/manager#front-door-manager-classic

Hence, in Azure Front Door (classic), you can select what assets (example - '/', '/pictures/strasbourg.png' or '/pictures/*'), you wish to purge from the cache using the content paths list or select 'Purge all' checkbox to clear all assets from the Front Door designer.
Refer : https://docs.microsoft.com/en-gb/azure/frontdoor/front-door-caching?pivots=front-door-classic#cache-purge

In Azure Front Door Standard and Premium, you can select one or more endpoints and enter the domain and or subdomains you want to purge from the edge nodes. To clear all assets, select Purge all assets for the selected domains. Or you can do Single path purge & Root domain purge depending upon your requirement.
Refer : https://docs.microsoft.com/en-us/azure/frontdoor/standard-premium/how-to-cache-purge#configure-cache-purge

Regards,
Gita

0 Votes 0 ·
TchimwaSougang-3249 avatar image
0 Votes"
TchimwaSougang-3249 answered RajNair commented

@RajNair , thank you for your question. Here it depends on your AFD SKU, if it is classic, it will not be possible as there not an option to purge a particular domain with the classic.
if you are using the new AFD Standard/Premium, you should be able to purge a particular endpoint as you can see from the link below:
https://docs.microsoft.com/en-us/azure/frontdoor/standard-premium/how-to-cache-purge#configure-cache-purge

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@TchimwaSougang-3249 Thank you so much, i am going to use AFD premium, so this will work i believe. Thank you

0 Votes 0 ·

You are welcome. Glad to help. Please do not forget to accept the answer if it helps you.

0 Votes 0 ·
RajNair avatar image RajNair TchimwaSougang-3249 ·

@TchimwaSougang-3249 There is no option to accept answer...

0 Votes 0 ·