You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Containers should not list .acl and .meta files #385
.meta files should be hidden by the DataAccessors. If any of them still expose them that's a bug because they should already be doing that.
Since a DataAccessor is acl unware, hiding the acl files should be covered elsewhere, potentially in a separate store such as mentioned in #381 and #53 .
This is also related to #384 (comment) : since the DataAccessorBasedStore is acl-unaware (and should be), we need to delete the acl containment triples before the result gets to the response writer. This would be easier if they are only in the metadata at that point where they can easily be removed. If they are also already in the data stream we would also have to check that one.
Since a DataAccessor is acl unware, hiding the acl files should be covered elsewhere, potentially in a separate store
We could just have an extension ban list.
That said, while working on #494, I was a bit worried about ResourceUtil and generateContainmentQuads.
I wonder if we don't want to leave this to the DataAccessorBasedStore, such that it can also take care of the filtering. Otherwise, we'd have to re-implement that in every class, it seems.
That said, while working on #494, I was a bit worried about ResourceUtil and generateContainmentQuads.
I wonder if we don't want to leave this to the DataAccessorBasedStore, such that it can also take care of the filtering. Otherwise, we'd have to re-implement that in every class, it seems.
If we do move generateContainmentQuads to the DataAccessorBasedStore the DataAccessors still would have to return a list of members so that would not change that much I think.
We can have a banlist in the DataAccessorBasedStore while still handling the containment triples in the DataAccessors. It would just require filtering the metadata we get when requesting the metadata of a container.
If we do move generateContainmentQuads to the DataAccessorBasedStore the DataAccessors still would have to return a list of members so that would not change that much I think.
Yeah, but then DataAccessorBasedStore would be be responsible for filtering + creating containment triples.
We can have a banlist in the DataAccessorBasedStore while still handling the containment triples in the DataAccessors. It would just require filtering the metadata we get when requesting the metadata of a container.
I guess we could indeed also just filter the metadata triples. But perhaps we don't even need to generate the invalid ones.
Seeing as the containment triples are a triple per entry I don't see it as such an issue that they're being made in the DataAccessor. It also makes the interface easier since we're returning a metadata object anyway. Otherwise we would have the interface return 2 objects or have a separate function for returning members (the last would make everything a bit less efficient as another call would be needed for some backends).
Note that you don't see ldp:contains <.acl>. though. So these triples have been removed. The other ones you see are a consequence of the extra metadata that gets added by the FileDataAccessor so the solution will have to be updated to take that into account.
Some possible solutions based on the discussion above and the current state:
Have getMetadata return both metadata and a list of metadata objects for each child (undefined for document resources)
Change the DataAccessor interface to have a function getChildren, which returns the list of 1.
Provide an AuxiliaryStrategy to every DataAccessor to filter out children when calling getMetadata
The main difference between 1. and 2. is that 1. might be more efficient since everything happens in a single call but the interface of 2. is cleaner. On the other hand, 3. would prevent metadata being generated that would be filtered out anyway.
All this is under the assumption that we still want all the extra metadata that the FileDataAccessor provides.
So far I mostly prefer 2 because it looks the cleanest, but it is the least efficient one of them all. If we make the result of 2. streaming though it would be a first step in resolving #332 (although it would also require RepresentationMetadata to be streaming).
Activity
jvherweg commentedon Dec 4, 2020
.metafiles should be hidden by theDataAccessors. If any of them still expose them that's a bug because they should already be doing that.Since a
DataAccessoris acl unware, hiding the acl files should be covered elsewhere, potentially in a separate store such as mentioned in #381 and #53 .jvherweg commentedon Dec 7, 2020
This is also related to #384 (comment) : since the
DataAccessorBasedStoreis acl-unaware (and should be), we need to delete the acl containment triples before the result gets to the response writer. This would be easier if they are only in the metadata at that point where they can easily be removed. If they are also already in the data stream we would also have to check that one.RubenVerborgh commentedon Jan 11, 2021
We could just have an extension ban list.
That said, while working on #494, I was a bit worried about
ResourceUtilandgenerateContainmentQuads.I wonder if we don't want to leave this to the
DataAccessorBasedStore, such that it can also take care of the filtering. Otherwise, we'd have to re-implement that in every class, it seems.jvherweg commentedon Jan 13, 2021
If we do move
generateContainmentQuadsto theDataAccessorBasedStoretheDataAccessors still would have to return a list of members so that would not change that much I think.We can have a banlist in the
DataAccessorBasedStorewhile still handling the containment triples in theDataAccessors. It would just require filtering the metadata we get when requesting the metadata of a container.RubenVerborgh commentedon Jan 13, 2021
Yeah, but then
DataAccessorBasedStorewould be be responsible for filtering + creating containment triples.I guess we could indeed also just filter the metadata triples. But perhaps we don't even need to generate the invalid ones.
jvherweg commentedon Jan 13, 2021
Seeing as the containment triples are a triple per entry I don't see it as such an issue that they're being made in the
DataAccessor. It also makes the interface easier since we're returning a metadata object anyway. Otherwise we would have the interface return 2 objects or have a separate function for returning members (the last would make everything a bit less efficient as another call would be needed for some backends).RubenVerborgh commentedon Jan 13, 2021
Got it, agreed.
RubenVerborgh commentedon Jan 14, 2021
Also configurable perhaps to hide other kinds of files (like
.DS_Store,.git) or any dotfile altogether (.*).RubenVerborgh commentedon Mar 28, 2021
Running v0.8.0, I still see
.acl: https://css.verborgh.org/tmp/webdev/Do we need an integration test for this?
jvherweg commentedon Mar 28, 2021
Note that you don't see
ldp:contains <.acl>.though. So these triples have been removed. The other ones you see are a consequence of the extra metadata that gets added by the FileDataAccessor so the solution will have to be updated to take that into account.jvherweg commentedon Apr 8, 2021
Some possible solutions based on the discussion above and the current state:
getMetadatareturn both metadata and a list of metadata objects for each child (undefined for document resources)DataAccessorinterface to have a functiongetChildren, which returns the list of 1.AuxiliaryStrategyto everyDataAccessorto filter out children when callinggetMetadataThe main difference between 1. and 2. is that 1. might be more efficient since everything happens in a single call but the interface of 2. is cleaner. On the other hand, 3. would prevent metadata being generated that would be filtered out anyway.
All this is under the assumption that we still want all the extra metadata that the
FileDataAccessorprovides.So far I mostly prefer 2 because it looks the cleanest, but it is the least efficient one of them all. If we make the result of 2. streaming though it would be a first step in resolving #332 (although it would also require
RepresentationMetadatato be streaming).RubenVerborgh commentedon Apr 20, 2021
I'm fine with 2 here if cleanest indeed.