1

I need to use a protected endpoint to formulate a federated query in SPARQL like:

select ?s ?p ?o
{
 SERVICE <https://mysqparlendpoint/sparql/> {
   select ?s ?p ?o {
      ?s ?p ?o
   } limit 10
 }
}

Unfortunately in the SERVICE spec there is no hint how to do that. https://mysqparlendpoint/sparql is supposed to be a blazegraph on a tomcat, whose access is Basic secured.

How can I formulate this SPARQL query accessing the endpoint using credentials to open it?

Thanks a lot in advance!

Stanislav Kralin
  • 11,070
  • 4
  • 35
  • 58
Fabio Ricci
  • 89
  • 1
  • 9
  • 1. Is `` not working? 2. Which triplestore are you using? – Stanislav Kralin Dec 09 '18 at 11:06
  • If your local endpoint is Blazegraph too, then see https://jira.blazegraph.com/browse/BLZG-1966 – Stanislav Kralin Dec 09 '18 at 12:23
  • Thank you so much for answering, it is a blazegraph. The issue is from 2016 ... and, yes using "https://demo:demo@ch.semweb.ch:10000/S2Mapi/thesaurus/ASSEMBLY/sparql/q=select%20*%20%7B%3Fs%20%3Fp%20%3Fo%7D%20limit%203&format=xml" seems to deliver results. However: Inside a blazegraph console, a federated query using https://demo:demo@ch.semweb.ch:10000/S2Mapi/thesaurus/ASSEMBLY/sparql/ as a SPARQL Endpoint URL delivers again a 401 ... – Fabio Ricci Dec 11 '18 at 09:16
  • The problem was issuing that query inside a Blazegraph console. E.G. in http://factforge.net/sparql (GraphDB) it runs smoothly. – Fabio Ricci Dec 11 '18 at 14:03

1 Answers1

0

SPARQL 1.1 Federation does not specify any way to authenticate.

Vendor-specific solutions:

  • Blazegraph allows the usual notation user:password@server:port as explained above
  • Ontotext GraphDB has internal federation that works across two password-protected repos on the same GraphDB instance

I've posted a SPARQL 1.2 issue: https://github.com/w3c/sparql-12/issues/117

Vladimir Alexiev
  • 2,477
  • 1
  • 20
  • 31