Uploaded image for project: 'Moodle QA'
  1. Moodle QA
  2. MDLQA-16759 Moodle 4.1 QA
  3. MDLQA-17381

CLONE - Moodle sites can connect using MNet and SSL keys

    XMLWordPrintable

Details

    • Functional Test
    • Minor
    • None
    • Moodle 4.1
    • 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 integration master
        • site2 running Moodle 4.0 (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 big 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 big 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. 10 verified.png
          10 verified.png
          239 kB
        2. 12 verified.png
          12 verified.png
          496 kB
        3. 15 verified.png
          15 verified.png
          617 kB
        4. 2-4 verified.png
          2-4 verified.png
          713 kB
        5. 6 verified.png
          6 verified.png
          662 kB
        6. error when saving new public key.png
          error when saving new public key.png
          30 kB
        7. ip.png
          ip.png
          385 kB
        8. localhost.png
          localhost.png
          267 kB
        9. site2 10 verified.png
          site2 10 verified.png
          67 kB
        10. site2 12 verified.png
          site2 12 verified.png
          221 kB
        11. site2 15 verified.png
          site2 15 verified.png
          235 kB
        12. site2 2-4 verified.png
          site2 2-4 verified.png
          254 kB
        13. site2 6 verified.png
          site2 6 verified.png
          189 kB

        Issue Links

          Activity

            People

              stevani.andolo@moodle.com Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

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