我应该在哪里存储敏感文件在Heroku? [英] Where should I store sensitive files on 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屋!