[#528] Check owner ID before deleting bucket #528

Merged
alexvanin merged 1 commit from mbiryukova/frostfs-s3-gw:bugfix/delete_bucket_check_owner_id into master 2024-11-12 12:47:43 +00:00
Member

Signed-off-by: Marina Biryukova m.biryukova@yadro.com

Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
mbiryukova self-assigned this 2024-10-30 08:47:55 +00:00
mbiryukova added 1 commit 2024-10-30 08:47:55 +00:00
[#xxx] Check owner ID before deleting bucket
Some checks failed
/ DCO (pull_request) Failing after 1m25s
/ Vulncheck (pull_request) Successful in 2m2s
/ Builds (pull_request) Successful in 2m19s
/ Lint (pull_request) Successful in 3m1s
/ Tests (pull_request) Successful in 2m43s
2a31616577
Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
mbiryukova force-pushed bugfix/delete_bucket_check_owner_id from 2a31616577 to a76014e5cf 2024-10-30 08:48:20 +00:00 Compare
mbiryukova changed title from [#xxx] Check owner ID before deleting bucket to [#528] Check owner ID before deleting bucket 2024-10-30 08:48:35 +00:00
mbiryukova requested review from storage-services-committers 2024-10-30 08:56:24 +00:00
mbiryukova requested review from storage-services-developers 2024-10-30 08:56:25 +00:00
dkirillov reviewed 2024-10-30 11:31:53 +00:00
@ -244,6 +244,11 @@ func (h *handler) DeleteBucketHandler(w http.ResponseWriter, r *http.Request) {
return
}
if reqInfo.User != bktInfo.Owner.String() {
Member

We already have checkOwner function
Let's write something like:

	if err = checkOwner(bktInfo, reqInfo.User); err != nil {
		h.logAndSendError(w, "request owner id does not match bucket owner id", reqInfo, err)
		return
	}
We already have `checkOwner` function Let's write something like: ```golang if err = checkOwner(bktInfo, reqInfo.User); err != nil { h.logAndSendError(w, "request owner id does not match bucket owner id", reqInfo, err) return } ```
dkirillov marked this conversation as resolved
mbiryukova force-pushed bugfix/delete_bucket_check_owner_id from a76014e5cf to 07eab70d80 2024-10-30 11:48:31 +00:00 Compare
dkirillov approved these changes 2024-10-31 06:27:15 +00:00
nzinkevich approved these changes 2024-11-07 13:47:31 +00:00
alexvanin approved these changes 2024-11-12 12:47:25 +00:00
alexvanin added this to the v0.31.0 milestone 2024-11-12 12:47:38 +00:00
alexvanin merged commit 3260308cc0 into master 2024-11-12 12:47:43 +00:00
alexvanin deleted branch bugfix/delete_bucket_check_owner_id 2024-11-12 12:47:45 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-s3-gw#528
No description provided.