简体   繁体   English

谷歌云应用引擎上nodejs应用的秘密管理

[英]Secret management for nodejs app on google cloud app engine

I had a talk with a friend today about a project his startup is doing.我今天和一位朋友谈论了他的创业公司正在做的一个项目。 It is a nodejs application with a mongodb backend hosted on Google Cloud App Engine.它是一个 nodejs 应用程序,带有托管在 Google Cloud App Engine 上的 mongodb 后端。 To my horror I saw that he has stored secrets such as API keys and database keys in his git repo.令我惊恐的是,我看到他在他的 git 存储库中存储了诸如 API 密钥和数据库密钥之类的秘密。

I come from an Azure and .NET background so I am used to using Azure Key Vault, and don't know what is the preferred way of doing it in GAE.我来自 Azure 和 .NET 背景,所以我习惯使用 Azure Key Vault,不知道在 GAE 中首选的方法是什么。 I have tried to read the docs but there are a lot of options and none seems to quite mirror what I am used to in Azure.我曾尝试阅读文档,但有很多选项,但似乎没有一个能完全反映我在 Azure 中所习惯的内容。

I would like to help my friend out.我想帮助我的朋友。

So could anyone please point me towards what product I should read up on.所以任何人都可以请我指出我应该阅读什么产品。 Is it Hashicorp Vault, Google Cloud HMS or Berglas?是 Hashicorp Vault、Google Cloud HMS 还是 Berglas? My needs are that the vault needs to be able to store secrets encrypted and the nodejs app should not need to worry about authenticating with the vault.我的需求是保险库需要能够存储加密的机密,并且 nodejs 应用程序不需要担心与保险库进行身份验证。 The vault should just allow the service account to read secrets.保险库应该只允许服务帐户读取机密。

If the vault can also fit into a Terraform setup where we can provision all resources and at provisioning also generate the secrets needed and then put them into the vault without any human ever laying eyes on that secret, then that would be really awesome.如果保险库也可以安装在 Terraform 设置中,我们可以在其中配置所有资源,并且在配置时还生成所需的秘密,然后将它们放入保险库中,而没有任何人看到该秘密,那真是太棒了。 That way we could also create a setup where he would be able to provision a full disposable environment based on a feature branch.这样,我们还可以创建一个设置,让他能够基于功能分支配置一个完整的一次性环境。 But that is just a nice to have.但这只是一个不错的选择。

Based on the fact that you want to use Terraform as well, I would suggest using HashiCorp.基于您也想使用 Terraform 的事实,我建议使用 HashiCorp。 There is a blog post about the combination of those 2 from Google.谷歌有一篇关于这两个组合的博客文章 In general, all those solutions that you mentioned in your question are viable and you can find more here .一般来说,您在问题中提到的所有这些解决方案都是可行的,您可以在此处找到更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM