Skip to content

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

Closed
fabiancook wants to merge 1 commit into
nodeSolidServer:masterfrom
o-network:delete-resource-acl
Closed

fabiancook wants to merge 1 commit into
nodeSolidServer:masterfrom
o-network:delete-resource-acl

Conversation

@fabiancook

Copy link
Copy Markdown

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
Copy Markdown
Author

Fixes #1179

@fabiancook

Copy link
Copy Markdown
Author

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

@jaxoncreed jaxoncreed left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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

@fabiancook

Copy link
Copy Markdown
Author

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

@kjetilk

kjetilk commented May 9, 2019

Copy link
Copy Markdown
Member

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

@jaxoncreed

Copy link
Copy Markdown
Contributor

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

@fabiancook

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

See solid/solid-spec#157 as well

@jaxoncreed

Copy link
Copy Markdown
Contributor

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

@RubenVerborgh

RubenVerborgh commented Jun 18, 2019 •

Copy link
Copy Markdown
Contributor

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.

@RubenVerborgh RubenVerborgh left a comment

Copy link
Copy Markdown
Contributor

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

kjetilk commented Jun 19, 2019

Copy link
Copy Markdown
Member

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
Copy Markdown
Contributor

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

@RubenVerborgh

Copy link
Copy Markdown
Contributor

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

@kjetilk kjetilk left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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