How to configure required permissions for custom roles by F12 trace log

Published Oct 25 2021 02:58 AM 1,790 Views
Microsoft

Azure role-based access control (Azure RBAC) helps us manage who has access to Azure resources, what they can do with those resources, and what areas they have access to. When we give permissions to custom roles, it is preferred to complete specific tasks with the least rights. However, it is often the case to be confused about which permissions are necessary. Thus, this article will give instructions on how to find out required permissions for custom roles by F12 trace log.

 

In this article, we will take how to assign efficient rights to developers when swapping slots as an example.

  • Firstly, the co-developers should have the read rights to the App service.

Suyu_Huang_0-1635154752462.png

  • Secondly, to realize the swapping function obviously requires the swap rights.

Suyu_Huang_0-1635155869899.png

 

  • With these settings, when we check the App service page with the co-developer account, we will find that the swap button is inaccessible grey. At this time, we can use the F12 developer tool to catch the trace log. There are two 403 errors as below, which are related to permissions about the config/list.

Suyu_Huang_2-1635154752481.png

  • Go back to the owner account of the App service.
  • Find out the missing permissions and add them to the custom role.

Suyu_Huang_3-1635154752465.png

  • Relog in with the co-developer account and check again. The swap button is available and no errors on this page now.

Suyu_Huang_4-1635154752475.png

  • To test whether the swap works, click on the swap page but a new alarm shows up.
  • Check back in the F12 log and find that the missing permission is about slotsdiffs now.

Suyu_Huang_5-1635154752477.png

  • Go ahead to add the specific permissions to the custom role again by following the previous steps and checking back with no error logs.

Suyu_Huang_6-1635154752479.png

  • Finally, the custom role for the co-developer to swap slots functions successfully.

Suyu_Huang_7-1635154752467.png

  • With the previous steps, we have found out that the following permissions are necessary for developers to swap slots in total.

Suyu_Huang_8-1635154752469.png

 

Co-Authors
Version history
Last update:
‎Oct 25 2021 02:58 AM
Updated by: