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

PATCH do not allow to create new file with APPEND #1731

Closed
bourgeoa opened this issue Jun 1, 2023 · 4 comments · Fixed by #1745
Closed

PATCH do not allow to create new file with APPEND #1731

bourgeoa opened this issue Jun 1, 2023 · 4 comments · Fixed by #1745
Assignees
Labels

Comments

@bourgeoa
Copy link
Member

bourgeoa commented Jun 1, 2023

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 ?

@bourgeoa bourgeoa self-assigned this Jun 1, 2023
@csarven
Copy link
Member

csarven commented Jun 6, 2023

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.

@jeff-zucker
Copy link
Member

jeff-zucker commented Jun 6, 2023

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

@csarven
Copy link
Member

csarven commented Jun 7, 2023

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.

@bourgeoa
Copy link
Member Author

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

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 a pull request may close this issue.

3 participants