On 31 January 2012 08:01, Ben Adida <
b...@adida.net> wrote:
> On 1/27/12 11:10 AM, Melvin Carvalho wrote:
>>
>> I know that absence of proof, is not proof of absence, but I'm
>> struggling at this point, to see what possible harm there could be in
>> exposing the identity to the browser. :)
>
>
> The key point is this: if you parse the assertion in the browser and extract
> the email address, and then you make *any* trust decisions based on this,
> you're opening yourself up for a world of hurt. A simple Greasemonkey script
> would be enough for an attacker to authenticate as anyone they like.
>
> That's why we try to steer developers far away from this very risky
> direction. You can imagine this happening to even very good developers as
> follows:
>
> - you extract the email in client-side JavaScript, and you only use it for
> display. No problem.
>
> - 3 months later, you've forgotten all about this, you notice you have the
> email address in JavaScript, and you use it in a way that actually requires
> that you trust it. Boom.
>
> So, I would still recommend that you send the assertion to the server,
> verify it there, and return the email address to your JavaScript.
Thanks that's a great explanation.
However, I would suggest that identification, authentication and
authorization are slightly different problems. Using the wrong tool
for he wrong job, as you say, is very dangerous.
But looking at the real world there are sometimes cases where people
can identify and without necessarily authenticate. Imagine I am at a
conference an see someone with a name badge and an institution. I
could authenticate that before speaking to them, but that may be a
pain. Or I could talk to them and if I wanted to do something more
serious, authenticate later. Perhaps this is not the greatest analogy
but hopefully illustrates a point. Projects such as wikipedia have
proved that a little trust can sometimes go a long way, but that's no
excuse for lax security measures.
>
> -Ben