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

NSFS | Versioning | Delete of partial directory of nested key results in AccessDeniedError #8480

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

naveenpaul1
Copy link
Contributor

@naveenpaul1 naveenpaul1 commented Oct 25, 2024

Explain the changes

  1. Version bucket does not support dir versioning, Deleting dir key(a/b/c/) just deletes the .folder file and does not create delete_marker.
  2. If the bucket has key a/b/c/test.txt and then tries to delete key a/b/c code will throw AccessDenied error.

Issues: Fixed #xxx / Gap #xxx

  1. NC | NSFS | Versioning | Delete of partial directory of nested key results in AccessDeniedError #8454

Testing Instructions:

  1. Please check the issue
  • Doc added/updated
  • Tests added

@naveenpaul1 naveenpaul1 force-pushed the delete_partial_dir branch 2 times, most recently from 53771ce to 416f4d5 Compare October 28, 2024 06:23
Copy link
Contributor

@shirady shirady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added minor comments

src/test/unit_tests/test_namespace_fs.js Outdated Show resolved Hide resolved
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
@shirady
Copy link
Contributor

shirady commented Oct 30, 2024

@naveenpaul1 could you add the test in file src/test/unit_tests/test_bucketspace_versioning.js?
I found this issue while I worked on PR #8453

@naveenpaul1 naveenpaul1 force-pushed the delete_partial_dir branch 2 times, most recently from 0c93d80 to 9b76008 Compare November 4, 2024 07:22
Copy link
Contributor

@shirady shirady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
added 2 minor comments

src/test/unit_tests/test_namespace_fs.js Outdated Show resolved Hide resolved
src/test/unit_tests/test_namespace_fs.js Outdated Show resolved Hide resolved
Copy link
Contributor

@romayalon romayalon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to request changes because the original issue seems incorrect to me, can you please check that throwing AccessDenied is also not thrown by AWS in the specified reproduction steps?

@naveenpaul1
Copy link
Contributor Author

@romayalon added the AWS same behaviour finding in issue , For AWS aslo partial dir key is creating delete_marker for object.
cc: @shirady

@romayalon
Copy link
Contributor

@naveenpaul1 thanks for checking it,
can you run get_object before deleting the object?
my assumption is that you would receive ENOENT, because there is no such object called a/b/c.. later please check on NooBaa if this is still the behavior with the code of this PR
When deleting an object when versioning is enabled, AWS don't care if the object exists or not, they just create a delete marker.

@naveenpaul1
Copy link
Contributor Author

@romayalon updated the get-object behavior in issue please check

src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
src/sdk/namespace_fs.js Outdated Show resolved Hide resolved
@naveenpaul1 naveenpaul1 merged commit aaeeb19 into noobaa:master Nov 14, 2024
10 checks passed
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 this pull request may close these issues.

NC | NSFS | Versioning | Delete of partial directory of nested key results in AccessDeniedError
3 participants