Firefox Extension for NetInf Jeff Thompson ICNRG IETF-88 November 3, 2013
The sites who say “ni !” November 3, 2013Firefox Extension for NetInf - Jeff Thompson2
Overview Introduction Apache support Firefox extension Demo: NetInf.org in NetInf Self-reference problem Conclusion/future work November 3, 2013Firefox Extension for NetInf - Jeff Thompson3
Introduction RFC 6920 “Naming Things with Hashes” RFC 6920 ni://authority/sha-256;hash Use Apache RewiteMap on authority to redirect a hash URL to silently return the actual file Use a Firefox extension to redirect an ni: URI to fetch the http: well-known URL November 3, 2013Firefox Extension for NetInf - Jeff Thompson4
Apache support In the authority virtual host config: RewriteMap sha-256-map txt:/ /.well-known/ni/sha-256/sha-256-map.txt In.well-known/ni/sha-256/.htaccess : RewriteRule ^([^\.]+)$ ${sha-256-map:$1|/unrecognized-hash} [PT] In.well-known/ni/sha-256/sha-256-map.txt : To make sha-256-map.txt: python make-sha-256-map.py November 3, 2013Firefox Extension for NetInf - Jeff Thompson5
Firefox extension Tools > Add-ons > Install Add-on From File /tree/firefox/ni-protocol.xpi /tree/firefox/ni-protocol.xpi Handle newChannel for ni: protocol Get authority from the parent page URL Convert ni:///sha-256;hash Use nsIHttpProtocolHandler newChannel(url) Silent HTTP transfer conveys the MIME type TODO: Check and report hash mismatch November 3, 2013Firefox Extension for NetInf - Jeff Thompson6
Demo: NetInf.org in NetInf ni://nuvl.org/sha-256;QlpcCikO_8ENuJf0VXFTFhzqlbTdB6fzprIuJetUNb8 November 3, 2013Firefox Extension for NetInf - Jeff Thompson7
Self-reference problem NetInf In NetInf: ni:///sha-256;XYZ NetInf Cannot put hash XYZ in file referenced by XYZ Possible solutions – Use frames (not good for URL bar. not general) – Load entire web site HTML, show/hide sections – JavaScript: Load sha-256-map.txt and substitute hashes or put the map link in the URL query, dynamically pass it on: ni:///sha-256;XYZ?map=sha-256;ABC November 3, 2013Firefox Extension for NetInf - Jeff Thompson8
Conclusion/future work Bootstrap ni web sites using HTTP server Actual web pages are fully “ni ready” Future work – Check and report hash mismatch – Tool support to convert existing web sites – Solutions to self-reference problem Firefox Extension for NetInf - Jeff Thompson9November 3, 2013
ni ! November 3, 2013Firefox Extension for NetInf - Jeff Thompson10