I haven't fully experimented with it yet, but I think the attribute mapper can import other modules such as the UserProfile model and populate all the attributes there if you return them from your CAS server (like language, etc).
Part of the problem here is CAS, which generally doesn't return anything at all except the username and that the authentication succeeded. The feature of adding and mapping additional attributes is an extension that has varying support among CAS servers (the Django based one we use, as well as the Jasig one support them though).
The other part of the problem is that the CAS integration was done minimally and isn't fully integrated into the profile creation process like shibboleth and oauth2. This largely is because for our use case we don't generally need that information for our users in the platform and thus try to make the user experience better by skipping profile creation. If you wanted to add that part back in, I don't think it would be too hard since other providers do this as well, we would just want to be able to skip it as it is done now.
Thanks, I didn't think of that. By the time it gets called, User should already exist, so it should be able to just manage the associated UserProfile, and edX only creates an empty UserProfile object if none exists after the CAS login is done, which would happen after the attribute mapper returns.
I followed your guidance on this thread but am running into issue. CAS Server logs me in and sends me back to birch.rc3 and I see 500 error.What may be causing this? I posted on the logs ops mailing list https://groups.google.com/forum/#!topic/openedx-ops/kKLPUp3E_m4
Hi Eugene:Thank you for an awesomely helpful response. What tools would be best to drill down and debug why step 5 fails on my setup?
I am in a test environment and no specific lock downs in place.
Terminal on CAS client (openedX) when pointed to CAS server say no which means openedX is reaching CAS server and getting a no response because I am not passing the expected service ticket via this curl.
root@domain:/edx/var/log/lms# curl https://testing.cloudgeni.us/wp-cas/validate
no
Browser in my workstation shows
Forbidden
Login failed.
and I see a service ticket in the browser URL.
This ticket=ST-TmlsZXNofGh0dHA6Ly9vbmxpbmUuY2xvdWRnZW5pLnVzL2Nhcy1hdXRoL2xvZ2luLz9uZXh0PSUyRmxvZ291dHwxNDI0NzUzNTMxLjAwODd8ODZmOGNiMGIyYTk4ZWI5MjcxOTkzNGZlNTg2NTEzZWM4ZWFiNGJhOQ= looks like a service ticket CAS server sent to openedX CAS client.
Is there a way I can use this service ticket from browser URL and pass through curl in hopes to receive a different response other than no ?
![]()
I tried this on CAS client. CAS server says it needs to receive a ticket. Looks like CAS client is able to reach CAS server.
curl https://testing.cloudgeni.us/wp-cas/serviceValidate
<?xml version="1.0" encoding="UTF-8"?>
<cas:serviceResponse xmlns:cas="http://www.yale.edu/tp/cas"><cas:authenticationFailure code="INVALID_REQUEST">Ticket is required.</cas:authenticationFailure></cas:serviceResponse>
Is there a way I can use this service ticket from browser URL and pass through curl in hopes to receive a different response other than
no?
I tried this on CAS client. CAS server says it needs to receive a ticket. Looks like CAS client is able to reach CAS server.
My CAS server seems to work with a different CAS client I setup. Do you have success with birch as CAS client? Which git tag are you running CAS with?