azure - 从 Azure DevOps 限制对 Azure 的部署权限
问题描述
我想锁定对 kudu 工具的访问,例如 https://.scm.azurewebsites.net/DebugConsole 到 azure devops 使用的一组 IP 地址。我已经进入 AzureDevops -> 组织设置 -> 概述,看到我的组织的 Azure Devops 在例如西欧我已经从这里下载了 azure 数据中心的 IP 地址列表:https ://www.microsoft.com/ en-nz/下载/details.aspx?id=41653
我已经进入应用服务-> 网络刀片-> 配置访问限制并上传了 .scm.azurewebsites.net 的例如西欧的 IP 地址列表。
我的理解是 AzureDevops 代理从组织设置中指定的区域运行,因此如果我输入这些 IP 地址,它们应该能够正常访问 kudu 工具,但我收到以下错误:
Failed to deploy web package to App Service.
Error Code: ERROR_COULD_NOT_CONNECT_TO_REMOTESVC
More Information: Could not connect to the remote computer ("<myappservice>.scm.azurewebsites.net") using the specified process ("Web Management Service") because the server did not respond. Make sure that the process ("Web Management Service") is started on the remote computer. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_CONNECT_TO_REMOTESVC.
Error: The remote server returned an error: (403) Forbidden.
如果我删除它部署的 IP 地址没有问题。如何限制对 Azure Devops 的部署访问
解决方案
正如 Daniel Mann 的评论所建议的那样 - 您应该使用 Azure RBAC 来限制 Azure Devops 服务主体可以在 Azure 中执行的操作。如果您只允许它管理特定的应用服务 - 它只能这样做。
https://docs.microsoft.com/en-us/azure/role-based-access-control/role-assignments-portal
推荐阅读
- python - 如何使用openpyxl更新excel文件中的列表?
- reactjs - 如何在 React Hook 中使用 useState 更新整个 Uint8Array 值?
- git - 为什么我的“合并拉取请求”会自动成为“合并分支”?
- javascript - Google 距离矩阵 API 找不到特定的邮政编码
- javascript - 当有人不在站点的屏幕上时如何重新加载窗口。但是屏幕上的窗口不应该重新加载
- macos - 将 KEXT 移植到 DEXT 无法创建 ACM 串行 TTY 条目
- android - 为什么在指定填充时 mapPadding Prop 没有在 iOS 设备上提供任何填充?
- flutter - 使用页面上的存储库颤动问题
- mqtt - MQTT - 如何知道设备是否收到消息
- python - 如何将python生成的数据透视表的列转移到新的excel表中?