Harvard-University-iCommons/django-auth-lti

403 error when running the sections tool

Closed this issue · 0 comments

On Friday Aug 8th I was trying to setup the ‘add people’ LTI tool locally. I already had an early version checked out so it was just a matter of pulling the latest code.
I pulled the latest code and then ran a pip update (pip install -r icommons_lti_tools/requirements/local.txt —upgrade) to update my local env.

I tried running the tool locally pointing to the canvas.icommons instance of Canvas. When I accessed the tool I got a 403 error. I then tried against beta.harvard and got the same error.
I checked and rechecked my config and still got a 403.The logs didn’t point to anything. I added some print statements to see how far I was getting.
Through some trial and error, It seemed to be an issue in the @lti_role_required decorator that is used in the ‘add people’ tool.

I commented out that line and I was able to get farther in the process. Putting that line back in caused the 403 error again.

All the other LTI tools I have installed worked fine, but none of them used the @lti_role_required decorator.

I was using the develop branch of the django-auth-lti project in my local.txt file. I switched that to master and re-ran the pip upgrade. After that it worked fine on the mater branch.
So it seemed at the time that the develop branch of django-auth-lti had a problem.

Today (Aug 14th), I wanted to recreate the problem so I could provide more information. I switched back to the develop branch of the django-auth-lti project and re-ran the pip upgrade.
It seems to be working fine for me now. I’m not sure what is different today.
I guess at this point, the only thing to do is note it and if it happens again I’ll post more info.