Chung-En Lee created HDDS-17703:
-----------------------------------
Summary: PutBucketLifecycleConfiguration saves a Tag filter
without Key or Value as an empty filter that matches every key
Key: HDDS-17703
URL: https://issues.apache.org/jira/browse/HDDS-17703
Project: Apache Ozone
Issue Type: Sub-task
Components: S3
Reporter: Chung-En Lee
A lifecycle rule whose {{Tag}} filter has no {{Value}}, or no {{Key}}, is saved
with an empty filter, so the rule applies to every key in the bucket. AWS S3
rejects such a body with 400 MalformedXML.
Steps to reproduce:
# Send PutBucketLifecycleConfiguration with this rule:
{{<Rule><ID>r1</ID><Filter><Tag><Key>a</Key></Tag></Filter><Status>Enabled</Status><Expiration><Days>1</Days></Expiration></Rule>}}
# Send GetBucketLifecycleConfiguration.
Actual: Step 1 returns 200. Step 2 returns the rule with {{<Filter/>}}. With
{{ozone.lifecycle.service.enabled=true}}, KeyLifecycleService expires keys that
don't have tag {{a}} (tested in {{TestKeyLifecycleService}}, OBS and FSO
buckets).
Expected: Step 1 returns 400 MalformedXML and nothing is saved, as on AWS S3.
The same {{Tag}} inside {{<And>}} returns 500 instead, with a
NullPointerException in the S3 Gateway log. AWS S3 returns 400 MalformedXML for
that body too.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]