简体   繁体   English

如何限制公共用户访问 s3 存储桶或 minIO?

[英]How to restrict public user access to s3 buckets or minIO?

I have got a question about minio or s3 policy.我有一个关于 minio 或 s3 政策的问题。 I am using a stand-alone minio server for my project.我正在为我的项目使用独立的 minio 服务器。 Here is the situation :这是情况:

  • There is only one admin account that receives files and uploads them to minio server.只有一个管理员帐户接收文件并将它们上传到 minio 服务器。
  • My Users need to access just their own uploaded objects.我的用户只需要访问他们自己上传的对象。 I mean another user is not supposed to see other people's object publicly (eg by visiting direct link in URL).我的意思是另一个用户不应该公开看到其他人的对象(例如通过访问 URL 中的直接链接)。
  • Admin users are allowed to see all objects in any circumstances.管理员用户可以在任何情况下查看所有对象。

1. How can i implement such policies for my project considering i have got my database for user authentication and how can i combine them to authenticate the user. 1. 考虑到我已经获得了用于用户身份验证的数据库,以及如何将它们结合起来对用户进行身份验证,我该如何为我的项目实施此类策略。

2. If not what other options do i have here to ease the process ? 2. 如果不是,我还有什么其他选择可以简化这个过程?

Communicate with your storage through the application.通过应用程序与您的存储通信。 Do policy checks, authentication or authorization in the app and store/grab files to/from storage and make the proper response.在应用程序中进行策略检查、身份验证或授权,并将文件存储到/从存储中获取并做出适当的响应。 I guess this is the only way you can have limitation on uploading/downloading files using Minio.我想这是您可以限制使用 Minio 上传/下载文件的唯一方法。 If you're using a framework like Laravel built in S3 driver works perfectly with Minio;如果你使用的是像Laravel这样的框架,内置 S3 驱动程序可以与Laravel完美配合; Otherwise it's just matter of a HTTP call.否则,这只是 HTTP 调用的问题。 Minio provides HTTP APIs. Minio 提供 HTTP API。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM