noobaa-core icon indicating copy to clipboard operation
noobaa-core copied to clipboard

NSFS | NC | Bucket owner & Principal of bucket policies should be ids and not email/name

Open romayalon opened this issue 1 year ago • 5 comments

Environment info

  • NooBaa Version: master
  • Platform: NC

Actual behavior

  1. Bucket policy principal identified by account name. An account with a specific name can be deleted. In the future someone can create a different account with the same specific name, and the bucket policy will refer to the new account. This might confuse or even cause a security issue.
  2. bucket_owner identified by account email, although the security issue from bullet 1 couldn't happen because we are blocking deletion of accounts that own buckets. This property should be considered as well to be deprecated and on some flows, we should use owner_account which is an id instead.

Expected behavior

  1. foreign keys between bucket and account should be random ids.

Steps to reproduce

Bucket policy issue -

  1. create an account, let's call it account1.
  2. create a bucket while specifying a bucket policy that allows account1 to run all s3 commands on this bucket.
  3. delete account1.
  4. create a new account having the same name.
  5. run s3 commands using the new account identified by the name account1 without access denial issues.

More information - Screenshots / Logs / Other output

romayalon avatar Jan 18 '24 10:01 romayalon

In NSFS NC - When someone is assigned to this issue, please also add a test for the scenario mentioned in #7797

shirady avatar Feb 06 '24 14:02 shirady

This issue had no activity for too long - it will now be labeled stale. Update it to prevent it from getting closed.

github-actions[bot] avatar Jun 09 '24 11:06 github-actions[bot]

Updating for stale bot, still not fixed. Will be addressed soon as part of the IAM effort.

romayalon avatar Jun 09 '24 13:06 romayalon