Azure-Samples / Azure-Samples/dotNET-Frontend-AB-Testing-on-Azure-Container-Apps

Roles for service principal

未关闭
#6 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Bicep
星标
25
派生
73
PR 合并指标
30 天内没有已合并 PR

描述

> Please provide us with the following information:
> ---------------------------------------------------------------
The instructions say to use a Contributor role for the subscription. However, when I tried this, the Contributor role does not include "App Configuration Data Owner". I needed to:
1) Use Owner as the role
2) Change the pipeline to assign the role "App Configuration Data Owner" to the SP for the newly created resource group

(Separately, I had changed the authentication to use https://learn.microsoft.com/en-us/azure/developer/github/connect-from-azure?tabs=azure-cli%2Clinux so the AppId was available, so this code is not usable as is.).

- name: Assign SP rights to update keys.
uses: azure/CLI@v1
with:
inlineScript: |
echo "Creating role assignment to allow write to App Config keys within resource group"
az role assignment create --role "App Configuration Data Owner" -g ${{ env.RESOURCE_GROUP_NAME }} --assignee-principal-type ServicePrincipal --assignee-object-id $(az ad sp list --filter "appId eq '${{ secrets.AZURE_CLIENT_ID }}'" | jq -r '.[].id')

### This issue is for a: (mark with an `x`)
```
- [X ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
```

### Minimal steps to reproduce
>
trying to execute the instructions

### Any log messages given by the failure
>

### Expected/desired behavior
>

### OS and Version?
> Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

### Versions
>

### Mention any other details that might be useful

> ---------------------------------------------------------------
> Thanks! We'll be in touch soon.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。