TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Securing MongoDB Using Let's Encrypt Certificate

16 点作者 zabi_rauf超过 6 年前

5 条评论

precurse超过 6 年前
Neat concept, but there&#x27;s no cost to running your own internal CA and having MongoDB trust that instead. Since you&#x27;re already likely going to be running automated tools to deploy MongoDB (I assume), you can generate your own certificate&#x2F;key pair then. This is how we do it where I work.<p>One of the big issues with generating the Let&#x27;s Encrypt cert on demand is that if the LE API servers are ever down, you won&#x27;t be able to create a cert.
评论 #17964039 未加载
nodesocket超过 6 年前
Not sure I get the point of this. Seems way overly complicated. Why not just:<p><pre><code> cd &#x2F;etc&#x2F;ssl ### 10 year expiration openssl req -newkey rsa:2048 -new -x509 -days 3650 -nodes -out mongodb-cert.crt -keyout mongodb-cert.key cat mongodb-cert.key mongodb-cert.crt &gt; mongodb.pem </code></pre> Then in the MongoDB config:<p><pre><code> sslMode = requireSSL sslPEMKeyFile = &#x2F;etc&#x2F;ssl&#x2F;mongodb.pem </code></pre> The only gotcha is in your clients you may have to set a flag:<p><pre><code> &quot;allow_self_signed&quot; =&gt; true</code></pre>
评论 #17965527 未加载
评论 #17964546 未加载
getcrunk超过 6 年前
What&#x27;s the benefit of doing this that outweighs the downside of restarts? If your DB has to communicate directly with something over wan there are other options
评论 #17963380 未加载
drinchev超过 6 年前
In my last project, we had a VPN ( tinc ) between the mongo cluster and the micro services.<p>Tincd was installed on each virtual server and allowed a secure and unified way for communication.<p>For example Redis, Mongo, Logstash, etc... all have their own way of encrypting the connection, but once running them in a VPN, you can leave them unencrypted.
gaius超过 6 年前
<i>Making MongoDB publicly accessible</i><p>The game&#x27;s already over, you just don&#x27;t know it yet