From: Rob V. <rv...@do...> - 2014-12-08 10:46:11
|
Mark Both connectors will set the PreAuthenticate property of the underlying .Net HttpWebRequest but this only works with servers that use Basic Authentication but this does make your credentials extractable by sniffing of the HTTP request. Some systems like Stardog may prefer to use the more secure Digest authentication which requires the full challenge response round trip but cannot expose your credentials. Though the fact that using SparqlConnector does pre-authenticate successfully and the StardogConnector does not is a little strange. As for why one implementation does pre-authenticate by default and the other does not I don't know why that would happen, the setup of the HTTP requests looks pretty identical to me on reviewing the code. If you have a large query then one connector may be POSTing when the other does not (though the threshold for choosing whether to GET or POST for queries should be the same for both connectors). Screenshots or dumps of the Fiddler traces would be interesting to see, or even just the Debug console traces producing by enabling Options.HttpDebugging. Note that you can also try forcing pre-authentication (using Basic Authentication) on connections by setting Options.ForceHttpBasicAuth to true Rob p.s. please remember to subscribe to the list if you intend to continue this discussions From: Mark D Wood <mar...@ko...> Reply-To: dotNetRDF User Help and Support <dot...@li...> Date: Friday, 5 December 2014 16:13 To: "dot...@li..." <dot...@li...> Subject: [dotNetRDF-Support] stardog connector & handling of authentication credentials > Hello, > > I noticed in doing some simple performance testing that executing a simple > SPARQL query against a Stardog SPARQL endpoint via the Stardog connector > versus using the SparqlConnector took considerably longer. > > That is, executing > > using (StardogConnector stardog = new StardogConnector(stardogURL, > SparqlDB, "admin", "admin")) > { > // execute SPARQL query > } > > takes longer than: > > using (SparqlConnector sc = new SparqlConnector(newUri(endptURL))) > { > sc.Endpoint.SetCredentials("admin", "admin"); > // do SPARQL query > } > > Watching the traffic with Fiddler, I see that with the Stardog connector, it > first attempts to execute the query w/o specifying the authentication > credentials, which results in a 401 error; it then reissues the query with the > credentials. So it takes longer, because of the retry. > > Any reason why the credentials aren’t passed the first time? > > Thanks, > > -Mark > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from > Actuate! Instantly Supercharge Your Business Reports and Dashboards with > Interactivity, Sharing, Native Excel Exports, App Integration & more Get > technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk__ > _____________________________________________ dotNetRDF-Support mailing list > dot...@li...https://lists.sourceforge.net/lists/lis > tinfo/dotnetrdf-support |