Firebase功能到GCE防火墙规则 [英] Firebase Functions to GCE firewall rule

查看:52
本文介绍了Firebase功能到GCE防火墙规则的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些firebase函数,这些函数必须连接到在GCP中的GCE机器上运行的REST服务(当然是在同一项目下).防火墙阻止了连接,并且使连接发生的唯一方法是向所有人开放端口.

I have some firebase functions that have to connect to a REST service running on a GCE machine in GCP (under the same project of course). The firewall is blocking the connection and the only way to make it happen was to open the port to everybody.

有人知道如何在防火墙规则中将Firebase函数指定为源吗?

Does anybody know how can you specify firebase functions as source in a firewall rule?

推荐答案

您应使用防火墙规则来源中的服务帐户.与您的Fire-base Cloud功能关联的服务帐户.以下步骤将

You should use Service account in a source of firewall rule. Service account which is associated with you Fire-base Cloud function. Following steps will

  • 转到Google云控制台,然后选择项目名称.
  • 转到"IAM"部分,并找到您的服务帐户(名称="Google Cloud Functions Service代理",并且具有@gcf.***.com)
  • 将此服务帐户与防火墙规则源关联.

这篇关于Firebase功能到GCE防火墙规则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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