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

put-object-legal-hold doesnt prevent objects from deletion #985

Closed
evgeniiz321 opened this issue Aug 26, 2024 · 0 comments · Fixed by #992
Closed

put-object-legal-hold doesnt prevent objects from deletion #985

evgeniiz321 opened this issue Aug 26, 2024 · 0 comments · Fixed by #992
Assignees
Labels
bug Something isn't working I4 No visible changes S4 Routine U2 Seriously planned
Milestone

Comments

@evgeniiz321
Copy link

https://rest.fs.neo.org/7ZVSQHtioVRiDT2btN9xEmQhczXV9vryCEAHUawfD8Sc/313-1724158569/index.html#suites/34fa305dfbd9d53c261e56a092bdadf8/a07a585c13b79fc/ (tests.services.s3_gate.test_s3_locking.TestS3GateLocking#test_s3_object_locking)

  1. Put object legal hold:
COMMAND: 'aws --no-verify-ssl --no-paginate s3api  put-object-legal-hold --bucket 653b1205-3123-437e-8240-eaa2c151ae36 --key temp_file_e4366a49-09f6-4c65-b34a-fb8387d712a1  --version-id CWKh13SnrR7WajDnjqMSuiyDg3AY3oJnN7Q9gjnZZGLY --legal-hold '{"Status": "ON"}' --endpoint https://localhost:58973'
OUTPUT:
 urllib3/connectionpool.py:1063: InsecureRequestWarning: Unverified HTTPS request is being made to host 'localhost'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings

RC: 0
Start / End / Elapsed	 12:28:21.174949 / 12:28:21.823612 / 0:00:00.648663
  1. Verify that hold is set:
COMMAND: 'aws --no-verify-ssl --no-paginate s3api get-object --bucket 653b1205-3123-437e-8240-eaa2c151ae36 --key temp_file_e4366a49-09f6-4c65-b34a-fb8387d712a1  /home/runner/work/neofs-s3-gw/neofs-s3-gw/neofs-testcases/TemporaryDir/9bfbd178-1439-451e-9533-31b82b880156 --endpoint https://localhost:58973'
OUTPUT:
 urllib3/connectionpool.py:1063: InsecureRequestWarning: Unverified HTTPS request is being made to host 'localhost'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
{
    "LastModified": "2024-08-20T12:28:19+00:00",
    "ContentLength": 1000,
    "ETag": "86fb9e04bb97a149608c72762257d15eb08b4e3a8079d717c4097045391801ea",
    "VersionId": "CWKh13SnrR7WajDnjqMSuiyDg3AY3oJnN7Q9gjnZZGLY",
    "ContentType": "application/octet-stream",
    "Metadata": {},
    "TagCount": 0,
    "ObjectLockMode": "COMPLIANCE",
    "ObjectLockRetainUntilDate": "2024-08-20T12:30:19+00:00",
    "ObjectLockLegalHoldStatus": "ON"
}

RC: 0
  1. Try to remove object, test expects failure, but we get success:
COMMAND: 'aws --no-verify-ssl --no-paginate s3api delete-object --bucket 653b1205-3123-437e-8240-eaa2c151ae36 --key temp_file_e4366a49-09f6-4c65-b34a-fb8387d712a1  --version-id CWKh13SnrR7WajDnjqMSuiyDg3AY3oJnN7Q9gjnZZGLY --endpoint https://localhost:58973'
OUTPUT:
 urllib3/connectionpool.py:1063: InsecureRequestWarning: Unverified HTTPS request is being made to host 'localhost'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
{
    "VersionId": "CWKh13SnrR7WajDnjqMSuiyDg3AY3oJnN7Q9gjnZZGLY"
}

RC: 0
Start / End / Elapsed	 12:28:22.448835 / 12:28:23.069923 / 0:00:00.621088

Logs are available in the allure report.

Expected Behavior

Object shouldn't be deleted if it has a legal hold

@evgeniiz321 evgeniiz321 added bug Something isn't working U2 Seriously planned labels Aug 26, 2024
@roman-khimov roman-khimov added this to the v0.31.1 milestone Aug 27, 2024
@roman-khimov roman-khimov added S4 Routine I4 No visible changes labels Aug 27, 2024
@smallhive smallhive self-assigned this Aug 28, 2024
roman-khimov added a commit that referenced this issue Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working I4 No visible changes S4 Routine U2 Seriously planned
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants