如何在 Google Cloud Scheduler 和 App Engine 之间建立私人通信?
How to set up private communication between Google Cloud Scheduler and App Engine?
我已经部署了一个 Google App Engine 应用程序。
该应用每天由 App Engine 定时作业触发一次。
App Engine 防火墙规则设置为 'Deny' 以保密。防火墙不会阻止 App Engine cron 作业。
现在我想用 Google Cloud Scheduler 替换 App Engine cron 作业(Cloud Scheduler 更易于使用,因为它具有暂停功能)。
但是 App Engine 防火墙阻止了 Cloud Scheduler。因此,为了使其正常工作,我需要将防火墙设置为 'Allow' 以使其可公开访问。
有没有办法在它们之间建立私人通信,使我的应用程序只能由 Cloud Scheduler 访问?
你不知道,它是一个无服务器产品,你不能将它附加到你的 VPC 或 public IP(但是,我希望这会很快改变!)。您可以允许 Google public IP 范围。但在这种情况下,Google Cloud 上的任何人都可以访问您的 App Engine 服务。
这就是为什么 Google moto 之一是“不信任网络”,我建议您使用 IAP 等功能,而不是使用防火墙规则进行 IP 过滤。
我无意中找到了解决方案。
Cloud Scheduler - 创建作业 - 目标选择 App Engine HTTP。
与 corn 作业相同,App Engine 防火墙不会阻止此操作。
我已经部署了一个 Google App Engine 应用程序。
该应用每天由 App Engine 定时作业触发一次。
App Engine 防火墙规则设置为 'Deny' 以保密。防火墙不会阻止 App Engine cron 作业。
现在我想用 Google Cloud Scheduler 替换 App Engine cron 作业(Cloud Scheduler 更易于使用,因为它具有暂停功能)。
但是 App Engine 防火墙阻止了 Cloud Scheduler。因此,为了使其正常工作,我需要将防火墙设置为 'Allow' 以使其可公开访问。
有没有办法在它们之间建立私人通信,使我的应用程序只能由 Cloud Scheduler 访问?
你不知道,它是一个无服务器产品,你不能将它附加到你的 VPC 或 public IP(但是,我希望这会很快改变!)。您可以允许 Google public IP 范围。但在这种情况下,Google Cloud 上的任何人都可以访问您的 App Engine 服务。
这就是为什么 Google moto 之一是“不信任网络”,我建议您使用 IAP 等功能,而不是使用防火墙规则进行 IP 过滤。
我无意中找到了解决方案。
Cloud Scheduler - 创建作业 - 目标选择 App Engine HTTP。
与 corn 作业相同,App Engine 防火墙不会阻止此操作。