Skip to content

SHACL-SPARQL dataset definition #676

@afs

Description

@afs

It isn't defined in SHACL-SPARQL as to the graphs available int the dataset for the query. This leads to security risks of unauthorized access to local data.

A SHACL engine may not be executing with the same permissions as the user making the request.

SPARQL's FROM and FROM NAMED describe the dataset to be queried by giving some URIs.

There is no fixed required way to use the URIs to identify graphs. One common way is to choose named graphs from the dataset.
However, downloading graphs over HTTP is also a valid way to obtain graphs. The latter is away to leak information because the SHACL engine may not be executing with different permissions to the user making the request. SHACL engines do not typically have multi-tenant isolation.

Implicitly, the dataset for SPARQL queries is the one with the only graph being the default graph; no named graphs.
But the text does not forbid, or warn about, the dataset having other graphs accessible via GRAPH.

  • FROM and FROM NAMED should be forbidden.
  • The dataset for SPARQL execution should be defined as a single graph dataset.

Alternatively, the security section needs to have warnings. Delegating to the SPARQL security section is not enough because SHACL-SPARQL makes a restricted use of SPARQL.

Metadata

Metadata

Labels

SPARQLFor SHACL 1.2 SPARQL extensions spec

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions