【问题标题】:Cloud Functions returns 403 error also with Cloud Functions Invoker permissionsCloud Functions 返回 403 错误也具有 Cloud Functions Invoker 权限
【发布时间】:2022-01-08 05:36:24
【问题描述】:

在 GCP 内:

  1. 我在 Google Cloud Functions 中创建了一个函数。
  2. 我想从 Google Workflows 调用该函数。
  3. 我添加了一个具有“Cloud Functions Invoker”权限的服务帐户。
  4. 我在 Google Workflows 中创建了一个工作流,它使用具有我之前添加的“Cloud Functions Invoker”权限的服务帐户。
  5. 我运行工作流...失败并显示“HTTP 服务器响应错误代码 403”。

如果我使用具有“Cloud Functions Invoker”权限的服务帐户,为什么会出现 403 错误?如果我为它工作的功能禁用身份验证,但我需要身份验证,因为它不是公共 API。

【问题讨论】:

    标签: google-cloud-platform google-cloud-functions google-workflows


    【解决方案1】:
    推荐的答案 Google Cloud

    这必须在工作流代码中添加:

    auth:
        type: OIDC
    

    https://cloud.google.com/workflows/docs/calling-run-functions?authuser=1#add_auth_info

    【讨论】:

      猜你喜欢
      • 2022-01-22
      • 2018-06-11
      • 2021-06-17
      • 2019-10-13
      • 2018-06-17
      • 2017-11-29
      • 2017-09-30
      • 2021-05-08
      • 1970-01-01
      相关资源
      最近更新 更多