Signing comments on blogs
Adrian Holovaty has implemented reserved comment names in his blog, a feature that prevents anyone apart from him from using the names “Adrian”, “Adrian H.” or “Adrian Holovaty” when posting a comment. François Nonnenmacher suggests extending the idea to allow people to “confirm” their authorship of comments on any blog using a TrackBack sent to their site that in turn causes them to be sent an alert email, which they can then use to confirm their comment. I like his idea of authentication based on URLs (email addresses are no good; they should not be publically displayed for fear of spam harvesters) but I think I’ve come up with an alternative authentication scheme that removes the need for the user to manually confirm authorship. This is pretty complicated, so bare with me.
- The comment author enter’s their comment in to a form on the site. They see a standard icon indicating that the blog in question supports comment signing. Rather than manually entering their name and URL, they activate a bookmarklet that they have previously added to their browser.
- The bookmarklet fills in the name and URL fields for them. It also takes the comment, appends a secret key (stored in the bookmarklet) and finds the MD5 hash of the new string, using the Javascript MD5 library. It inserts this hash in to a hidden field in the comment form.
- The user can now submit the new comment. That’s all they have to do.
- The weblog server now kicks in to action. If the comment has not been signed (there is no hash in the hidden field) it adds the comment normally, noting that it should be displayed as an “unsigned” comment on the comments page. End of story.
- If it has been signed, the server has some work to do. First it must start loading the URL indicated by the user on the comment form. It is looking for a
<link rel="signature">element, which will provide the URL of a signature authenticating web service. If the </head> tag is reached, the system can assume the link element does not exist and can mark the comment as “unsigned”, - If the web service is found, the server can now send it the comment and the User’s site URL. The web service (which knows the user’s secret key) will respond with a hash created in the same way as the one constructed by the bookmarklet.
- If the hash returned by the web service matches the hash provided by the bookmarklet, the comment is considered “signed”. The server can store it as such, and later display it with an icon or style that indicates it is a signed comment. If they do not match, the server can either store the comment as “unsigned” or even flag it as “untrusted”, since it was incorrectly signed.
As you can see, it’s a relatively complicated system. The comment authors must have a custom bookmarklet and add a tag to their home page indicating their authenticating web service URL. Note that they do not need to host the authentication web service themselves—they can instead point to one run by someone else who they trust (trust here is essential as the web service must know the user’s private key). Meanwhile, the blogging system needs to be able to perform HTTP requests.
The key advantage of my system is that, being based on MD5, it is relatively easy to implement (as opposed to a system based on something like PGP). Provided no one points out any immediate flaws, I would happily construct a prototype in PHP. I’m sure a Perl implementation for Moveable Type users would not prove much of a challenge to any talented plugin author.
Security wise, it strikes me that the weakest link is the client side bookmarklet which comment authors would need to use. However, comment signing is not the most critical security application in the world and comment authors could easily change their password by updating their bookmarklet and alerting their signature web-service provider (which could even be themselves) of the change.
And if the signature idea doesn’t win any favour, the idea of having a bookmarklet to fill in your name and URL in blog comment forms is one I’ve been meaning to share for some time.
MD5 is just a hash, not a public key system, so this wouldn't work, sorry.
Jim Dabell - 22nd July 2003 22:03 - #
Simon Willison - 22nd July 2003 22:20 - #
François - 22nd July 2003 22:22 - #
Francois PLANQUE (and not trying to abuse the prev - 22nd July 2003 22:36 - #
Blogging from public PCs / other people's computers is definitely a problem. One solution would be to allow people to "sign later" - they could go back to a comment they had previously posted and click an icon next to it, then sign it as normal with their bookmarklet. The problem with one-time passwords is it requires you to take an extra step every time you want to post a comment. Unless...
OK, scrap the original idea entirely! No MD5 needed - the bookmarklet can retrieve a javascript file from the auth server which contains a randomly generated one-time password. The auth server saves the one-time password and the URL of the page that made the request (the URL of the comment form), or alternatively some unique ID in a hidden field in the "add comment" form. The blogging system can then find out the auth server (again using a link element) and give it the one-time password, which it will verify.
Simon Willison - 22nd July 2003 22:36 - #
François - 22nd July 2003 22:42 - #
Forget about signing in later. As Dave Shea (so he pretends to be ;-) wrote on Adrian's site, it's too difficult to clean up after the fact. Just right now, by the time I finish a comment, there are already one or two sliced in between! But I might be wrong on that.
And, no pun intended, you should think of implementing line breaks in your comments before the sign-in thing ;-)
François - 22nd July 2003 22:49 - #
In short, the only real way to handle this stuff is going to be via the use of some sort of trusted party. Either a portal-like community service, a PKI infrastructure or well-known hashing techniques. Something that allows a person to say "I'm this identity" and then the site can verify that's the case. What's possible here is building up on things like Advogato's trust network. We all have 'spheres of interest' and that might be a fine way to build up trust networks.
As you recognize, this isn't easy stuff. But it's becoming more and more apparent that something like this is going to be needed.
Bill Kearney - 22nd July 2003 22:58 - #
François - 22nd July 2003 23:39 - #
I don't think a single trusted third party is necessary provided the authentication information is retrieved from the comment author's own blog - if it is, then they can specify their own trusted authentication service (which they themselves can control if they are really paranoid).
I don't know that even MD5 hashing is necessary if we use the one-time randomly generated password idea. I'm going to knock up a simple prototype under the idea that working code speaks louder than words. Any problems should then become instantly obvious. If it doesn't work, I'll have lost a couple of hours coding time.
Simon Willison - 22nd July 2003 23:40 - #
James Kew - 22nd July 2003 23:58 - #
gilmae - 23rd July 2003 00:11 - #
Not at all. The system we are talking about is for optional authentication of comments. The way I envisage it, comments which have been "signed" will either have the comment author's name displayed in a different colour or will be accompanied by a small icon indicating that they are authenticated. All other comments would still appear, but they would not have the icon. The system is not meant to restrict commenting, just to allow people to add proof that it is really them to their comments.
I don't see that as a huge problem. If someone were to do that they would be spotted pretty quickly, and if the person they are impersonating heard about it it would not be at all hard for them to prove that they have been impersonated. This is a huge improvement on the situation now, where it is impossible to prove an impersonation. In any case, authentication on a name would not work as some people have the same name (I'm sure there's more than one Dave S. active in the blogosphere for example).
Simon Willison - 23rd July 2003 00:21 - #
Bill Zeller - 23rd July 2003 00:22 - #
What a lot of effort for not alot of return.
Why not just implement a user registration system for people who are *really* bothered about signing their comments - most people who actually have something good to say usually use their own blog to say it anyway - and I think we're all intelligent enough to realise when someone is being lame and imitating someone
Smiler - 23rd July 2003 00:35 - #
Bill: That's the exact problem with a password scheme - anyone who runs a blog that you have commented on could potentially imitate you.
Smiler: user registration isn't plausible because there are so many blogs; besides, what's to stop me registering on someone's blog as Adrian Holovaty before the real Adrian Holovaty gets there? OK so it's not the most critical problem in the world, but distributed authentication is interesting enough to be worth playing around with.
Simon Willison - 23rd July 2003 01:19 - #
There's no need to use a centralized service. But if you intend to build in a way to *make sure* the content is coming from where it claims then there's little choice other than to make use of such intermediaries. Experience has already shown that spammers WILL abuse weblogs and their comment systems. My point of mentioning use of 3rd parties is to make it clear that the /option/ to use them should be seriously considered when implementing something. It doesn't have to be used, but failure to consider the hows and whys of using them would be a shortsighted mistake. After all, go look at who's done the Perl PGP modules on CPAN...
As for effort without return, think seriously about the complexities of user registration systems. Then think about the security risks. Too many users will use the same password on different systems. One hack and their entire network of sites becomes ripe for being compromised. Not to mention most sites don't even do *basic* login dictionary attack logging and notification. That's one cure that's worse than the disease.
In short, a site can well make use of regular old web input forms. A site could also make use of a back/forth system that helps both the site and the visitor. The site gets helped by having a way to 'be reasonably sure' who's posting and the visitor gets some help in tracking what they post and where. It ends up being a win/win situation here. Yes, it will require sites to implement something new. It will also require visitors interested in this concept to implement something. It's not like it's going to happen without some modicum of effort. Even weblogging required a LOT more effort than just using vi to write your own HTML pages but fortunately easy-to-use frameworks evolved. Likewise an evolution is possible for commenting.
Bill Kearney - 23rd July 2003 14:05 - #
François - 23rd July 2003 15:27 - #
Bill Kearney - 23rd July 2003 16:19 - #
Marcus - 23rd July 2003 18:12 - #
The problem is that if the authenticating service returns the hash, "Mark" (generic malicious user) could pretend to be Alice by sending his comments to the authenticating service, and taking the hash returned by the auth service and submitting that to the website. The website will then check the hash with the auth server, and it will match.
One solution is for the website to send the hash to the auth server and let the auth server return a boolean to say if its correct.
And with the idea about giving a password to every website you comment on, and them now having your password: You just use a different password on the different blogs, or a bookmarklet implementation of my password generator (makes different passwords for each URN from a base password) could be written, or perhaps that mixed with a OneTimePassword.
Brian - 23rd July 2003 19:10 - #
That is exactly why I do not want a third party involved.
François - 23rd July 2003 19:13 - #
And, similarly, none of the Rube Goldbergesque schemes suggested here could ever assure you that I am "really" Jacques Distler and that I am not, in fact, a dog.
To do that, you need to establish trust in the signature. For this purpose, few people seem willing to pay Verisign for Personal Certificates. And PGP's "web of trust", while free, seems not to have scaled well. Beyond a few immediate acquaintances, I encounter vanishingly few PGP signatures whose authenticity I can establish.
If, as you say, comment authentication is not mission-critical, then the commenter could simply have a bookmarklet which would produce a detached PGP signature of his comment (and put it in a hidden field of the comment form). Then the server could retrieve the public key -- corresponding to the commenter's email address -- from one of the PGP keyservers (a simple http request) and verify the signature.
No trust is established -- that requires human intervention -- but at least you know that the commenter is the same canine whose public key/email address is on the keyserver. Which is more than you can say for any of these other schemes.
Jacques Distler - 24th July 2003 08:33 - #
Simon Willison - 24th July 2003 10:49 - #
François - 24th July 2003 14:55 - #
Joao Prado Maia - 24th July 2003 21:39 - #
Tony - 25th July 2003 09:49 - #
Dumky - 10th March 2004 08:16 - #
There are already movabletype and generic php plugins available. All SharedID does is keep track of your identity - allowing you to submit your foaf file (stored on your own server) to the web application with a single click.
The web application (eg mt-comments) can then parse the foaf file to get your name, email address and homepage. Plus all the other neat foaf-stuff, like location, your friends, interests - etc etc.
SharedID even goes further - recommending that foaf authors include a link to a public atom api in their foaf file - that can serve as an 'activity log'. ie - when a user posts to a movabletype weblog - a copy of their comment is posted back to their activity log - so they can keep track of conversations they are involved in across the net.
See http://www.sharedid.com/sharedid/developers/ for some examples.
Ben Nolan - 17th March 2004 05:29 - #
sibonginkosi - 2nd February 2005 18:40 - #
sibonginkosi - 2nd February 2005 18:43 - #
Jonas Bengtsson - 13th October 2005 22:20 - #