cwrc / ontology

CWRC ontology - primary repository
13 stars 7 forks source link

CWRC onto no longer accessible to HuViz #394

Closed SusanBrown closed 6 years ago

SusanBrown commented 6 years ago

HuViz can no longer use the CWRC ontology, which it reads from the sparql end point. I think this probably has to do with the switch to BlazeGraph.

This is a high priority issue because we need HuViz usable for the DH2018 workshop on Monday and the poster on Wednesday.

This from Shawn:

The ontology labelled (in the menu) "CWRC Ontology" actually comes from the URI: http://sparql.cwrc.ca/ontology/cwrc.ttl

I just checked this url directly using chrome and it loaded without any problem, but when I tried viewing that "CWRC Ontology" it hung up. I opened the inspector on the page and tried viewing that ontology again and saw this message:

Failed to load http://sparql.cwrc.ca/ontology/cwrc.ttl: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://alpha.huviz.dev.nooron.com' is therefore not allowed access

Basically this is a CORS issue. (Cross Origin Resource Sharing) https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS CORS is a set of security policies to browsers refuse to load content under script control to prevent malicious scripts on one site from accessing sensitive data on other sites that the user is already logged into -- preventing one site from attacking another site with any authorities the user might have there. Tricky stuff.

This probably arose when we moved the source for that ontology from GitHub to http://sparql.cwrc.ca (or maybe a later configuration change at your CWRC server started this.)

There are three possible solutions as I understand it: 1) host (or serve) the file from GitHub because http://raw.githubusercontent.com/ is set up to permit CORS connections

2) have Joel configure http://sparql.cwrc.ca/ontology/ to permit CORS access to the ontologies by setting a header on delivered content which looks like this: 'Access-Control-Allow-Origin: ' This could be made more specific so just particular domains can perform such queries, but I would recommend just using the universal wildcard "" as in the example, since this information is not a secret.

SusanBrown commented 6 years ago

I propose going with item 2 as proposed by Shawn unless we don't have time, in which case we should put an updated ttl version of the onto on github and have HuViz point to that, as per 1.

joelacummings commented 6 years ago

Should be fixed.

antimony27 commented 6 years ago

Hi @joelacummings I still can't load anything. I'm getting an error message, despite trying three different datasets. I also tried to view the ontology using OwlMini, but nothing is working.

joelacummings commented 6 years ago

@antimony27 Interesting... it did work for me both as OWL mini and as CWRC Ontology, maybe I can take a look at Susans with you.