Installation

D2L LTI

D2L LTI

by John Zlater -
Number of replies: 7

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

In reply to John Zlater

Re: D2L 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
In reply to John Zlater

Re: D2L LTI

by Danny Glin -

Do you have $debug_lti_parameters set to 1?  If so, you should see all of the parameters that D2L is sending to WeBWorK as a warning message.

When I initially set up LTI between D2L and WeBWorK I discovered that it didn't work if I left the consumer key blank, though I'm not sure if this is still the case.  WeBWorK doesn't use this for anything, so you can set it to any nonempty value.

All of my links on the D2L side include the trailing slash (e.g https://webwork.yourschool.edu/webwork2/yourcourse/).  I'm not sure if it handles the missing slash, but in my case it definitely works with it.

In reply to Danny Glin

Re: D2L LTI

by John Zlater -

Danny,

Thank you for the response!!! 

Yes, I do have debug_lti_parameter set to 1, that is where all of the items that are in red on my OP are from.

In my configuration, I have the Key and the Secret filled in on the Tool Provider but have the Tool Link set to use the Tool consumer secret.

I'll have the had the slash at the end and also not with the same results. I currently have the trailing slashes in place.  

Let me know if you have any other ideas let me know

Thanks,

John

In reply to John Zlater

Re: D2L LTI

by Danny Glin -
The only other thing that came to mind was to remove all special characters from your consumer secret (i.e. try something with just letters and numbers). I don't know if this will help with the LTI stuff, but there are other places in the code where this has caused issues.
In reply to Danny Glin

Re: D2L LTI

by John Zlater -
Danny,

Will Give it a try Thanks!!!

John
In reply to John Zlater

Re: D2L LTI

by John Zlater -
Danny,

Removing the special characters from the keys and secret definitely helped (Thank You) as I am getting past authentication and into the course.

I'm now getting a warning about the Homework sets
================================
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.

Not a link to a Problem Set and in homework grade mode. Links to WeBWorK should point to specific problem sets. at /opt/webwork/webwork2/lib/WeBWorK/Authen/LTIAdvanced/SubmitGrade.pm line 118.