Monday, April 2, 2007

Smart Client authentication with Open ID

One of the things that has become an issue with me is the limited support for non-browser authentication with Open ID. I like the technology, but in my case i needed to use it in a smart client and it isn't easily extended to that scenario. I think this is a current limitation in Open ID and not sure whether it will ever be considered. However, i decided to do some work to demonstrate how this could be useful and how it could even be implemented currently. This isn't necessarily a demonstration of a finished and well architected concept, but more an illustration of what can be done.

To demonstrate, consider a simple application that shows you an article. Note it shows summary data and there is a log in button.



















When the log in button is clicked, a window pops up with a browser embedded and takes you to a log in page, where you enter your open id and click the log in button. This actually passed a GUID which is associated with the Session of the user on IIS.












Now, you are taken to the log in page of your identity provider - in my case Verisign, where you authenticate as usual.













You choose what you want to allow and how long for and click "allow".














When this is done, you are redirected to a log in page, which gets the data you have been provided with and adds it to the Application cache associated with the GUID you passed in earlier and the window is closed. It it given a time window of 60 seconds before the data is removed from the cache.















When the login Window closes, the article reader is refreshed to indicate you are logged in and displays some data according to your profile settings. This uses the client GUID and makes a web service call which pulls out the profile information associated with that GUID and returns it. The data on the server is immediately destroyed.



















The code is by no means finished and a full solution, so i will tidy it up and release it at some point today - perhaps over at the dotnetopenid group at google whose excellent work was the basis of this sample.

Hopefully it can get some thoughts ticking as "it can't be done" isn't really an option for me and now that i have shown it can in fact be done it's maybe worth considering how it can be improved.

freakonomics

I'm reading freakonomics just now. Interesting book, but one point he gets wrong.

He says that parents often badly judge the risk their children are at and cites the fact that more children are killed in swimming pools than are killed by guns each year - but quite a margin. he suggests that when given the option of sending your kid to play with someone who has a gun in the house is actually safer than sending them to a house where a swimming pool can be found.

Fine - directly compared to each other this is clearly the case. However, he misses the context. Let's aggregate the typical possibilities for harm to come to a child in a house with a large swimming pool and compare this to the aggregate of possibilities of a child coming to harm in a house with a gun in the drawer. So, in general it is more likely a kid whose parents have a gun lying around have a bunch of other things going on too - drugs, abuse, dangerous things lying around etc.... I don't have any hard stats, only common sense (and do i even have that!?), but i know where i would feel less comfortable leaving my child.

Conventional Wisdom

In trying to create a new product a barrier i have often ran into is that of conventional wisdom. People listen to your idea and perhaps don't quite get it - they have questions that they view as a stumbling block.

Sometimes it is that some work is required to get your idea working - other times you want to hide something from them until you are ready to show them.

Your past experience of gut feel should be an indicator of how much to trust your own view that this must be right. If you have a past record of seeing things differently and eventually being right (or close to right) then you have good reason to trust yourself. This is where i am. If however you are typically one of those who is surprised when some unusual approach actually does work, then you probably want to heed the advice of others.

That is not to say person A is right and person B is wrong. However, gut feel has been right for me in the past and i haven't listened as closely to myself as i should have and i have come to regret it. This time i'm on a roll and whether i'm right or wrong, i'm sure enjoying the idea that what i am doing could be a brand new way to search on the web!

Sunday, April 1, 2007

Google's April fool

It's 7.31 AM on Monday April 2 - is Google trying to April fool me? (see date of post - which i never touched).

You'll never get me ! [well, ok, you made me check my calander!! ]




... for future reference it was set to April 1.

open id thoughts

I joined the dot net open id group over at Google code.

I am interested in a C# open id implementation, but more specifically trying to figure out whether there would be an easier way of making it part of a smart client application.

As i posted there. ...

One thing that i'd like to hear more thoughts on is Open ID in a smart
client enviroment - fundamentally because of the trust mechanism it
uses we have to be redirected to the provider and then redirected back
to the consumer.

However, surely an extensible mechanism should be considered
here to allow trusted Open ID providers to provide authentication? A trusted
open id client could call the web services of an open id provider
directly (or proxied via the owner of the application).

I'd love to be able to add open id to my client app and the general
thoughts around it at the moment are "that's not what it's for/how it
is supposed to work" - which is kinda odd for something the is so
fundamental as an identity solution.