cloudlena / s3manager

A Web GUI for your S3 buckets
Other
497 stars 94 forks source link

Workaround to List Additional Shared Buckets #51

Open Magnitus- opened 9 months ago

Magnitus- commented 9 months ago

I've encountered this issue with Ceph Rgw where it is possible for a user to have access to some buckets that they won't see listed:

https://serverfault.com/questions/1153389/setting-read-only-access-on-ceph-rgw-bucket-for-another-user-on-same-tenant-not

I've figured out this workaround which seems reasonable for small deployments with not too many shared buckets to manage: https://github.com/Magnitus-/s3manager/commit/b9ccec7bd55cb4ce14567208dc9a63b3775361d8

Basically, you create an object containing a list of additional buckets you've shared with the user and then you can remotely edit the bucket without having to redeploy the user's s3manager environment.

I've edited my fork to work with that use-case and while it could be fancier (support json, newline separated entries, a file on the fs in addition to an s3 object, integration in the tests, etc), it appears to be good enough for what I need at the moment.

If you are interested in integrating it into the upstream project after a few adjustments, let me know.

Magnitus- commented 9 months ago

fyi, added a couple more improvements to make it work for my use-case at home: