openlink / virtuoso-opensource

Virtuoso is a high-performance and scalable Multi-Model RDBMS, Data Integration Middleware, Linked Data Deployment, and HTTP Application Server Platform
https://vos.openlinksw.com
Other
867 stars 210 forks source link

Trouble sponging graph in SPARQL endpoint: RDF_SPONGE_UP_1 permission #1180

Closed malajvan closed 12 months ago

malajvan commented 1 year ago

Hello, I'm trying to sponge through the SPARQL query example from the documentation here

SPARQL
SELECT ?id 
FROM NAMED <http://www.openlinksw.com/dataspace/kidehen@openlinksw.com/weblog/kidehen@openlinksw.com%27s%20BLOG%20%5B127%5D/sioc.ttl>
 OPTION (get:soft "soft", get:method "GET")
WHERE { GRAPH ?g { ?id a ?o } }
LIMIT 10; 

However I don't understand why even though it works in iSQL (http://localhost:8890/conductor/isql.vspx), it throws permission error at http://localhost:8890/sparql/ : Virtuoso RDFZZ Error The graph is not sponged by RDF_SPONGE_UP_1 due to lack of sponge permission for user 107

I followed the instructions and gave SPARQL_SPONGE and SPARQL_UPDATE permissions to user 107 (SPARQL), and even manually granted access for RDF_SPONGE_UP_1.

Did I misunderstand somewhere? I would appreciate any suggestions on how I can move forward. Thank you very much!

HughWilliams commented 1 year ago

With recent Virtuoso releases, to perform SPARQL operations as an existing or new user, low level RDF Graph Security permissions need to be set, to determine what access (read/write/sponge) the user has on the RDF Quad Store. This is done using the DB.DBA.RDF_DEFAULT_USER_PERMS_SET() function, in addition to the high level SQL roles (SPARQL_SELECT, SPARQL_UPDATE, SPARQL_SPONGE). Thus, try running the following to resolve the problem:

DB.DBA.RDF_DEFAULT_USER_PERMS_SET ('SPARQL', 7);
malajvan commented 12 months ago

Thank you very much! This fixed it.