我应该在哪里存储敏感文件在Heroku? [英] Where should I store sensitive files on Heroku?

查看:206
本文介绍了我应该在哪里存储敏感文件在Heroku?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题可能有一个明显的答案,我只是没有想到。我知道敏感数据(如安全凭证)最好通过Heroku的CLI使用环境变量存储在像Heroku这样的服务中,其中包含 heroku config:add 。但是敏感的文件如证书呢?具体来说,我想知道我应该怎么做我的证书(APN)。



自从回应这个问题的沉默导致我相信这里没有很多很棒的选择(和 Urban Airship 看起来太贵了)。从 APN on Rails 获取一个gander,我看到他们实际上将证书存储在数据库中。那有意义吗?或者将证书的内容实际存储在环境变量(不确定是否可能)中是有意义的?

解决方案

您可以将整个证书设置为环境变量。



看到这个答案:
Heroku中的多行配置变量


There's probably an obvious answer to this question that I'm just not thinking of. I know that sensitive data such as secure credentials are best stored on a service like Heroku using environment variables via Heroku's CLI with heroku config:add. But what about sensitive files, such as certificates? Specifically I'm wondering what I should do with my certificate for Apple Push Notifications (APN).

I'm taking a stab at implementing this myself since the silence in response to this question leads me to believe there aren't a lot of great alternatives there (and Urban Airship looks too expensive). From taking a gander at APN on Rails, I see that they actually store certificates in the database. Does that make sense? Or would it make sense to actually store the content of the certificate in an environment variable (not sure if that's even possible)?

解决方案

You can set the whole certificate in an environment variable.

See this answer: Multi-line config variables in Heroku

这篇关于我应该在哪里存储敏感文件在Heroku?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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