A Python web app running on Azure App Service uses a system-assigned managed identity and DefaultAzureCredential to load settings from an Azure App Configuration store. The app only reads settings; it never creates or changes them. None of the stored settings are Key Vault references, and the app does not access Azure Key Vault. You must follow the principle of least privilege.
Which Azure RBAC role should you assign to the managed identity on the App Configuration store?
An app that only retrieves key-values from App Configuration needs the App Configuration Data Reader role, which grants read-only data access. Data Owner is intended for identities that create and change settings, so it exceeds least privilege here. The Key Vault roles apply to secrets in Key Vault, not to the App Configuration store.
- Correct: App Configuration Data Reader. This role gives read-only access to key-values in the store, which is exactly what an app that only retrieves settings needs.
- Not correct: Key Vault Secrets User. This role lets an identity read secret values in Key Vault. It does not grant read access to App Configuration settings, and the app uses no Key Vault references.
- Not correct: Key Vault Secrets Officer. This role is used to create and update secrets in Key Vault. It does not cover reading settings from an App Configuration store.
- Not correct: App Configuration Data Owner. Data Owner is meant for operators or pipelines that create and modify settings. The app never writes, so this role grants more than required.