-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
S3: add validation around Retention Mode & consider COMPLIANCE when updating #12782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
S3 Image Test Results (AMD64 / ARM64) 2 files 2 suites 8m 56s ⏱️ Results for commit efcaf8a. |
Test Results - Alternative Providers988 tests 621 ✅ 33m 50s ⏱️ Results for commit efcaf8a. |
Test Results (amd64) - Integration, Bootstrap 5 files 5 suites 1h 25m 13s ⏱️ Results for commit efcaf8a. |
LocalStack Community integration with Pro 2 files ± 0 2 suites ±0 1h 3m 53s ⏱️ - 39m 32s Results for commit efcaf8a. ± Comparison against base commit 6348947. This pull request removes 2666 and adds 2 tests. Note that renamed tests count towards both.
|
Motivation
We got a report from a user that setting the Object Lock Mode to
COMPLIANCE
did not work. This ended up being a user misunderstanding about the behavior of Versioned buckets adding delete markers on top of versions, same as this post: https://repost.aws/questions/QUyamFMI7QQy2zmIkF_0IxwQ/s3-object-lock-in-compliance-mode-file-uploaded-thru-cli-file-properties-shows-compliance-mode-i-can-still-delete-itHowever, while looking at the issue, I realized we didn't consider the
COMPLIANCE
value when trying to reduce or remove the effective locking on the object viaPutObjectRetention
, which this PR fixes.I've also added validation around the
Mode
valueI've also added validation for the Lock Mode in operation where it is possible to pass it, like
PutObject
andCreateMultipartUpload
.Also added validation around behavior with missing values around object lock, which was wrong.
Changes
Mode
validation and add that validation in the providerCOMPLIANCE
value when trying to override existing object retention configurationPutObjectRetention