Shibboleth Support (WIP) - #7893
Conversation
|
Thanks for the pull request, @bradenmacdonald! It looks like you're a member of a company that does contract work for edX. If you're doing this work as part of a paid contract with edX, you should talk to edX about who will review this pull request. If this work is not part of a paid contract with edX, then you should ensure that there is an OSPR issue to track this work in JIRA, so that we don't lose track of your pull request. To automatically create an OSPR issue for this pull request, just visit this link: http://openedx-webhooks.herokuapp.com/github/process_pr?repo=edx%2Fedx-platform&number=7893 |
|
@bradenmacdonald When following the above instructions, I get to the page stating
After clicking "Register Now", I get a page that correclty lists the name received from TestShib A, and does not ask for a password. I created the account and clicked the activation link. However, the new account doesn't seem to be linked to the TestShib account: after clicking "Sign out" and "Sing in with TestShib A" again, I again get the same page claiming there is no Your Platform Name Here account linked yet. If I try to go to the accounts settings of an edX account and click the "Link" for the TestShib A account, I get a stacktrace. |
|
Thanks for the pull request, @bradenmacdonald! It looks like you're a member of a company that does contract work for edX. If you're doing this work as part of a paid contract with edX, you should talk to edX about who will review this pull request. If this work is not part of a paid contract with edX, then you should ensure that there is an OSPR issue to track this work in JIRA, so that we don't lose track of your pull request. To automatically create an OSPR issue for this pull request, just visit this link: http://openedx-webhooks.herokuapp.com/github/process_pr?number=7893&repo=edx%2Fedx-platform |
2aee4b5 to
741a812
Compare
9036784 to
14a406f
Compare
|
@smarnach FYI, just to follow up to your review comments in case you/others are wondering:
|
14a406f to
4eae849
Compare
|
@bradenmacdonald Thanks for the update. I agree that this is clearly a bug in edx-platform and needs to be addressed. Let me know when you have a new version that needs testing. |
There was a problem hiding this comment.
The parameter list of this function pollutes the namespace of the kwargs parameter: everything occurring as a parameter name can't be in kwargs. This is the reason why Django's reverse() uses the slightly awkward kwargs=dict(...) syntax instead of accepting keyword arguments directly, and I suggest that you do the same here.
There was a problem hiding this comment.
Good catch. Thanks :)
|
Running Clicking the "Sign in with TestShib A" button now results in this error, even after re-uploading the metadata: |
|
@smarnach Hmm, that DB error is weird. I'll look into it. For the TestShib error you're getting: can you check the clock on your devstack? Sometimes the time can be off on virtualbox clients, and that will cause that security error. |
|
@smarnach I can't reproduce that "Table 'social_auth_usersocialauth' already exists" error. Is it a migration error or a syncdb error? Is it possible that the south migrations table in your MySQL DB is wrong? |
46d7aef to
00dab67
Compare
|
The clock on my devstack was indeed 14 seconds off, and setting it correctly fixed the issue. Now the login workflow works again, but a newly registered account still doesn't get linked automatically (which is expected, as I understand). Regarding the DB error, it is perfectly possible that this is a migration issue local to my machine. I switched back and forth between branches, which might well have messed up the migration state. Unless the issue comes up again for someone else, I suggest to ignore it for now. |
|
Replaced with new pull request to feature branch (link is just above) |

WIP
Status: Working. Only supports "TestShib" out of the box. No UX changes yet so it works best with a limited number of providers.
Test Instructions:
For devstack: As the
vagrantuser, dosudo apt-get install libxmlsec1-dev swigCheck out this branch and do
paver install_prereqsAdd something like this in
~/lms.env.json, changing the "Entity ID" to a URL related to you (doesn't need to be a real URL - e.g. "saml.yourname.com" is good)Also in the
FEATURESsection, make sure that you add"ENABLE_THIRD_PARTY_AUTH": true,Generate a keypair with
openssl req -new -x509 -days 3652 -nodes -out saml.crt -keyout saml.keyAnd something like this in
~/lms.auth.json, chaning the "MII" part for the new keys you just made:Do
paver update_dbRun the LMS
Test that the metadata is working: go to http://localhost:8000/auth/saml/metadata.xml
Save that XML file to your desktop and rename it to yourname-metadata.xml
Upload your metadata to https://www.testshib.org/register.html
Open http://localhost:8000/login in an incognito window and test out the "Log in with TestShib A" button.