Uploaded image for project: 'Moodle QA'
  1. Moodle QA
  2. MDLQA-17933 Moodle 4.3 QA
  3. MDLQA-18420

CLONE - Moodle sites can connect using MNet and SSL keys

    XMLWordPrintable

Details

    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

        1. scenario1_step-3-and-4.png
          scenario1_step-3-and-4.png
          134 kB
        2. scenario2_step-12.png
          scenario2_step-12.png
          85 kB
        3. scenario2_step-6.png
          scenario2_step-6.png
          91 kB
        4. scenario1_step-12.png
          scenario1_step-12.png
          85 kB
        5. scenario1_step-15.png
          scenario1_step-15.png
          145 kB
        6. scenario1_step-6_unexpected.png
          scenario1_step-6_unexpected.png
          92 kB
        7. scenario2_step-15.png
          scenario2_step-15.png
          132 kB
        8. scenario2_step-3-and-4.png
          scenario2_step-3-and-4.png
          118 kB
        9. scenario1_step-10.png
          scenario1_step-10.png
          348 kB
        10. scenario2_step-10.png
          scenario2_step-10.png
          674 kB
        11. scenario1_step-6.png
          scenario1_step-6.png
          892 kB

        Activity

          People

            david.woloszyn@moodle.com David Woloszyn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Clockify

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