-
Notifications
You must be signed in to change notification settings - Fork 145
Resolving NameID #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks for the work, but let's investigate this a bit further. First, everything was (or at least seemed to be) working until But, anyway, this might not be over. |
|
Hi Jozef, I don’t think that renaming the key will help you because pysaml2 then aleady has changed the data session_info[‘name_id’] A solution would be if pysaml2 would store the coded data in another key, so the source isn’t changed. session_info['coded_name_id'] = code(name_id) instead of session_info['name_id'] = code(name_id) Van: Jozef [mailto:[email protected]] Thanks for the work, but let's investigate this a bit further. First, everything was (or at least seemed to be) working until v4.0.3 of pysaml2, which introduced regression in djangosaml2 code. @mheijinkhttps://github.com/mheijink noticed it and pushed a fixhttps://github.com/rohe/pysaml2/commit/1f16f68c5bb9da40b522ff2ad9b175d512890bb4 into pysaml2 that fixes this (it's just not yet released). But, anyway, this might not be over. — |
|
I think you might have missed my point, so please let me rephrase. The first thing I dislike here, just by looking at it from the highest level and not investigating the actual internals at this point, is the mere fact that the two libraries ( Unless the design is actually OK in this case, and it is just a bad luck and a terrible coincidence that both libraries use the same key to store their data in the session. And, by even bigger coincidence, this has been (or seemed to be) working so far because those data were actually of the same (or similar/compatible) meaning and in the same encoding. To be specific, it seems that both libraries were storing It only broke now that I don't find that switching-by- And, actually, what you have proposed is technically equivalent with my proposition. I just said we should perhaps use different key in the session, you suggested pysaml2 should use a different key - both solution aiming for the same thing - avoiding the key name clash between the libraries. So, in my opinion, what's left is to investigate if this really was just a mistake and the original |
|
If it helps, the isinstance logic was taken from the parent function, so it's not really inconsistent. The behavior I was seeing was a double encoding, so simply making sure that only happened once worked for me. |
|
@astoltz Storing different data under the same session key is inconsistent, no matter how many people or libraries do it, period. In our case I was not referring to inconsistency with the At this point I'm more concerned about the mere fact that we set and retrieve data to/from |
|
It looks like the break was introduced here: IdentityPython/pysaml2@0515de9#diff-77a71a585af5a3cfaefa180fd9b8341f with the hugely unhelpful commit title of "language correction". Basically, it seems that (edited for correction) |
|
I've opened #6 as an alternative fix for this issue. We've tested it in our environment and it seems to work fine. |
|
Thanks @jimr, I've manually merged your PR. |
I was having the same issues as https://bitbucket.org/lgs/djangosaml2/issues/42/attributeerror-nonetype-object-has-no on the latest version of this plugin. I'm testing on Django 1.9.4.
With the proposed pull request, I got both SAML Login and Logout to work properly.