[OpenID] Nonces generated by the server?

Martin Atkins mart at degeneration.co.uk
Tue Mar 31 21:41:18 UTC 2009


Breno de Medeiros wrote:
> 
> 
> On Tue, Mar 31, 2009 at 2:28 PM, Martin Atkins <mart at degeneration.co.uk 
> <mailto:mart at degeneration.co.uk>> wrote:
> 
> 
>     I was idly reading the OpenID spec today and was reminded that the
>     OpenID spec has the server generate a response nonce, rather than it
>     being generated by the consumer.
> 
>     This seems strange to me, because in order to prevent replay it
>     requires the consumer to remember all nonces that it has seen
>     recently. If the consumer generated the nonce, then it would only
>     need to retain state of nonces that it has issued, which is
>     conceptually simpler.
> 
> 
> Yes, I wondered about that too. Note, however, that in OpenID dumb 
> (stateless) mode the OP has the opposite obligation. So if you do down 
> that route, it would be better that there was a nonce from RP and a 
> nonce-response from OP so that both could employ more reliable 
> approaches to nonce-checking.
>  

Taking this to its logical conclusion, I guess there's nothing to 
prevent the consumer from including its own nonce in the return_to URL 
and verifying that in place of the server's nonce.

This is effectively what Net::OpenID::Consumer for Perl is doing, though 
the "nonce" it uses is really just a timestamp.




More information about the general mailing list