nodeSolidServer/node-solid-server

PATCH do not allow to create new file with APPEND

bourgeoa opened this issue · 4 comments

SolidOS chat cannot give WRITE authorisation to authorized members
The authorization is limited to APPEND to avoid any deletion of triples
The problem is that APPEND is not enough to create new year/day/folder/chat.ttl NSS requests WRITE

CSS allow creation of a new resource with APPEND

@csarven Is it a NSS or solid PATCH specification issue ? Is it the same with POST/PUT ?

Based on solid/specification#14 (comment) (originally written for application/sparql-update but holds true for text/n3) for both PATCH C/R and PUT C/R:

Create requires Append (or Write) on C/ and Write on C/R.

Does this (^^) mean that Append is sufficient to create a container but Write is required to create a resource?

No, it applies to all contained resources, including containers. It is a manifestation of URI allocation and who gets to write (create/delete) to a specific space based on HTTP request semantics. https://solidproject.org/ED/protocol#uri-allocation summarises this.

We are trying to resolve impersonation with APPEND to forbid manual replacement or delete of content and this is needed even if you can sign messages.

The practical implication of the actual situation is that APPEND cannot be used to create a new resource.
You can only APPEND to a previous existing resource.

The consequence is for example that on a chat where someone has an APPEND only, you cannot add

  • files like images or other files
  • you cannot create the default file structure on a new day y/m/d/chat.ttl

I think we need the possibility to create if not exist with APPEND
This for me is also linked to the fact that WRITE/DELETE are linked together in WAC