Azure Functions 和限制 IP [英] Azure Functions and restricting IPs

查看:15
本文介绍了Azure Functions 和限制 IP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的很想在即将到来的项目中使用 Azure Functions,但是有没有办法像在 Web.Config 中的 ipSecurity 中一样创建 IP 白名单?

I would really like to use Azure Functions for an upcoming project, but is there a way to create a whitelist of IPs like in ipSecurity in Web.Config?

他们正在使用 authLevel 功能,所以那里有一些保护.我的客户对白名单有安全要求.

They are using authLevel function, so there is some protection there. My customer has a security requirement for a whitelist.

查看资源浏览器似乎有一个属性 ipSecurityRestrictions 可能有效,但我在我的 Azure 函数实例上看不到它.

Looking at the resource explorer there seems to be a property ipSecurityRestrictions that might work, but I don't see it on my Azure function instance.

推荐答案

不幸的是,由于您无法控制 web.config,所以这种方式是不可行的.

Unfortunately, as you don't have control over a web.config this isn't doable that way.

您可以在函数本身内进行 ip 验证,或添加 API 管理等解决方案来阻止流量.

You could do the ip validation within the function itself or add a solution like API Management to block traffic.

如果您愿意在专用(不是消费计划)上运行,您可以将函数运行时部署为站点扩展,并使用您需要的 ip 白名单修改 web.config:https://github.com/Azure/azure-webjobs-sdk-script/wiki/Deploying-the-Functions-runtime-as-a-private-site-extension

If you're willing to run on dedicated (not consumption plan), you can deploy the functions runtime as a site extension with a modified web.config with the ip whitelist you need: https://github.com/Azure/azure-webjobs-sdk-script/wiki/Deploying-the-Functions-runtime-as-a-private-site-extension

这篇关于Azure Functions 和限制 IP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆