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

Delete .acl file for resource when resource is deleted #1180

Closed

Conversation

fabiancook
Copy link

Delete .acl file for resource when resource is deleted, also ignore any acl or meta files in directory when deleting.

I had troubles with some TLS not passing, locally I skipped them. I also had issues with the quota tests, its like the signature of ldp changed at some point, so I redid the test so it tests correctly.

@fabiancook
Copy link
Author

Fixes #1179

@fabiancook
Copy link
Author

I'll rebase in & re-push once the other failing tests are corrected.

Copy link
Contributor

@jaxoncreed jaxoncreed left a comment

Choose a reason for hiding this comment

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

LGTM :shipit:

@jaxoncreed
Copy link
Contributor

@fabiancook There seems to be a problem with quotas causing the test to fail. Would you mind looking at that?

@fabiancook
Copy link
Author

The quota tests look like they've never worked, I don't have the bandwidth to debug those errors at this time.

@kjetilk
Copy link
Member

kjetilk commented May 9, 2019

I think they did work. But I'm unsure why this should need to touch those?

@jaxoncreed
Copy link
Contributor

Yeah. I checked yesterday. The current master has 100% passing tests.

@fabiancook
Copy link
Author

Perfect, I'll rebase to current master

@fabiancook fabiancook force-pushed the delete-resource-acl branch from f9a7114 to ade5686 Compare May 23, 2019 11:28
@fabiancook
Copy link
Author

Can someone help me with the quota issue? A pointer would be helpful.

The original quota tests never would have run, either, which is why I added a new one.

@fabiancook fabiancook force-pushed the delete-resource-acl branch 2 times, most recently from 0c0a0c5 to 994b827 Compare May 24, 2019 05:32
…ny acl or meta files in directory when deleting
@fabiancook fabiancook force-pushed the delete-resource-acl branch from 994b827 to 4e268e3 Compare May 25, 2019 02:56
@fabiancook
Copy link
Author

The only thing I'm wondering now is if I should change this line here so only acl files are checked for, where meta files are only ignored if it is the containers meta file:

4e268e3#diff-4b9b8e50857ade6dd5db969387fe5f20R415

This would depend on this issue: solid/solid-spec#172

@RubenVerborgh
Copy link
Contributor

See solid/solid-spec#157 as well

@jaxoncreed
Copy link
Contributor

So I think we're good to go to merge this then.

@RubenVerborgh
Copy link
Contributor

RubenVerborgh commented Jun 18, 2019

So I think we're good to go to merge this then.

I'm not sure, do we have consensus that this is the desired behavior?
There are security consequences when this happens.

Also, given that we're considering https://github.com/solid/solid-spec/issues/190, there are other means of discovering and deleting the ACL file.

Copy link
Contributor

@RubenVerborgh RubenVerborgh left a comment

Choose a reason for hiding this comment

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

Two major concerns:

a) the requesting agent is not checked for Control permissions on the resource
b) if, for whatever reason, delete for the ACL succeeds but the delete for the file does not, we have effectively erased the file's permissions. We very likely want to proceed in sequence and first delete the file, then its ACL.

@kjetilk
Copy link
Member

kjetilk commented Jun 19, 2019

Technically, it looks good to me, but I think we don't yet have consensus on whether this is what we want.

@jaxoncreed
Copy link
Contributor

It sounds like @RubenVerborgh 's two suggestions should be fixed first.

@RubenVerborgh
Copy link
Contributor

Also need to consider security, in https://github.com/solid/solid-spec/issues/196

Copy link
Member

@kjetilk kjetilk left a comment

Choose a reason for hiding this comment

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

In isolation it seems this patch is OK, as there is rough consensus that the permissions on the resource is what is relevant when deleting both the ACL and the resource. solid/specification#145

Apart from @RubenVerborgh 's concern 2) above, it would be nice to make the operation atomic.

Then, my other concern is the method name, because deleting just the ACL, when it happens not as a side-effect of the resource deletion, then it requires Control, and that should be clear from the code too, so that others do not by accident call deleteResourceAcl independently.

@michielbdejong
Copy link
Member

Continued in #1415.

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

Successfully merging this pull request may close these issues.

5 participants