Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-67612

tool_consumer_instance_guid specific to moodle installation

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Prerequisite:

      The site must be accesible from Internet, over SSL (you can use ngrok for that), and surely will need to also set $CFG->sslproxy = true; in config.php.

      Install a new LTI Tool using Default OrgId as Site ID

      Note: This could be tested with any LTI 1.1 or 1.3 tool.

      1. Site is configured with at least one course
      2. ZTest tool 1.3 is installed as a site external tool:
        1. Log in as an administrator
        2. Navigate to Site Administration > Plugins > External tool > Manage tools
        3. Click on configure a tool manually
        4. Fill the form as follow:
          1. Tool name: ZTest 1.3
          2. Tool url: https://ztest.cengage.info/ztest/lti
        5. LTI Version: LTI 1.3
        6. Public key: copy the value from https://ztest.cengage.info/ztest/ LTI 1.3 Connect info tab
        7. Initiate Login URI: https://ztest.cengage.info/ztest/ws/lti/startlaunch?lti13=true&client_id=CLIENT_ID_HERE&platform=moodle
        8. Redirect URI: https://ztest.cengage.info/ztest/lti13
        9. Click on ‘Show more’
        10. Check Content-Item message
        11. Expand the Miscellaneous section
          1. VERIFY Organization Id Default is visible
          2. VERIFY it is set to Site ID, the other option being Site URL
          3. Keep the option as Site ID
        12. Save changes.

      Launch contains the platform guid as the Site ID

      1. As instructor, log to a course
      2. Turn editing ON
      3. Click Add an activity or resource and select external tool
      4. On the Add external tool page, select ZTest 13 tool for preconfigured tool
      5. Click on Select Content
      6. In the modal:
        1. VERIFY in the ID_Token:
          1. https://purl.imsglobal.org/spec/lti/claim/tool_platform->guid is not the hostname of the moodle site but some guid like string

      Update  LTI Tool to use Default OrgId as Site URL

      1. Log in as an administrator
      2. Navigate to Site Administration > Plugins > External tool > Manage tools
      3. Edit the ZTest tool installed in the first step and modify the default Organization Id to be Site URL
      4. Save Changes
      5. As instructor, log to a course
      6. Turn editing ON
      7. Click Add an activity or resource and select external tool
      8. On the Add external tool page, select ZTest 13 tool for preconfigured tool
      9. Click on Select Content
      10. In the modal:
        1. VERIFY in the ID_Token:
          1. https://purl.imsglobal.org/spec/lti/claim/tool_platform->guid is the hostname of the moodle site

      Update  LTI Tool to use Custom OrgId

      1. Log in as an administrator
      2. Navigate to Site Administration > Plugins > External tool > Manage tools
      3. Edit the ZTest tool installed in the first step and enter an  Organization Id: 'Custom Org Id'
      4. Save Changes
      5. As instructor, log to a course
      6. Turn editing ON
      7. Click Add an activity or resource and select external tool
      8. On the Add external tool page, select ZTest 13 tool for preconfigured tool
      9. Click on Select Content
      10. In the modal:
        1. VERIFY in the ID_Token:
          1. https://purl.imsglobal.org/spec/lti/claim/tool_platform->guid is 'Custom Org Id'
      Show
      Prerequisite: The site must be accesible from Internet, over SSL (you can use ngrok for that), and surely will need to also set $CFG->sslproxy = true; in config.php. Install a new LTI Tool using Default OrgId as Site ID Note: This could be tested with any LTI 1.1 or 1.3 tool. Site is configured with at least one course ZTest tool 1.3 is installed as a site external tool: Log in as an administrator Navigate to Site Administration > Plugins > External tool > Manage tools Click on configure a tool manually Fill the form as follow: Tool name: ZTest 1.3 Tool url: https://ztest.cengage.info/ztest/lti LTI Version: LTI 1.3 Public key: copy the value from https://ztest.cengage.info/ztest/ LTI 1.3 Connect info tab Initiate Login URI: https://ztest.cengage.info/ztest/ws/lti/startlaunch?lti13=true&client_id=CLIENT_ID_HERE&platform=moodle Redirect URI: https://ztest.cengage.info/ztest/lti13 Click on ‘Show more’ Check Content-Item message Expand the Miscellaneous section VERIFY Organization Id Default is visible VERIFY it is set to Site ID, the other option being Site URL Keep the option as Site ID Save changes. Launch contains the platform guid as the Site ID As instructor, log to a course Turn editing ON Click Add an activity or resource and select external tool On the Add external tool page, select ZTest 13 tool for preconfigured tool Click on Select Content In the modal: VERIFY in the ID_Token: https://purl.imsglobal.org/spec/lti/claim/tool_platform- >guid is not the hostname of the moodle site but some guid like string Update  LTI Tool to use Default OrgId as Site URL Log in as an administrator Navigate to Site Administration > Plugins > External tool > Manage tools Edit the ZTest tool installed in the first step and modify the default Organization Id to be Site URL Save Changes As instructor, log to a course Turn editing ON Click Add an activity or resource and select external tool On the Add external tool page, select ZTest 13 tool for preconfigured tool Click on Select Content In the modal: VERIFY in the ID_Token: https://purl.imsglobal.org/spec/lti/claim/tool_platform- >guid is the hostname of the moodle site Update  LTI Tool to use Custom OrgId Log in as an administrator Navigate to Site Administration > Plugins > External tool > Manage tools Edit the ZTest tool installed in the first step and enter an  Organization Id: 'Custom Org Id' Save Changes As instructor, log to a course Turn editing ON Click Add an activity or resource and select external tool On the Add external tool page, select ZTest 13 tool for preconfigured tool Click on Select Content In the modal: VERIFY in the ID_Token: https://purl.imsglobal.org/spec/lti/claim/tool_platform- >guid is 'Custom Org Id'
    • Affected Branches:
      MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_39_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-67612-tcguid

      Description

      As a tool, I want to be able to scope context and user ids by tool_consumer_instance_guid.

      The current LTI implementation uses the site host as the tool_consumer_instance_guid, for example moodle.myuni.edu. When a site gets re-installed, for example at the end of term (as per guideline https://docs.moodle.org/38/en/Year-end_procedures#Make_a_new_Moodle), the hostname remains the same, but all the ids for courses and users are reset. It is therefore impossible for tools to know if a context or user is always representing the same entity. A tool has either to coordinate with the institution to reset on both sides, or apply heuristics based on the other user's data (name) to detect a change, causing a lot of work for administrators on both side, and introducing the risk of account swap (user entering a tool under another user's account).

      The proposed change is to have the tool_consumer_instance_guid be the site id and thus change on re-install, allowing the tool to uniquely map a user per (tool_consumer_instance_guid, user_id) and a context by (tool_consumer_instance_guid, context_id).

      The change should not impact existing tools, as those may already rely on the current value of tool_consumer_instance_guid.

      This issue was already reported under MDL-35492.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              claudevervoort Claude Vervoort
              Reporter:
              claudevervoort Claude Vervoort
              Peer reviewer:
              Mathew May
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Janelle Barcega
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/Jun/20

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours, 20 minutes
                  4h 20m