限制对给定网络的 Google Cloud Functions 访问? [英] Restrict access to Google Cloud Functions to a given network?
问题描述
我正在查看 Google Cloud Functions 文档,我想知道是否是否可以限制对给定网络的 HTTP 云功能的访问?我想避免任何人用尽免费配额.
I'm looking through Google Cloud Functions docs and I wonder if it is possible to restrict access to HTTP cloud function to the given network? I would like to avoid anyone to exhaust the free quota.
Cloud Functions 是否有任何防火墙规则或类似机制?
Is there any firewall rules or similar mechanism for Cloud Functions?
推荐答案
我认为目前没有任何内置的安全限制.
I don't believe there is any in-built security restrictions at the moment.
为了避免配额耗尽,您可以传递带有某种共享密钥的标头或参数.即使是固定的字符串值也有助于避免这个问题.
In terms of avoid quota exhaustion you could pass a header or parameter with some kind of shared secret. Even a fixed string value would help avoid this problem.
这篇关于限制对给定网络的 Google Cloud Functions 访问?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!