Uploaded image for project: 'Moodle QA'
  1. Moodle QA
  2. MDLQA-1 Moodle QA testing
  3. MDLQA-17378

Moodle sites can connect using MNet and SSL keys

    XMLWordPrintable

Details

    • Functional Test
    • Minor
    • None
    • Original - DO NOT REPORT TEST RESULTS HERE
    • MNet

    Description

      The goal of this test is to ensure that it is possible to swap SSL keys between two Moodle sites using MNet.

      Pre-requisites

      • This test needs to be executed on both the minimum and the maximum PHP supported versions for the master branch (for example, for Moodle 4.2dev, PHP 8.0 and PHP 8.1).

      Testing SSL key swap (Moodle <==> Moodle key-swapping)

      Please note: it's possible that you see some notices during the setup part depending of the debugging levels in your site. You can ignore them as far as the configuration works as expected.

      1. Setup a couple of Moodle sites:
        • site1 running the version to be released (master).
        • site2 running older version, for example: Moodle 4.0.x (MOODLE_400_STABLE).
      2. Ensure that they have different $CFG->sessioncookiepath setting either on config.php or in Administration > Server > Session handling
      3. In both sites, enable and configure MNet as explained in the doc page.
      4. - Please note: You don't need to configure the "remote enrolments" steps, only the "get users roaming" ones.
      5. Use two different browsers to test this.
      6. Logged in as admins in both sites.

      Testing scenario: "site1" examines "site2" public key.

      1. In "site1" go to Admin -> Networking -> Peers -> "site2".
      2. Verify that you see a form, with the name of "site2", its URL and other fields.
      3. Verify that there is a bit text field with a Public key.
      4. Verify that there isn't any error shown about the key being incorrect.
      5. Edit the public key and change some char. Save changes.
      6. Verify that you're redirected back to the form and you see the error: "The key is not a valid SSL key."
      7. In "site1" go to go to Admin -> Networking -> Peers -> "site2" again.
      8. In "site2" go to Admin -> Networking -> Settings.
      9. Click on "Delete key" and confirm the deletion (in an ugly page).
      10. Verify that you see "Your key has been successfully deleted and replaced."
      11. Back to "site1" refresh the page.
      12. Verify that now you see the message "The public key you are holding for this host is different from the public key it is currently publishing".
      13. Copy the new public key that is available under the message above and paste it in the "public key" field of the form. Save changes.
      14. In "site1" go to go to Admin -> Networking -> Peers -> "site2" again.
      15. Verify that there isn't any error shown about the key being incorrect.

      Testing scenario: "site2" examines "site1" public key.

      1. In "site2" go to Admin -> Networking -> Peers -> "site1".
      2. Verify that you see a form, with the name of "site1", its URL and other fields.
      3. Verify that there is a bit text field with a Public key.
      4. Verify that there isn't any error shown about the key being incorrect.
      5. Edit the public key and change some char. Save changes.
      6. Verify that you're redirected back to the form and you see the error: "The key is not a valid SSL key."
      7. In "site2" go to go to Admin -> Networking -> Peers -> "site1" again.
      8. In "site1" go to Admin -> Networking -> Settings.
      9. Click on "Delete key" and confirm the deletion (in an ugly page).
      10. Verify that you see "Your key has been successfully deleted and replaced."
      11. Back to "site2" refresh the page.
      12. Verify that now you see the message "The public key you are holding for this host is different from the public key it is currently publishing".
      13. Copy the new public key that is available under the message above and paste it in the "public key" field of the form. Save changes.
      14. In "site2" go to go to Admin -> Networking -> Peers -> "site1" again.
      15. Verify that there isn't any error shown about the key being incorrect.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Clockify

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.