在 Firebase 项目中存储秘密:Firebase 配置 API 或秘密管理器 API?

Storing secrets in firebase projects: Firebase config API or Secret Manager API?

要从云函数访问机密,Google 提供 Secret Manager API:

Secret Manager stores API keys, passwords, certificates, and other sensitive data. It provides convenience while improving security.

另一方面,Firebase 建议通过其 Environment configuration API 存储机密,如其文档和示例中明确提到的那样:

Often you'll need additional configuration for your functions, such as third-party API keys or tuneable settings. The Firebase SDK for Cloud Functions offers built-in environment configuration to make it easy to store and retrieve this type of data for your project.

问题:

Firebase 的配置 API 在处理数据的方式上似乎更简单,而且是免费的,这使得它比 Secret Manager 更适合用于 Firebase 项目 API .

在 firebase 项目的上下文中比较这两个 API 的优点和缺点是什么?最重要的是,在 Secret Manager API 上使用 Firebase 的配置 API 时,在安全性方面是否存在任何缺陷?

除了您指出的内容之外,主要区别在于 Secret Manager 具有审计、精细访问控制、版本控制和多区域复制等功能。

我将提交有关制作“比较”页面的内部问题,以使这一点更清楚。