[英]How to trigger google cloud function with restricted Ip address?
Basically, I would like to trigger my google cloud function without authentication and only allowed some IP public address to trigger it.基本上,我想在没有身份验证的情况下触发我的谷歌云 function,并且只允许一些 IP 公共地址触发它。
After many research I don't find any way to do that, so if you know something, I'm interested:D经过多次研究,我没有找到任何方法来做到这一点,所以如果你知道什么,我很感兴趣:D
Thank you in advance先感谢您
Following this official documentation , you can configure the.network settings of your Cloud Functions depending on your use case.按照此官方文档,您可以根据您的用例配置 Cloud Functions 的 .network 设置。 For starters, to be able to restrict IP addresses to trigger your function, you can set up ingress settings.
对于初学者来说,为了能够限制 IP 地址触发你的 function,你可以设置入口设置。
Ingress settings restrict whether a function can be invoked by resources outside of your Google Cloud project or VPC Service Controls service perimeter. 入口设置限制 function 是否可以被 Google Cloud 项目或 VPC Service Controls 服务边界之外的资源调用。 You can specify one of the following ingress setting values:
您可以指定以下入口设置值之一:
Sample gcloud
command: gcloud
命令示例:
gcloud functions deploy FUNCTION_NAME \
--trigger-http \
--ingress-settings INGRESS_SETTINGS \
FLAGS...
Additionally if you choose the Cloud Load Balancing option, you can follow this article, How to securely load balance cloud functions on GCP using Cloud Armor .此外,如果您选择云负载平衡选项,您可以按照本文 如何使用 Cloud Armor 在 GCP 上安全地负载平衡云功能。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.