BlessingCR’s Blog
BlessingCR’s Blog

公网部署时,数据泄露问题

如果你想要提供永久性的资源下载链接,就需要把Bucket(桶)的BP设置为Read&Write。

问题来了!!!

当你用 http://minio_out_url/bucket_path/ 访问时,会得到一个超大的XML

https://vipkshttps13.wiz.cn/editor/d43a29e0-2b90-11ed-a050-f704bb07f03a/2e65e34b-4236-4a03-9d8b-b2def1928526/resources/nvvBuQrdTJG7PEqticDnezWVssuOBFpm8dXyWx_SwcE.png?token=W.S-U2LakO90q-KGcMSIqH2d_c07KmHgERtANbmkPOT43koVOx_c0jAXP5iUgpFhQ

minio的桶有一个listObjects的功能,默认最多1000条记录,这就意味着,如果你打开永久下载链接模式,那么任何人可以通过桶路径来获取你保存的所有资源的信息,然后一个一个下载下来!如果这些资源是各种敏感数据,比如说艳照门之类,那超级八卦又该爆发了。

怎么去封堵这个风险隐患呢?需要做两件事情:

1、把Minio隐藏到内网去,让公网用户无法直接访问到minio服务器

2、通过Nginx的proxy_pass跳转访问Minio资源

3、Nginx的配置文件进行Rewrite屏蔽,只允许访问具体资源文件,不允许访问桶路径:

  location  ^~ /images {

      rewrite ^/images/(.+)$ /images/$1 break;

      proxy_pass http://minio_local_url/;

再去访问http://minio_out_url/bucket_path/,你会发现路径无效。但是你用具体的资源链接去访问,仍然可以获得资源内容。

原文: https://blog.csdn.net/masterhero/article/details/108746588

发表回复

textsms
account_circle
email

  • Enjoyed reading this, very good stuff, appreciate it. “I will do my best. That is all I can do. I ask for your help-and God’s.” by Lyndon B. Johnson.

    4 月前 回复
  • I have been browsing on-line greater than three hours as of late, but I by no means discovered any interesting article like yours. It is lovely price sufficient for me. Personally, if all web owners and bloggers made excellent content material as you probably did, the web can be a lot more useful than ever before.

    2 月前 回复
  • Very nice article and right to the point. I don’t know if this is actually the best place to ask but do you people have any thoughts on where to employ some professional writers? Thank you 🙂

    2 月前 回复
  • What’s Happening i’m new to this, I stumbled
    upon this I have found It positively helpful and it has aided me out loads.

    I hope to give a contribution & aid other users like its aided me.
    Great job.

    Here is my web page; nordvpn coupons inspiresensation (https://t.co/5gaT0Nh9CJ)

    1 月前 回复

BlessingCR’s Blog

公网部署时,数据泄露问题
如果你想要提供永久性的资源下载链接,就需要把Bucket(桶)的BP设置为Read&Write。 问题来了!!! 当你用 http://minio_out_url/bucket_path/ 访问时,会得到一个超大的XML …
扫描二维码继续阅读
2023-02-21