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

Remove auth_mnet plugin from core in Moodle 5.0

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 5.0
    • MNet
    • MOODLE_500_STABLE
    • MDL-84307-M404_privacy-provider
    • MDL-84307-M405_privacy-provider
    • MDL-84307_remove-auth_mnet-plugin-from-core-in-moodle50
    • Hide

      Testing scenario 1: Upgrade without the auth_mnet plugin present

      1. Start with a non-patched version of Moodle
      2. Apply the patch of this issue
      3. Upgrade Moodle
      4. Log in as an admin
      5. Go to Site Administration> Plugins > Plugins Overview.
      6. Verify there is no longer a mention of 'MNet authentication'

      Testing scenario 2: Upgrade with the auth_mnet plugin present

      The goal of this test is to ensure that it is possible for Moodle users to connect with another Moodle site using MNet.

      Setup

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

      1. Setup a couple of Moodle sites:
        • site1 running an older version, for example: Moodle 4.4.x (MOODLE_404_STABLE).
        • site2 running the version to be released (main).
      2. In the file /etc/ssl/openssl.cnf search for the section openssl_init and make the following changes, so this part of the file looks like the following:

        [openssl_init]
        providers = provider_sect
         
        [provider_sect]
        default = default_sect
        legacy = legacy_sect
         
        [default_sect]
        activate = 1
         
        [legacy_sect]
        activate = 1
        

      3. Run the following command and verify it does not throw an error:

        echo -ne "test" | openssl rc4-40 -K 7465737473 -nosalt -e -nopad | xxd
        

      4. Make sure you have basic network connectivity between the two sites.  eg. you can curl/wget the URL for site1 from site2 and vice versa
      5. Make sure that the IP and port of both sites are not blocked. Navigate to: Administration > Security > HTTP security and make sure the site IP and ports are not in "cURL blocked hosts list " and "cURL allowed ports list ". (you can just clear both lists)
      6. Ensure that they have different $CFG->sessioncookiepath settings either on config.php or in Site Administration > Server > Session handling
      7. In both sites, enable and configure MNet as explained in the doc page.
      8. Please note: You don't need to configure the "remote enrolments" steps, only the "get users roaming" ones.
      9. Create user1 in site1 and user2 in site2.

      Testing

      1. Start with a non-patched version of Moodle
      2. Enable MNet in Site Administration > General > Advanced features and set "Networking" to On.
      3. Enable "MNet Authentication" in Site Administration > Plugins > Manage authentication
      4. Install the main branch of the following plugin: https://github.com/moodlehq/moodle-auth_mnet:

        git clone https://github.com/moodlehq/moodle-auth_mnet.git auth/mnet

      5. Install the main branch of the following plugin: https://github.com/moodlehq/moodle-block_mnet_hosts:

        git clone https://github.com/moodlehq/moodle-block_mnet_hosts.git blocks/mnet_hosts

      6. Apply the patch of this issue
      7. Upgrade Moodle
      8. Log in as an admin on site2
      9. Go to Site Administration> Plugins > Plugins Overview.
      10. Verify there is still a mention of 'MNet authentication'
      11. Log in as user1 in site1 and go to "Site home".
      12. In the "Network servers" block (that has been added as per the configuration instructions, click on site2.
      13. Verify that now you are welcome to site2 as user1.
      14. Log in as user2 in site2 and go to "Site home".
      15. In the "Network servers" block (that has been added as per the configuration instructions, click on site1.
      16. Verify that now you are welcome to site1 as user2.
      17. Verify that now user1 and user2 do exist in both sites and SSO/roaming between them works as expected.
      Show
      Testing scenario 1: Upgrade without the auth_mnet plugin present Start with a non-patched version of Moodle Apply the patch of this issue Upgrade Moodle Log in as an admin Go to Site Administration> Plugins > Plugins Overview . Verify there is no longer a mention of 'MNet authentication' Testing scenario 2: Upgrade with the auth_mnet plugin present The goal of this test is to ensure that it is possible for Moodle users to connect with another Moodle site using MNet. Setup Please note: it's possible that you see some notices during the setup part depending on the debugging levels in your site. You can ignore them as long as the configuration works as expected. Setup a couple of Moodle sites: site1 running an older version, for example: Moodle 4.4.x (MOODLE_404_STABLE). site2 running the version to be released (main). In the file /etc/ssl/openssl.cnf search for the section openssl_init and make the following changes, so this part of the file looks like the following: [openssl_init] providers = provider_sect   [provider_sect] default = default_sect legacy = legacy_sect   [default_sect] activate = 1   [legacy_sect] activate = 1 Run the following command and verify it does not throw an error: echo -ne "test" | openssl rc4-40 -K 7465737473 -nosalt -e -nopad | xxd Make sure you have basic network connectivity between the two sites.  eg. you can curl/wget the URL for site1 from site2 and vice versa Make sure that the IP and port of both sites are not blocked. Navigate to: Administration > Security > HTTP security and make sure the site IP and ports are not in "cURL blocked hosts list " and "cURL allowed ports list ". (you can just clear both lists) Ensure that they have different $CFG->sessioncookiepath settings either on config.php or in Site Administration > Server > Session handling In both sites, enable and configure MNet as explained in the doc page. Please note: You don't need to configure the "remote enrolments" steps, only the "get users roaming" ones. Create user1 in site1 and user2 in site2 . Testing Start with a non-patched version of Moodle Enable MNet in Site Administration > General > Advanced features and set "Networking" to On . Enable "MNet Authentication" in Site Administration > Plugins > Manage authentication Install the main branch of the following plugin: https://github.com/moodlehq/moodle-auth_mnet : git clone https://github.com/moodlehq/moodle-auth_mnet.git auth/mnet Install the main branch of the following plugin: https://github.com/moodlehq/moodle-block_mnet_hosts : git clone https://github.com/moodlehq/moodle-block_mnet_hosts.git blocks/mnet_hosts Apply the patch of this issue Upgrade Moodle Log in as an admin on site2 Go to Site Administration> Plugins > Plugins Overview . Verify there is still a mention of 'MNet authentication' Log in as user1 in site1 and go to "Site home". In the "Network servers" block (that has been added as per the configuration instructions, click on site2 . Verify that now you are welcome to site2 as user1. Log in as user2 in site2 and go to "Site home". In the "Network servers" block (that has been added as per the configuration instructions, click on site1 . Verify that now you are welcome to site1 as user2 . Verify that now user1 and user2 do exist in both sites and SSO/roaming between them works as expected.
    • Hide

      Code verified against automated checks.

      Checked MDL-84307 using repository: https://github.com/ziegenberg/moodle

      More information about this report

      Built on: Mon Feb 10 07:58:14 AM UTC 2025

      Show
      Code verified against automated checks. Checked MDL-84307 using repository: https://github.com/ziegenberg/moodle MOODLE_404_STABLE (0 errors / 0 warnings) [branch: MDL-84307-M404_privacy-provider | CI Job ] MOODLE_405_STABLE (0 errors / 0 warnings) [branch: MDL-84307-M405_privacy-provider | CI Job ] main (0 errors / 0 warnings) [branch: MDL-84307_remove-auth_mnet-plugin-from-core-in-moodle50 | CI Job ] More information about this report Built on: Mon Feb 10 07:58:14 AM UTC 2025
    • Hide

      Launching automatic jobs for branch MDL-84307-M404_privacy-provider

      Launching automatic jobs for branch MDL-84307-M405_privacy-provider

      Launching automatic jobs for branch MDL-84307_remove-auth_mnet-plugin-from-core-in-moodle50

      Built on: Tue Feb 11 12:30:25 AM UTC 2025

      Show
      Launching automatic jobs for branch MDL-84307 -M404_privacy-provider https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/18231/ PHPUnit (sqlsrv) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62270/ Behat (NonJS - boost and classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62271/ Behat (Firefox - boost) Launching automatic jobs for branch MDL-84307 -M405_privacy-provider https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/18232/ PHPUnit (sqlsrv) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62272/ Behat (NonJS - boost and classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62273/ Behat (Firefox - boost) Launching automatic jobs for branch MDL-84307 _remove-auth_mnet-plugin-from-core-in-moodle50 https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/18233/ PHPUnit (sqlsrv) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62274/ Behat (NonJS - boost and classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62275/ Behat (Firefox - boost) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62276/ Behat (Firefox - classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/62277/ App tests (stable app version) Built on: Tue Feb 11 12:30:25 AM UTC 2025

      MNet has been deprecated for many years now. The removal of MNet will start with removing MNet plugins according to the plugin removal process.

      Related tasks

      TODO-1: Announced in the following places:

      TODO-2: extract the code from Moodle LMS and place it into its own Git repository, marking it as archived

            Daniel Ziegenberg Daniel Ziegenberg
            Daniel Ziegenberg Daniel Ziegenberg
            David Woloszyn David Woloszyn
            Safat Shahin Safat Shahin
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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