Huang Kuan Hao created HDDS-16650:
-------------------------------------
Summary: Reuse bucket metadata after owner verification in S3
DeleteBucketLifecycle
Key: HDDS-16650
URL: https://issues.apache.org/jira/browse/HDDS-16650
Project: Apache Ozone
Issue Type: Sub-task
Reporter: Huang Kuan Hao
Assignee: Huang Kuan Hao
When a request includes a non-empty x-amz-expected-bucket-owner header,
BucketLifecycleHandler retrieves the bucket to verify its owner. After
verification succeeds, deleteLifecycleConfiguration retrieves the same bucket
again before deleting the lifecycle configuration. Reuse the OzoneBucket
obtained during owner verification to perform the deletion. Retain the existing
lookup when the header is absent or empty. This saves one bucket metadata
lookup for requests that pass expected-owner verification, while preserving the
existing bucket READ requirement, owner validation, OM authorization, and error
translation.
Regression tests should verify:
* One bucket metadata lookup with absent, empty, or matching expected-owner
headers.
* Owner mismatch and lookup failures still prevent deletion with the existing
error responses.
* Successful deletion and deletion of a missing lifecycle configuration still
return HTTP 204.
* Other OM errors retain their existing translation.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]