On 23 February 2011 10:55, Laurent Eschenauer <lau...@eschenauer.be> wrote:
> Hi all,
> I'm trying to implement salmon and test interop with status.net but have an
> issue with the salmon flow when trying to verify signatures: how do I know
> who sent the slap ? And when I say who, I mean: what is the webfinger acct
> uri of the sender ? Similar issue when looking up the webfinger uri of the
> person mentioned in the acitivity.
>
> In the payload, here is what I get for the author of the note (i have
> removed some links/poco stuff for brevity).
>
> <author>
> <activity:object-type>http://activitystrea.ms/schema/1.0/person</activity:object-type>
> <uri>http://identi.ca/user/385216</uri>
> <name>shoutr</name>
> <link rel="alternate" type="text/html" href="http://identi.ca/shoutr"/>
> <poco:preferredUsername>shoutr</poco:preferredUsername>
> <poco:displayName>Shoutr</poco:displayName>
> </author>
I have to admit that it's some time since I worked on this the last
time. (So if I'm wrong and missing the latest specs, please slap me),
but the uri -element of the author is the one you can use.
For example for the user http://identi.ca/user/385216 you can ask for
the LRDD from http://identi.ca/.well-known/host-meta
With the lrdd template given by the .host-meta you can build the
webfinger query.
For example for Identi.ca the template is
"http://identi.ca/main/xrd?uri={uri}". Using the template the end
result would be the webfinger URL:
http://identi.ca/main/xrd?uri=http%3A%2F%2Fidenti.ca%2Fuser%2F385216
You can test with this too:
http://www.madebymonsieur.com/ostatus_discovery (amazingly it seems to
still work :D)
I could probably change it be an open source code and provide a web
service too that would return JSON for example. Would there be any
interest for that?
On 23 February 2011 10:55, Laurent Eschenauer <lau...@eschenauer.be> wrote:
> There is no mention of the original webfinger acct uri of the sender. Thus,
> how can I find out the public key from the sender ?. Do I miss something ?
> Two ideas to simplify things:
> - Add a link with: <link rel='webfinger' and
> href='acct:lau...@eschenauer.be'/>
> - Add a http header with something like: "From: acct:user@domain".
> (See Blaine's proposal on privacy
> here: http://www.iab.org/about/workshops/privacy/papers/blaine_cook.pdf)
> Similarly, in the activity itself, the 'mentioned' link only has a href to
> the user profile, no references to the webfinger acct uri. A simple solution
> may be to add a ref attribute with the acct uri when available.
> Example: <link rel="mentioned" href="http://eschenauer.be/users/laurent"/>
> becomes: <link rel="mentioned" href="http://eschenauer.be/users/laurent"
> ref="acct:lau...@eschenauer.be"/>
> However I'm not sure that ref is authorized in an atom link. What do you
> think ? Other ideas ?
I believe you are right and there is most likely a way to optimise the
work-flow. But what is the correct way, I don't know.
Cheers,
--
tuomas
> I'm trying to implement salmon and test interop with status.net but have an
> issue with the salmon flow when trying to verify signatures: how do I know
> who sent the slap ? And when I say who, I mean: what is the webfinger acct
> uri of the sender ?
>
I have to admit that it's some time since I worked on this the last
time. (So if I'm wrong and missing the latest specs, please slap me),
but the uri -element of the author is the one you can use.
For example for the user http://identi.ca/user/385216 you can ask for
the LRDD from http://identi.ca/.well-known/host-meta
With the lrdd template given by the .host-meta you can build the
webfinger query.
> However, with this flow, I'll authenticate the salmon slap as coming from "http://identi.ca/user/385216", but that identifier will be unknown to me as a user.
> I only know the sender as 'sho...@identi.ca'Why do you say that you only know the sender "sho...@identi.ca"?? If you don't own any kind of relationtionship(follower, following) with sho...@identi.ca and you receive a salmon mention by that user, you will only know the identifier http://identi.ca/user/385216. So, you should perform the LRDD discovery process to obtain a magic-key, which would be used to verify the received Salmon. I remark here the fact that WebFinger, is merely a proper subset of LRDD(for example the HTTP header and the HTML discovery isn't applicabile to an uri of type ACCT:NAME@DOMAIN). The presence of a Webfinger identifier, isn't compulsory for the operation of OStatus/Salmon in general, it is only more intuitive.