OpenID problem with stackoverflow.com

Bug #318972 reported by Ian Warford
52
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Unassigned
Python OpenID
Fix Released
Undecided
Unassigned

Bug Description

Attempting to use my lp openid on stackoverflow nets this error:

Unable to log in with your OpenID provider:
OpenID parameter 'session_type' was missing from the query.

Used my lp URL: https://launchpad.net/~iwarford

Now, this may be an issue with the openid client libraries they're using, or it may be an issue with your server implementation. I'm not sure.

I think this is an issue with your server protocol, though -- apparently that option is optional in OpenID 2.0, and that's what the client that stackoverflow is using? It looks like the people responsible for OpenID didn't think about how it would break when they change protocol versions.

Anyway, I don't know if it'll be fixed on the client end or the server end first, but you have been so notified.

description: updated
Revision history for this message
Ryan Ahearn (ryan-c-ahearn) wrote :

I am having this same problem. I also opened a bug with the people behind stackoverflow.com, but they seem to think it's a server issue.

The error occurs before I am ever transferred to launchpad to verify that I want to continue. I was able to sign into stackoverflow several weeks (I think) ago, but now I consistently get this error.

Revision history for this message
Stuart Bishop (stub) wrote :

The session_type request parameter was optional in OpenID 1.1, defaulting to no encryption. It no longer appears to be optional in OpenID 2.0. This is not explicitly stated. I suspect this is a bug in the Janrain Python libraries we are using, or possibly in our use of them.

This seems to be a common issue on providers - the AOL provider also seems to be affecting Stack Overflow (http://stackoverflow.uservoice.com/pages/general/suggestions/21561-openid-error-session-type-missing- ). I expect this means consumers will need to cope with this parameter missing even if it isn't quite per spec.

Changed in launchpad-foundations:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Stuart Bishop (stub) wrote :

I'm probably not doing this write (its been a while since I poked around here...), but I can't get session_type set in the openid response:

>>> postargs = {'openid.return_to': 'Neverland', 'openid.ns': 'http://specs.openid.net/auth/2.0', 'openid.claimed_id': 'http://bogus.example.invalid:port/', 'openid.mode': 'checkid_setup', 'openid.session_type': 'no-encryption', 'openid.identity': 'http://bogus.example.invalid:port/', 'openid.assoc_handle': 'FLUB'}
>>> message = Message.fromPostArgs(postargs)
>>> request = AssociateRequest.fromMessage(message)
>>> a = Association('handle','secret', 123456789, 999,'HMAC-SHA1')
>>> response = request.answer(a)
>>> response.encodeToKVForm()
'assoc_handle:handle\nassoc_type:HMAC-SHA1\nexpires_in:0\nmac_key:c2VjcmV0\nns:http://specs.openid.net/auth/2.0\n'

Changed in launchpad-foundations:
status: Confirmed → Triaged
Revision history for this message
Andrew Arnott (andrewarnott) wrote :

Stuart, the session_type parameter never appears in a checkid_setup message as you're trying to do here. It is only in the associate request message and its response. And since it is the direct response that is missing it the parameter, it won't actually have the 'openid.' prefix. It will be just 'session_type' as the parameter name.

Revision history for this message
Andrew Arnott (andrewarnott) wrote :

Stackoverflow is using the dotnetopenid library, so all relying parties that use this library are affected. Thanks for working on this at the server end so that all RPs start working implicitly.

If this is a bug in the Python libraries I'd like to see this followed up with the library author so that all Providers get this fix. I agree that the 2.0 spec could have called more attention to the change that it is no longer an optional parameter so that libraries wouldn't get this wrong so much. Hopefully 2.1 can fix that in the spec.

Revision history for this message
Andrew Arnott (andrewarnott) wrote :

I just downloaded Janrain's Python library. It looks like the latest version of the server does send session_type back as it should, and the relying party component even enforces this behavior as DotNetOpenId does. So modern Python RPs should be failing against launchpad.net as well.

Revision history for this message
Francis J. Lacoste (flacoste) wrote :

We have an open bug about upgrading the python-openid library: bug 318972.

Revision history for this message
Andrew Arnott (andrewarnott) wrote :

Francis, this IS bug 318972.

Revision history for this message
Andrew Arnott (andrewarnott) wrote :

It looks like bug 297816 is the one you were referring to, Francis.

Revision history for this message
Christian Reis (kiko) wrote :

Bumping to high as this keeps on buzzing in my ear..

Changed in launchpad-foundations:
importance: Medium → High
Christian Reis (kiko)
Changed in launchpad-foundations:
milestone: none → 2.2.2
Revision history for this message
Francis J. Lacoste (flacoste) wrote :

Fixed in RF 7818. I tested that I could logged in on stackoverflow using staging. This will be deployed on Wednesday.

Changed in launchpad-foundations:
status: Triaged → Fix Committed
Changed in launchpad-foundations:
status: Fix Committed → Fix Released
Revision history for this message
Ryan Ahearn (ryan-c-ahearn) wrote :

This has been working for a long time.

Changed in python-openid:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.