Javascript Client and Anonymous access

23 views
Skip to first unread message

Jonathan C.

unread,
Oct 22, 2010, 4:45:00 AM10/22/10
to OpenAnzo
G'morning OpenAnzo group,

I'm working on a JS interface component for composing SPARQL queries:
I am unsuccessfully trying to make some requests to the OA HTTP sparql
endpoint but I am literally stuck with authorization issues.
I tried putting the
"org.openanzo.security.ldap.anonymousAccessEnabled=true" line in
config/ldapAuthentication.properties and even in config/
org.openanzo.SystemConfig.properties as I read in other posts, but OA
keeps respond me with an 401 Unauthorized message.
The SPARQL is formally correct and works with a virtuoso HTTP
endpoint, so I suppose it's a simple problem of configuration.

Is that property the only thing i need to add for ensuring anonymous
access?

PS: I also tried AnzoClient.JS following th JSDevGuide, but it failed
me with a 404 trying to access to "<myserver>/anzo_authenticate"
although those problems shoudnt be related.

Jordi Albornoz Mulligan

unread,
Oct 31, 2010, 4:20:05 PM10/31/10
to open...@googlegroups.com
On 10/22/2010 4:45 AM, Jonathan C. wrote:
> G'morning OpenAnzo group,
>
> I'm working on a JS interface component for composing SPARQL queries:
> I am unsuccessfully trying to make some requests to the OA HTTP sparql
> endpoint but I am literally stuck with authorization issues.
> I tried putting the
> "org.openanzo.security.ldap.anonymousAccessEnabled=true" line in
> config/ldapAuthentication.properties and even in config/
> org.openanzo.SystemConfig.properties as I read in other posts, but OA
> keeps respond me with an 401 Unauthorized message.
> The SPARQL is formally correct and works with a virtuoso HTTP
> endpoint, so I suppose it's a simple problem of configuration.
>
> Is that property the only thing i need to add for ensuring anonymous
> access?

Hi Jonathan,

The Anzo SPARQL endpoint by default is protected via HTTP Basic
Authentication. Enabling the anonymous access doesn't disable the HTTP
Basic Auth requirement for the SPARQL endpoint.

If you send an HTTP username and password along with your request things
should work as expected. For example you can use the username sysadmin
with password 123 if you still just have the demo defaults. Or since you
have anonymous access enabled, you can use anzo_anonymous as the
username and any password at all.

Also, just a warning for your next step, if you don't specify any graphs
for the dataset of your SPARQL query, Open Anzo treats that as querying
against an empty dataset. Other stores do that differently, treating
that instead as querying against all graphs. In Open Anzo, to bring 'all
graphs' into the query's dataset you need to use the following 'magic'
URL as the SPARQL protocol's default-graph-uri or named-graph-uri
parameters:
http://openanzo.org/namedGraphs/reserved/namedGraphs/ALL
If your queries seem to be returning no results when you think they
should, then that might be the issue.

--
Jordi Albornoz Mulligan
Founding Engineer - Cambridge Semantics
jo...@cambridgesemantics.com
(617) 401-7321

Reply all
Reply to author
Forward
0 new messages