azure - How to call an Azure Rest API from an Azure Web Application
问题描述
I was wondering if I can get some direction on this problem. I have an Azure Rest API that I only want a few of my Azure Web Apps access to. I thought if I deny anonymous on the Rest API and set up the Web Apps' service principals in AAD I would be able to achieve this. Most of the examples I seen require the user of the Web App to login which is not a requirement for what I am doing. Essentially the Web Apps are the only consumers and I know their Service Principal information but I can't figure the next step. Thanks
解决方案
一种可能的解决方案是使用Managed Service Identity
. 本质上,您将为您的 WebApps 分配一个身份,然后只允许从这些身份访问 API。
您可以在此处找到有关托管服务标识的更多信息:https ://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview和https://docs.microsoft.com /en-us/azure/app-service/overview-managed-identity?tabs=dotnet。
推荐阅读
- c++ - 没有 STL 容器的迭代器
- java - 作为bean传递时没有得到服务器响应
- reactjs - 在 material-ui 中动态添加、删除、更改、禁用/启用菜单项并做出反应
- html - 单击按钮更改表单
- c++ - 如何减少功能模板专业化?
- python - 如何使用 Python 的 pymcmcstat 库计算贝叶斯模型选择
- angular - 无法将从 api 返回的数据值分配给 Angular 8 中的类变量
- java - 如何从android中的通知中停止前台服务?
- python - 使用多处理从两个不同的目录并行运行两个 python 代码
- javascript - Typescript 中 Map 的类型保护