W3C home > Mailing lists > Public > public-xg-webid@w3.org > November 2011

RE: struggling with ASK

From: Peter Williams <home_pw@msn.com>
Date: Tue, 29 Nov 2011 09:41:34 -0800
Message-ID: <SNT143-W902A626820AD7853D3DFA92B30@phx.gbl>
To: <henry.story@bblfish.net>
CC: "public-xg-webid@w3.org" <public-xg-webid@w3.org>

This will all be poorly formatted and hard to read for email readers I'm afraid, since someone had me remove hotmail rich text editing, so my precious words are well archived by ancient archival tools. (I work in an industry where such rules prevail, too, at EVERY architectural level though.)




I amended one of my RDFa webid profile to remove spaces, and the net result is that the statement in the store no longer has spaces, anywhere.

{_:arc0303b2 <http://www.w3.org/ns/auth/cert#modulus> "922cec67c4664d6191141f90bfe71a9c44a9974dd3dfc2fcc3fa2a600d47b8d5c63fd33502527a1f6efacf1d9799e75b1eaed11ae89202f1c498ce0c9e434da4e7ebb0a391d582528f21c4b6c1265116d2d7484b435957be816a7fe86f0fcd24940a733d63d18f304708f681c47674ed12a97ab468049cf80ab8d4f7c113329b"^^<http://www.w3.org/2001/XMLSchema#hexBinary> .}





The testing site reports

* Checking ownership of certificate (public key matches private key)... PASSED (Reason: GENEROUS)

* Checking if certificate contains URIs in the subjectAltName field... PASSED

* Found 2 URIs in the certificate (a maximum of 3 will be tested).

* Checking URI 1 (http://yorkporc.blogspot.com/2011/11/2uri.html#me)...
  - Trying to fetch and process certificate(s) from webid profile... 
        Testing if the modulus representation matches the one in the webid (found a modulus value)...

          Testing modulus... PASSED
             Cert  =922cec67c4664d6.......ab8d4f7c113329b

          Match found, ignoring futher tests!

* Authentication successful!


Your certificate contains the following WebIDs:







tracking down the second issue (xsd declaration)


My test profile document issues:-


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html b:version='2' class='v2' dir='ltr' version='XHTML+RDFa 1.0' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:cert='http://www.w3.org/ns/auth/cert#' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr' xmlns:foaf='http://xmlns.com/foaf/0.1/' xmlns:xsd='http://www.w3.org/2001/XMLSchema#'>>


This compares well with the spec's example (though is Not identical, note):


<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" version="XHTML+RDFa 1.0" dir="ltr"


My ASK template is 


 public const String webid2key2 = "PREFIX : <http://www.w3.org/ns/auth/cert#>\n" +
    "ASK {0}\n" +
        "<{1}> :key [\n" +
        ":modulus \"{2}\"^^xsd:hexBinary;\n" +
        ":exponent {3};\n" +
        "] .\n" +


which compares well with the spec (from which it was drawn):


PREFIX : <http://www.w3.org/ns/auth/cert#>
   <https://bob.example/webid#public> :key [
      :modulus "cb24ed85d64d794b69c701c186acc059501e856000f661c93204d8380e07191c5c8b368d2ac32a428acb970398664368dc2a867320220f755e99ca2eecdae62e8d15fb58e1b76ae59cb7ace8838394d59e7250b449176e51a494951a1c366c6217d8768d682dde78dd4d55e613f8839cf275d4c8403743e7862601f3c49a6366e12bb8f498262c3c77de19bce40b32f89ae62c3780f5b6275be337e2b3153ae2ba72a9975ae71ab724649497066b660fcf774b7543d980952d2e8586200eda4158b014e75465d91ecf93efc7ac170c11fc7246fc6ded79c37780000ac4e079f671fd4f207ad770809e0e2d7b0ef5493befe73544d8e1be3dddb52455c61391a1"^^xsd:hexBinary;
      :exponent 65537;
   ] .


Where did you see the missing xsd issue? It would be lovely for these to be the two gotchas.


we should ensure that the unit test site REJECTS as FAIL those profiles whose mod hexBinaries are not conforming - to OUR rule (lower case hex digits only), UTF-8.



> From: henry.story@bblfish.net
> Date: Tue, 29 Nov 2011 10:42:05 +0100
> CC: public-xg-webid@w3.org
> To: home_pw@msn.com
> Subject: Re: struggling with ASK
> On 29 Nov 2011, at 04:48, Peter Williams wrote:
> >
> >
> > I've written up my (novice) programmer issues with the ASK statement from the spec. Unlike the select I used to apply, now the sparql engine Im using is very much more in charge of the matching.
> >
> >
> >
> > http://yorkporc.wordpress.com/2011/11/28/webid-trial-implementation/
> >
> > in short, some gotcha is making it fail. Someone with a higher degree in triple querying can hopefully spot the obvious issue.
> 2 issues:
> 1. You have got spaces in your numbers. xsd:hexBinary does not allow those (it is not as flexible as cert:hex in that respect - but is supported by standards,...)
> 2. you have not defined the XSD namespace, which *I think* needs to be defined, though it would be nice if one did not.
> >
> >
> >
> > Im tempted to walk the graph instead of using ASK (walking as I saw the webidauth code walk). But, thats not what the spec counsels. Im trying to do what the spec actually says (so one can tests its viability, once put in the hands of novices). If there are some gotchas, these can be noted in endnotes (to maximise uptake, minimizing known grief).
> >
> >
> Social Web Architect
> http://bblfish.net/
Received on Tuesday, 29 November 2011 17:42:10 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:39:48 UTC