I cannot login to ikiwiki.info (and probably no other Perl-backed website) with the latest OpenID Provider. The error is:
Error: OpenID failure: naive_verify_failed_return: Provider says signature is invalid
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 1158356_ikiwiki.patch | 1.57 KB | anarcat |
Comments
Comment #1
anarcat CreditAttribution: anarcat commentedThe perl code debugging tells me there is something missing from the association:
thanks for that... unfortunately, the openid_provider.module doesn't have such debugging, which makes things quite hard to figure out...
The issue here is the Relying Party (RP) isn't able to store the association key for some reason (seems to be a limitation in Ikiwiki), so it falls back to some dumber mode:
The OpenID 2.0 standard states that:
Stateless mode is:
https://openid.net/specs/openid-authentication-2_0.html#check_auth
So it seems like this is part of the standard that isn't supported... ?
Comment #2
anarcat CreditAttribution: anarcat commentedIndeed, openid_provider_verification_response() mentions it supports
, but then goes around checking in its tables to see if the association handle is present, which seems to be a mistake - it should just validate the signature it received.
This could be related to that long-lasting feature request: #506530: Private association support. Or it's just a problem with client malformed data (e.g. #831162: cannot login on stackoverflow or dotnetopenid sites).
I do not have duplicate query string elements as in #831162: cannot login on stackoverflow or dotnetopenid sites though, so my problem is elsewhere (most notably: no assoc_handle is sent from the RP). According to the spec the transaction is supposed to take place in stateless mode, but doesn't explain clearly how this is supposed to happen.
Comment #3
anarcat CreditAttribution: anarcat commentedI am running with this patch in production, but I am worried it is incorrect, especially due to this part of the spec:
However, maybe a private association is exactly what we're doing here... we're creating a new 'nonce' that is known to the OP and delievered to the RP.
The problem is that it seems that generating nonces like this all the time is not necessarily a good idea:
http://lists.openid.net/pipermail/openid-general/2009-April/017584.html
... as it can lead to a DOS attack on the provider.
I have nevertheless produced a patch that fix authentication on ikiwiki sites, and probably others that do not have their own storage of openid data. I would appreciate feedback regarding the above issues.
Comment #4
anarcat CreditAttribution: anarcat commentedThis has been working fine in production for a while, committed.
Comment #6
anarcat CreditAttribution: anarcat commentedSo it seems I broke this recently. Now I can't login to ikiwiki.info anymore.
Comment #7
anarcat CreditAttribution: anarcat commentedphew! fixed this again, now for good i think. this one was really hairy. see commits b7a1c8a68711674748de422d2a7a58cba42e5673 and 3aa74dda367d7e15e0379f13db2cf74f001b1d35 for more information.
Comment #8
anarcat CreditAttribution: anarcat commentedFor the record, this is how to enable openid debugging in ikiwiki: