F64116045 opened a new pull request, #10980:
URL: https://github.com/apache/ozone/pull/10980

   ## What changes were proposed in this pull request?
   
   S3 Gateway previously rejected lifecycle rules only when `Status` was 
missing or empty. Every other value was converted with 
`"Enabled".equals(status)`, so unsupported values such as `enabled`, 
`disabled`, and `invalid` were silently stored as disabled rules.
   
   This change validates `Status` against the exact Amazon S3 values `Enabled` 
and `Disabled`. Unsupported values now return HTTP 400 with the S3 error code 
`MalformedXML`.
   
   Parameterized tests cover lowercase and arbitrary invalid values, and the 
valid-path test now explicitly covers `Disabled`.
   
   The new validation uses the standard `MALFORMED_XML` response. The adjacent 
missing-status response predates this change and is intentionally left 
unchanged to keep this patch focused on unsupported non-empty values.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-16115
   
   ## How was this patch tested?
   
   - `TestS3LifecycleConfigurationPut`: 15 tests passed.
   - Full `hadoop-ozone/s3gateway` module: 727 tests passed.
   - Packaged Ozone cluster: 
`s3tests/functional/test_s3.py::test_lifecycle_invalid_status` passed.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to