Nextcloud+对象储存=裸奔?
描述
Nextcloud 在用 S3 之类的 Object Storage 作为 PrimaryStorage 时(config.php 中设置),疑似有重大安全漏洞。 用来储存密钥的 files_encryption 文件夹上传到了 OSS 里,即 files_encryption 不在服务器本地。密钥和加密的文件都储存在同一个地方,加密形同虚设!
此事 2019 年在 github 就开始被讨论,但是讨论的人并不多,最终也没有得到解决。希望大家明白世界上没有绝对的安全。
验证
- 在安装 Nextcloud 的时候,如果设置了 PrimaryStorage,那么服务器上不会有 files_encryption 文件夹,反之则有。我用 docker 安装多次验证。
- 我查看了 Nextcloud 的数据库(我的是 Postgres )中的 oc_filecache 表,发现路径 files_encryption/下的文件都在 OCC 上。(storage=2)
- 找到了 oc_filecache 表中密钥文件所对应的 OSS 文件 key, 并从 OSS 直接下载了对应文件,找到了密钥。
- 不知道如何解密所以没有解密,所以没有最终还原文件。
Nextcloud 官方说法
Server Side Encryption provides protection for data on external storage as the files are encrypted before they are sent to storage and the keys never leave the Nextcloud server.
文字游戏还是描述的挺精准的
欢迎大家在此贴下面讨论有关 Nextcloud 的安全性问题,更安全的私人网盘我想另外开贴讨论。
参考
https://nextcloud.com/blog/encryption-in-nextcloud/
https://github.com/nextcloud/server/issues/17561
https://github.com/nextcloud/server/issues/22077#issuecomment-671080056
本文由 vps网友提供,转载请注明出处
本文链接: https://www.vpsvsvps.com/discuss/a/1676472082583523328.html