Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sesame SPARQL endpoint read-only

How can I prevent my OpenRDF Sesame 2.6.5 RDF storage from the modification(INSERT/DELETE) via SPARQL endpoint?

'Select' queries will be done via POST requests.

Forbid(via Apache Tomcat config. files for Sesame's WARs) the following SPARQL HTTP endpoint URLs:

http:/localhost:8080/openrdf-sesame/repositories/test/update...

and

http:/localhost:8080/openrdf-workbench/repositories/test/update... ?

like image 723
GML-VS Avatar asked May 22 '12 14:05

GML-VS


1 Answers

You can control this kind of thing using basic HTTP authentication. See this article for a step-by-step tutorial on how to configure this in Tomcat.

The trick is to make sure that only certain authenticated users have write access to the repository. In terms of HTTP authentication that means you want to restrict access to all POST, PUT and DELETE requests on any URL patterns that correspond to modifications in the Sesame REST protocol.

SPARQL Update operations are executed as POST requests against the repositories/<REPID>/statements URL, so you will have restrict access on that pattern. In addition you will probably also want to restrict access to Graph Store protocol operations (repositories/<REPID>/rdf-graphs/*).

like image 76
Jeen Broekstra Avatar answered Oct 11 '22 13:10

Jeen Broekstra