Skip to content
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

[Bug] PutObjectLegalHold and PutObjectRetention changes underlying S3 file #157

Closed
jchou886 opened this issue Jun 25, 2019 · 4 comments · Fixed by #792 or #797
Closed

[Bug] PutObjectLegalHold and PutObjectRetention changes underlying S3 file #157

jchou886 opened this issue Jun 25, 2019 · 4 comments · Fixed by #792 or #797
Assignees
Labels

Comments

@jchou886
Copy link

Calling PutObjectLegalHold and PutObjectRetention changes underlying S3 file for dockerized s3 mock.

Steps to reproduce:

  1. Put any object in S3.
  2. Call PutObjectRetention or PutObjectLegalHold on the object.
  3. The contents of the object changes to the xml of the object retention request or legal hold request.
@agudian
Copy link
Member

agudian commented Jun 25, 2019

I‘m very sure we haven’t implemented that, yet, and the requests are being treated as normal PUT requests...

Would you be open for contributing that feature?

@afranken afranken added the bug label Jan 27, 2022
@afranken
Copy link
Member

See #213
First, the S3Movk should not accept these requests, so that the local storage is not overwritten.

Then, a new handler method could be implemented that handles the requests mentioned here.
Then, several other handler methods that can modify / delete objects must respect the legal hold / object retention.

afranken added a commit that referenced this issue Sep 1, 2022
This is GET/PUT API-support *ONLY*.
S3Mock does not enforce the legal hold.

Fixes #157
@afranken afranken self-assigned this Sep 1, 2022
afranken added a commit that referenced this issue Sep 4, 2022
This is GET/PUT API-support *ONLY*.
S3Mock does not enforce the legal hold.

Fixes #157
afranken added a commit that referenced this issue Sep 5, 2022
This is needed to properly support Retention and LegalHold.

Fixes #157
afranken added a commit that referenced this issue Sep 5, 2022
This is needed to properly support Retention and LegalHold.
Use SDKv2 in cleanup, remove legal hold before delete.

Fixes #157
@afranken
Copy link
Member

afranken commented Sep 5, 2022

Half of this is implemented, Retention is next.

@afranken afranken reopened this Sep 5, 2022
afranken added a commit that referenced this issue Sep 6, 2022
S3Mock currently does not enforce retention.

Fixes #157
afranken added a commit that referenced this issue Sep 6, 2022
afranken added a commit that referenced this issue Sep 6, 2022
afranken added a commit that referenced this issue Sep 7, 2022
Still not 100% sure what's going on here...

Fixes #157
afranken added a commit that referenced this issue Sep 7, 2022
Use millis resolution for Instant in tests, test fails in CI.
S3Mock currently does not enforce retention.

Fixes #157
afranken added a commit that referenced this issue Sep 7, 2022
afranken added a commit that referenced this issue Sep 7, 2022
We have to exactly match the behaviour of the AWS SDKs here, it's easier
to just depend on their internal SDK classes instead of replicating or
copying the code.
Not sure if I may have violated their license before by including their
source code without explicitly stating that it's their copyrighted code.

Fixes #157
afranken added a commit that referenced this issue Sep 7, 2022
Ran IntegrationTests against S3, fixed responses and tests accordingly.

Fixes #157
afranken added a commit that referenced this issue Sep 7, 2022
We should always follow SemVer, which we did not do for previous
releases.

Fixes #157
@afranken
Copy link
Member

afranken commented Sep 7, 2022

Took longer than expected, but we can finally close this issue. :)

Just released 2.6.0 adding support to handle these requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants