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

Behavior for other SPARQL Update operations #323

Open
wants to merge 2 commits into
base: feature/sparql-update
Choose a base branch
from

Conversation

kjetilk
Copy link
Member

@kjetilk kjetilk commented Oct 15, 2021

As noted in #125, SPARQL Update contains several operations beyond DELETE and INSERT. It has been an open question what to do with them. Since they are not currently supported and thus falls outside of the supported subset, I suggest we simply disallow them on a SHOULD level.

I think we should review this soon with respect to COPY and MOVE in light of #19 , but I think this is the most straightforward way to address it right now.

I made this a separate PR to not tie up #320, but I hope we can get it in for completeness.

@@ -709,7 +709,7 @@ <h3 property="schema:name">Writing Resources</h3>
<span about="" id="server-patch-sparql-all" rel="spec:requirement" resource="#server-patch-sparql-all"><span property="spec:statement"> <span rel="spec:requirementSubject" resource="spec:Server">Servers</span> <span rel="spec:requirementLevel" resource="spec:MAY">MAY</span> further support SPARQL 1.1 Update [<cite><a class="bibref" href="#bib-sparql-overview">SPARQL</a></cite>],</span></span>
<span about="" id="server-patch-sparql-not-other" rel="spec:requirement" resource="#server-patch-sparql-not-other"><span property="spec:statement"> except that <span rel="spec:requirementSubject" resource="spec:Server">servers</span> <span rel="spec:requirementLevel" resource="spec:MUSTNOT">MUST NOT</span> allow a request with a <code>PATCH</code> method to change other resources than the target resource.</span></span> [<a href="https://github.com/solid/specification/issues/125#issuecomment-873035679" rel="cito:citesAsSourceDocument">Source</a>]
<span about="" id="server-patch-sparql-outside-subset" rel="spec:requirement" resource="#server-patch-sparql-outside-subset"><span property="spec:statement"><span rel="spec:requirementSubject" resource="spec:Server">Servers</span> that receives a request body containing a SPARQL query that falls outside of the subset they are able to process <span rel="spec:requirementLevel" resource="spec:MUST">MUST</span> respond with a <code>422</code> status code [<cite><a class="bibref" href="#bib-rfc4918">RFC4918</a></cite>] and a message body that explains the error.</span></span>

<span about="" id="server-patch-sparql-not-update" rel="spec:requirement" resource="#server-patch-sparql-not-update"><span property="spec:statement">SPARQL Update [<cite><a class="bibref" href="#bib-sparql-overview">SPARQL</a></cite>] also defines operations <code>LOAD</code>, <code>CLEAR</code>, <code>CREATE</code>, <code>DROP</code>, <code>COPY</code>, <code>MOVE</code> and <code>ADD</code>. <span rel="spec:requirementSubject" resource="spec:Server">Servers</span> that receives a <code>PATCH</code> request body containing these operations <span rel="spec:requirementLevel" resource="spec:SHOULD">SHOULD</span> respond with a <code>422</code> status code [<cite><a class="bibref" href="#bib-rfc4918">RFC4918</a></cite>] and a message body that explains the error, or MUST ensure that any access control measures apply.</span></span>
Copy link
Member

Choose a reason for hiding this comment

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

or MUST ensure that any access control measures apply.

The 'or' there is slightly confusing -- shouldn't that be an 'and'?

Copy link
Member

@dmitrizagidulin dmitrizagidulin left a comment

Choose a reason for hiding this comment

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

👍

@@ -709,7 +709,7 @@ <h3 property="schema:name">Writing Resources</h3>
<span about="" id="server-patch-sparql-all" rel="spec:requirement" resource="#server-patch-sparql-all"><span property="spec:statement"> <span rel="spec:requirementSubject" resource="spec:Server">Servers</span> <span rel="spec:requirementLevel" resource="spec:MAY">MAY</span> further support SPARQL 1.1 Update [<cite><a class="bibref" href="#bib-sparql-overview">SPARQL</a></cite>],</span></span>
<span about="" id="server-patch-sparql-not-other" rel="spec:requirement" resource="#server-patch-sparql-not-other"><span property="spec:statement"> except that <span rel="spec:requirementSubject" resource="spec:Server">servers</span> <span rel="spec:requirementLevel" resource="spec:MUSTNOT">MUST NOT</span> allow a request with a <code>PATCH</code> method to change other resources than the target resource.</span></span> [<a href="https://github.com/solid/specification/issues/125#issuecomment-873035679" rel="cito:citesAsSourceDocument">Source</a>]
<span about="" id="server-patch-sparql-outside-subset" rel="spec:requirement" resource="#server-patch-sparql-outside-subset"><span property="spec:statement"><span rel="spec:requirementSubject" resource="spec:Server">Servers</span> that receives a request body containing a SPARQL query that falls outside of the subset they are able to process <span rel="spec:requirementLevel" resource="spec:MUST">MUST</span> respond with a <code>422</code> status code [<cite><a class="bibref" href="#bib-rfc4918">RFC4918</a></cite>] and a message body that explains the error.</span></span>

<span about="" id="server-patch-sparql-not-update" rel="spec:requirement" resource="#server-patch-sparql-not-update"><span property="spec:statement">SPARQL Update [<cite><a class="bibref" href="#bib-sparql-overview">SPARQL</a></cite>] also defines operations <code>LOAD</code>, <code>CLEAR</code>, <code>CREATE</code>, <code>DROP</code>, <code>COPY</code>, <code>MOVE</code> and <code>ADD</code>. <span rel="spec:requirementSubject" resource="spec:Server">Servers</span> that receives a <code>PATCH</code> request body containing these operations <span rel="spec:requirementLevel" resource="spec:SHOULD">SHOULD</span> respond with a <code>422</code> status code [<cite><a class="bibref" href="#bib-rfc4918">RFC4918</a></cite>] and a message body that explains the error, or MUST ensure that any access control measures apply.</span></span>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<span about="" id="server-patch-sparql-not-update" rel="spec:requirement" resource="#server-patch-sparql-not-update"><span property="spec:statement">SPARQL Update [<cite><a class="bibref" href="#bib-sparql-overview">SPARQL</a></cite>] also defines operations <code>LOAD</code>, <code>CLEAR</code>, <code>CREATE</code>, <code>DROP</code>, <code>COPY</code>, <code>MOVE</code> and <code>ADD</code>. <span rel="spec:requirementSubject" resource="spec:Server">Servers</span> that receives a <code>PATCH</code> request body containing these operations <span rel="spec:requirementLevel" resource="spec:SHOULD">SHOULD</span> respond with a <code>422</code> status code [<cite><a class="bibref" href="#bib-rfc4918">RFC4918</a></cite>] and a message body that explains the error, or MUST ensure that any access control measures apply.</span></span>
<span about="" id="server-patch-sparql-not-update" rel="spec:requirement" resource="#server-patch-sparql-not-update"><span property="spec:statement">SPARQL Update [<cite><a class="bibref" href="#bib-sparql-overview">SPARQL</a></cite>] also defines operations <code>LOAD</code>, <code>CLEAR</code>, <code>CREATE</code>, <code>DROP</code>, <code>COPY</code>, <code>MOVE</code> and <code>ADD</code>. <span rel="spec:requirementSubject" resource="spec:Server">Servers</span> that receives a <code>PATCH</code> request body containing these operations (1) <span rel="spec:requirementLevel" resource="spec:SHOULD">SHOULD</span> respond with a <code>422</code> status code [<cite><a class="bibref" href="#bib-rfc4918">RFC4918</a></cite>] and a message body that explains the error, and (2) MUST ensure that any access control measures apply.</span></span>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Drafting Phase
Development

Successfully merging this pull request may close these issues.

4 participants