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

SMS subsystem MVP - project branch

XMLWordPrintable

    • MOODLE_405_STABLE
    • MOODLE_405_STABLE
    • MDL-81924-main
    • Hide

      When it comes to testing, this resource for testing SMS sending in AWS will likely come in handy: https://docs.aws.amazon.com/sns/latest/dg/sns-sms-sandbox.html

      Prerequisites

      To test this issue you'll need a Moodle that you have admin access to.

      You will need a resource for testing SMS sending in AWS.

      Having an admin account makes it easier to move through all of the test settings.
      If you don't have cli access to the instance make sure you have access to two separate admin accounts. As part of the testing, it will lock out a user.

      Set up your SMS Sandbox

      1. Access to https://signin.aws.amazon.com with your credentials.
      2. From your AWS Console go to Amazon SNS / Mobile / Text messaging(SMS) and enable it.
      3. Include some "Sandbox destination phone numbers"
      4. From Security credentials: create a new Access keys for this and save the "Key", "Secret" and Region for the configuration in Moodle. 

      More information about SMS sandbox can be found 

      Test Mobile phone SMS Authentication (upgrade):

      1. Stand up a Moodle instance using the 404 branch (Don't apply the patch yet).
      2. Log into your Moodle as admin user.
      3. Navigate to: Site administration > plugins > admin tools > Multi-factor authentication.
      4. Enable the "MFA plugin enabled" checkbox and save.
      5. Find "SMS mobile phone" in the list of factors and press Settings.
      6. Enable the factor and include the AWS credentials created earlier.
      7. Checkout to main and upgrade the site.
      8. Navigate to: Site administration > plugins > admin tools > Multi-factor authentication.
      9. Confirm you can see the new setting SMS gateway.
      10. Confirm the SMS gateway setting has the following option selected: MFA AWS (AWS).
      11. Navigate to: Site administration > plugins > SMS > Manage SMS Gateways.
      12. Confirm you can see the following gateway in the table: MFA AWS (AWS).
      13. Click the toggle to disable the gateway.
      14. Confirm you can see the notification that it's in use and can not be disabled.
      15. Click the Delete action to delete the gateway.
      16. Confirm you can see the notification that it's in use and can not be deleted.
      17. Click the Edit action to edit the gateway.
      18. Confirm you can see the same credentials you previously set up in MFA (to confirm they migrated successfully).
      19. Access your user preferences / "Multi-factor authentication preferences".
      20. Set up the "SMS mobile phone" factor with a test phone number (it will need to be a real one, which needs to be added to the allowed list of numbers within AWS to ensure you can reveive messages).
      21. Confirm you have received an SMS to your phone number.
      22. Enter the code you received where prompted in Moodle and continue. 
      23. Open another browser and access Moodle with your user.
      24. Enter your username and password.
      25. Confirm a new screen will be displayed where it will ask for the Mobile phone SMS.
      26. Confirm you have received an SMS on your mobile. 
      27. Enter the code in the box and click on verify code.
      28. Confirm you have been logged successfully and you have access to Moodle.
      29. Once logged in as admin, open notifications and confirm that you received the notification about the migration of the SMS gateway instance.

      Test Mobile phone SMS Authentication (fresh install):

      1. Stand up a Moodle main (4.5) instance using this patch.
      2. Access to your Moodle as admin user.
      3. Navigate to: Site administration > plugins > admin tools > Multi-factor authentication.
      4. Enable the "MFA plugin enabled" checkbox and save.
      5. Find "SMS mobile phone" in the list of factors and press Settings.
      6. Confirm you are prompted to set up an SMS gateway.
      7. Follow the link "set up an SMS gateway".
      8. Click Create a new SMS gateway button.
      9. Fill all the fields using the AWS credentials created previously.
      10. Save changes.
      11. Confirm you are redirected back to the SMS mobile phone settings for MFA, and config options are now available.
      12. Navigate to: Site administration > plugins > SMS > Manage SMS Gateways.
      13. Click the toggle to disable the gateway.
      14. Confirm that the gateway is disabled.
      15. Click the Edit action.
      16. Change the name of the gateway.
      17. Confirm that the gateway is updated with the new name.
      18. Click the Delete action.
      19. Select continue button in the dialogue.
      20. Confirm that the gateway is deleted.
      21. Create another SMS gateway using the same credentials.
      22. Navigate to: Site administration > plugins > admin tools > Multi-factor authentication.
      23. Find "SMS mobile phone" in the list of factors and press Settings.
      24. Confirm you can see the newly created SMS gateway in the list of SMS gateways.
      25. Select the created SMS gateway in the SMS gateway setting.
      26. Enable the factor and confirm you can then set the factor weight and secret validity duration.
      27. Fill those with the default values and save changes.
      28. Access your user preferences / "Multi-factor authentication preferences".
      29. Set up the "Mobile phone SMS" factor with a test phone number.
      30. Confirm you have received an SMS to your phone number.
      31. Enter the code you received and continue. 
      32. Confirm you are logged in and can access your Moodle account.

      NOTE: If you mess things up and locked yourself out, you can disable the whole MFA plugin from the CLI:

      php admin/cli/cfg.php --component=tool_mfa --name=enabled --set=0

       

      Show
      When it comes to testing, this resource for testing SMS sending in AWS will likely come in handy: https://docs.aws.amazon.com/sns/latest/dg/sns-sms-sandbox.html Prerequisites To test this issue you'll need a Moodle that you have admin access to. You will need a resource for testing SMS sending in AWS. Having an admin account makes it easier to move through all of the test settings. If you don't have cli access to the instance make sure you have access to two separate admin accounts. As part of the testing, it will lock out a user. Set up your SMS Sandbox Access to https://signin.aws.amazon.com with your credentials. From your AWS Console go to Amazon SNS / Mobile / Text messaging(SMS) and enable it. Include some "Sandbox destination phone numbers" From Security credentials: create a new Access keys for this and save the "Key", "Secret" and Region for the configuration in Moodle.  More information about SMS sandbox can be found  https://aws.amazon.com/blogs/compute/introducing-the-sms-sandbox-for-amazon-sns/ https://docs.aws.amazon.com/sns/latest/dg/sns-sms-sandbox-verifying-phone-numbers.html https://docs.aws.amazon.com/sns/latest/dg/sns-getting-started.html Test Mobile phone SMS Authentication (upgrade): Stand up a Moodle instance using the 404 branch (Don't apply the patch yet). Log into your Moodle as admin user. Navigate to: Site administration > plugins > admin tools > Multi-factor authentication. Enable the "MFA plugin enabled" checkbox and save. Find "SMS mobile phone" in the list of factors and press Settings. Enable the factor and include the AWS credentials created earlier. Checkout to main and upgrade the site. Navigate to: Site administration > plugins > admin tools > Multi-factor authentication. Confirm you can see the new setting SMS gateway. Confirm the SMS gateway setting has the following option selected: MFA AWS (AWS). Navigate to: Site administration > plugins > SMS > Manage SMS Gateways. Confirm you can see the following gateway in the table: MFA AWS (AWS). Click the toggle to disable the gateway. Confirm you can see the notification that it's in use and can not be disabled. Click the Delete action to delete the gateway. Confirm you can see the notification that it's in use and can not be deleted. Click the Edit action to edit the gateway. Confirm you can see the same credentials you previously set up in MFA (to confirm they migrated successfully). Access your user preferences / "Multi-factor authentication preferences". Set up the "SMS mobile phone" factor with a test phone number (it will need to be a real one, which needs to be added to the allowed list of numbers within AWS to ensure you can reveive messages). C onfirm you have received an SMS to your phone number. Enter the code you received where prompted in Moodle and continue.  Open another browser and access Moodle with your user. Enter your username and password. C onfirm a new screen will be displayed where it will ask for the Mobile phone SMS. C onfirm you have received an SMS on your mobile.  Enter the code in the box and click on verify code. C onfirm you have been logged successfully and you have access to Moodle. Once logged in as admin, open notifications and confirm that you received the notification about the migration of the SMS gateway instance. Test Mobile phone SMS Authentication (fresh install): Stand up a Moodle main (4.5) instance using this patch. Access to your Moodle as admin user. Navigate to: Site administration > plugins > admin tools > Multi-factor authentication. Enable the "MFA plugin enabled" checkbox and save. Find "SMS mobile phone" in the list of factors and press Settings. Confirm you are prompted to set up an SMS gateway. Follow the link "set up an SMS gateway". Click Create a new SMS gateway button. Fill all the fields using the AWS credentials created previously. Save changes. Confirm you are redirected back to the SMS mobile phone settings for MFA, and config options are now available. Navigate to: Site administration > plugins > SMS > Manage SMS Gateways. Click the toggle to disable the gateway. Confirm that the gateway is disabled. Click the Edit action. Change the name of the gateway. Confirm that the gateway is updated with the new name. Click the Delete action. Select continue button in the dialogue. Confirm that the gateway is deleted. Create another SMS gateway using the same credentials. Navigate to: Site administration > plugins > admin tools > Multi-factor authentication. Find "SMS mobile phone" in the list of factors and press Settings. Confirm you can see the newly created SMS gateway in the list of SMS gateways. Select the created SMS gateway in the SMS gateway setting. Enable the factor and confirm you can then set the factor weight and secret validity duration. Fill those with the default values and save changes. Access your user preferences / "Multi-factor authentication preferences". Set up the "Mobile phone SMS" factor with a test phone number. Confirm you have received an SMS to your phone number. Enter the code you received and continue.  Confirm you are logged in and can access your Moodle account. NOTE: If you mess things up and locked yourself out, you can disable the whole MFA plugin from the CLI : php admin/cli/cfg.php --component=tool_mfa --name=enabled --set=0  
    • 10
    • Team Hedgehog 2024 Sprint 3.1, Team Hedgehog 2024 Sprint 3.2, Team Hedgehog 2024 Sprint 3.3

      This issue captures the project branch for the initial pieces of work on the SMS subsystem, which will be collected to be integrated together when the MVP is prepared. This includes:

      1. SMS API skeleton / base implementation.
      2. AWS SMS gateway plugin.
      3. Updating the MFA SMS factor to use the new AWS gateway plugin, and migrating any existing AWS config admins have setup within SMS MFA into a new SMS gateway (and sending a notification of the migration to admins).
      4. Initial admin UI to create and configure gateway instances.
      5. Removal of any old / now unused SMS implementation (eg superseded MFA code).

      All of the issues linked as blockers on this issue will be collected in a single branch here, ready for integration. The assignee on the issue will then be able to make any required changes based on integration review.

        1. test-1-12.png
          test-1-12.png
          18 kB
        2. test-1-16.png
          test-1-16.png
          36 kB
        3. test-1-18.png
          test-1-18.png
          88 kB
        4. test-1-21.png
          test-1-21.png
          33 kB
        5. test-1-25.png
          test-1-25.png
          54 kB
        6. test-1-28.png
          test-1-28.png
          44 kB
        7. test-1-29.png
          test-1-29.png
          58 kB
        8. test-1-9 and 10.png
          test-1-9 and 10.png
          105 kB
        9. test-2-11.png
          test-2-11.png
          59 kB
        10. test-2-14.png
          test-2-14.png
          26 kB
        11. test-2-17.png
          test-2-17.png
          22 kB
        12. test-2-20.png
          test-2-20.png
          19 kB
        13. test-2-24.png
          test-2-24.png
          71 kB
        14. test-2-26.png
          test-2-26.png
          88 kB
        15. test-2-30.png
          test-2-30.png
          44 kB
        16. test-2-32.png
          test-2-32.png
          54 kB
        17. test-2-6.png
          test-2-6.png
          36 kB

            michaelh Michael Hawkins
            michaelh Michael Hawkins
            Safat Shahin Safat Shahin
            Huong Nguyen Huong Nguyen
            David Woloszyn David Woloszyn
            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 - 1 week, 5 hours, 39 minutes
                1w 5h 39m

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