Installation

Canvas LTI

Canvas LTI

by Steven Marshall -
Number of replies: 2

Hi Everyone,

We have been working on setting up the Canvas LTI but are running into some issues. Canvas seems to pass information back to webwork when someone logs in but webwork don't do anything with it. I have checked the authen_LTI.conf over and over again, but can't find anything missing. I have had our Canvas admin double-check our password and the URL that is set in Canvas to ensure they match. I have ensured that the site.conf file has the correct "https" URL.

The error we receive is:

The following path was reconstructed by WeBWorK. It should match the path in the LMS: at /opt/webwork/webwork2/lib/WeBWorK/Authen/LTIAdvanced.pm line 379.https://testdrive.cas.ou.edu/webwork2/casit_test5/ at /opt/webwork/webwork2/lib/WeBWorK/Authen/LTIAdvanced.pm line 380.OAuth verification failed. Check the Consumer Secret and that the URL in the LMS exactly matches the WeBWorK URL as defined in site.conf. E.G. Check that if you have https in the LMS url then you have https in $server_root_url in site.conf at /opt/webwork/webwork2/lib/WeBWorK/Authen/LTIAdvanced.pm line 417.


The site.conf URL info:

$webwork_url       = '/webwork2';
$server_root_url   = 'https://testdrive.cas.ou.edu'; 

So the URL that we have in Canvas is:

https://testdrive.cas.ou.edu/webwork2 

Anyone have a thought?


In reply to Steven Marshall

Re: Canvas LTI

by John Zlater -

I have been tasked with setting up a WeBWork Server (2.16) and creating the LTI setup to use with Brightspace.

I have been wrestling with the same warning/issue with Brightspace D2L.  Can anyone please help?

  • The following path was reconstructed by WeBWorK. It should match the path in the LMS: at /opt/webwork/webwork2/lib/WeBWorK/Authen/LTIAdvanced.pm line 453.
  • https://webwork.pennhighlands.edu/webwork2/myTestCourse/ at /opt/webwork/webwork2/lib/WeBWorK/Authen/LTIAdvanced.pm line 454.
  • OAuth verification failed. Check the Consumer Secret and that the URL in the LMS exactly matches the WeBWorK URL as defined in site.conf. E.G. Check that if you have https in the LMS url then you have https in $server_root_url in site.conf at /opt/webwork/webwork2/lib/WeBWorK/Authen/LTIAdvanced.pm line 493.

I'm using the following in my authen_LTI.conf

#$external_auth = 1; (commented out as shown, I've tried both ways with the same result)

$preferred_source_of_username = "lis_person_contact_email_primary";

$strip_address_from_email = 1;

$preferred_source_of_student_id = "ext_d2l_orgdefinedid";

I've verified Secret multiple times

I have verified roles

  • roles => urn:lti:instrole:ims/lis/Student,Student,urn:lti:instrole:ims/lis/Learner,Learner

I have verified timing  is good (0)

  • ===== timestamp info =======
  • oauth_nonce = 1639595585
  • WW_server_time = 1639595585
  • diff(server-oauth) = 0 seconds (0 minutes)
  • ============================ at /opt/webwork/webwork2/lib/WeBWorK/Authen/LTIAdvanced.pm line 151.
I have verified that the $server_root_url is accurate in site.conf
and It matches the base URL of $LTIBasicToThisSiteURL, which also has the addition of the /webwork2 which matches the $webwork_url

Here is  the info from the log file for the course:

[Wed Dec 15 14:13:05 2021] LOGIN FAILED OAuth verification failed.  Check the Consumer Secret and that the URL in the LMS exactly matches the WeBWorK URL.a111a1 - authentication failed: 0 user_id=a111a1 login_type=normal credential_source=LTIAdvanced host=10.76.10.10 port=62621 UA=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36 Edg/96.0.1054.53

Tags:
In reply to John Zlater

Re: Canvas LTI

by John Zlater -
Update:
After turning on debugging in the constants.pm file, this is what I found in the debug log:

[Thu Dec 16 09:33:09.217232 2021] WeBWorK::Authen::LTIAdvanced::authenticate: LTIAdvanced::authenticate request-> verify failed
[Thu Dec 16 09:33:09.217336 2021] WeBWorK::Authen::LTIAdvanced::authenticate: OAuth verification Failed
[Thu Dec 16 09:33:09.217663 2021] WeBWorK::Authen::LTIAdvanced::verify_normal_user: auth_result=|0|
[Thu Dec 16 09:33:09.218007 2021] WeBWorK::Authen::write_log_entry: Writing to login log: 'LOGIN FAILED OAuth verification failed. Check the Consumer Secret and that the URL in the LMS exactly matches the WeBWorK URL.a111a1 - authentication failed: 0 user_id=a111a1 login_type=normal credential_source=LTIAdvanced host=x.x.x.x port=62134 UA=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36 Edg/96.0.1054.53'.
[Thu Dec 16 09:33:09.218821 2021] WeBWorK::Authen::verify: END VERIFY
[Thu Dec 16 09:33:09.218935 2021] WeBWorK::Authen::verify: result 0
[Thu Dec 16 09:33:09.219052 2021] WeBWorK::Authen::LTIAdvanced::verify: END LTIAdvanced VERIFY