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

Create UI for SMS gateway instance management

XMLWordPrintable

    • MOODLE_405_STABLE
    • MDL-81732-main-2
    • 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. Access to your Moodle as admin user.
      3. Navigate to: Site administration > plugins > administration tools > Multi-factor authentication.
      4. Enable the "MFA plugin enabled" Checkbox.
      5. Go to "SMS mobile phone".
      6. Enable the factor and include the AWS credentials created before.
      7. Apply the patch and upgrade the site.
      8. Navigate to: Site administration > plugins > administration 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 had set up in MFA.
      19. Access to your user preferences / "Multi-factor authentication preferences".
      20. Set up the "SMS mobile phone" factor with a test phone number.
      21. Confirm you have received an SMS in your phone number.
      22. Enter the code you received 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 login successfully and you have access to Moodle.

      Test Mobile phone SMS Authentication (fresh install):

      1. Stand up a Moodle instance using this patch.
      2. Access to your Moodle as admin user.
      3. Navigate to: Site administration > plugins > SMS > Manage SMS Gateways.
      4. Click Create a new SMS gateway button.
      5. Fill all the fields using the AWS credentials created initially.
      6. Save changes.
      7. Click the toggle to disable the gateway.
      8. Confirm that the gateway is disabled.
      9. Click the Edit action.
      10. Change the name of the gateway.
      11. Confirm that the gateway is updated with the new name.
      12. Click the Delete action
      13. Select continue button in the dialogue.
      14. Confirm that the gateway is deleted.
      15. Create another SMS gateway using the same credentials.
      16. Navigate to: Site administration > plugins > administration tools > Multi-factor authentication.
      17. Enable the "MFA plugin enabled" Checkbox.
      18. Confirm you can see the new setting SMS gateway.
      19. Select the created SMS gateway in the SMS gateway setting.
      20. Save changes.
      21. Access to your user preferences / "Multi-factor authentication preferences".
      22. Set up "Mobile phone SMS" factor with a test phone number.
      23. Confirm you have received an SMS in your phone number.
      24. Enter the code you received and continue. 

       

      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

      Note2: Reset user authentication factors

      1. Access to your Moodle as admin user
      2. Go to "Plugins" / Multi-factor authentication / Reset user authentication factors
      3. Search by one user with authentication factors
      4. Click on button "Reset user factor"
      1. Open another browser and access to Moodle with your user.
      2. Enter your username and password.
      3. Confirm a new screen will be display where it will ask for the Mobile phone SMS.
      4. Confirm you have received an SMS in your mobile. 
      5. Enter the code in the box and click on verify code.
      6. Confirm you have been login successfully and you have access to Moodle.
      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). Access to your Moodle as admin user. Navigate to: Site administration > plugins > administration tools > Multi-factor authentication. Enable the "MFA plugin enabled" Checkbox. Go to "SMS mobile phone". Enable the factor and include the AWS credentials created before. Apply the patch and upgrade the site. Navigate to: Site administration > plugins > administration 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 had set up in MFA. Access to your user preferences / "Multi-factor authentication preferences". Set up the "SMS mobile phone" factor with a test phone number. C onfirm you have received an SMS in your phone number. Enter the code you received 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 login successfully and you have access to Moodle. Test Mobile phone SMS Authentication (fresh install): Stand up a Moodle instance using this patch. Access to your Moodle as admin user. Navigate to: Site administration > plugins > SMS > Manage SMS Gateways. Click Create a new SMS gateway button. Fill all the fields using the AWS credentials created initially. Save changes. 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 > administration tools > Multi-factor authentication. Enable the "MFA plugin enabled" Checkbox. Confirm you can see the new setting SMS gateway. Select the created SMS gateway in the SMS gateway setting. Save changes. Access to your user preferences / "Multi-factor authentication preferences". Set up "Mobile phone SMS" factor with a test phone number. Confirm you have received an SMS in your phone number. Enter the code you received and continue.    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 Note2: Reset user authentication factors Access to your Moodle as admin user Go to "Plugins" / Multi-factor authentication / Reset user authentication factors Search by one user with authentication factors Click on button "Reset user factor" Open another browser and access to Moodle with your user. Enter your username and password. C onfirm a new screen will be display where it will ask for the Mobile phone SMS. C onfirm you have received an SMS in your mobile.  Enter the code in the box and click on verify code. C onfirm you have been login successfully and you have access to Moodle.
    • 10
    • Team Hedgehog 2024 Sprint 2.1, Team Hedgehog 2024 Sprint 2.2, Team Hedgehog 2024 Sprint 2.3, Team Hedgehog 2024 Review 2, Team Hedgehog 2024 Sprint 3.1

      SMS subsystem introduced SMS gateway plugin and administrators now can create multiple instances of SMS gateways for different SMS providers.

      Site admins should be able to create, update, and delete instances of an SMS gateway and add the configuration of that gateway (which should be rendered from the selected SMS gateway plugin) and also, disable the one without deleting.

      The records of this page should be stored in the sms_gateways table. We won't need any cap check for this as it will be an admin page.

       

      Figma: https://www.figma.com/proto/KerTJrvvFPE652p9PNxyNX/MDL-79808---SMS-Gateway?page-id=0%3A1&node-id=22-3421&viewport=-149%2C8%2C0.1&t=QR4BKGQWFpEoUJxp-1&scaling=min-zoom&starting-point-node-id=22%3A3421

       

        1. sms_1.png
          sms_1.png
          78 kB
        2. sms_10.png
          sms_10.png
          78 kB
        3. sms_11.png
          sms_11.png
          112 kB
        4. sms_12.png
          sms_12.png
          85 kB
        5. sms_13.png
          sms_13.png
          114 kB
        6. sms_2.1.png
          sms_2.1.png
          73 kB
        7. sms_2.png
          sms_2.png
          73 kB
        8. sms_4.png
          sms_4.png
          73 kB
        9. sms_8.png
          sms_8.png
          90 kB
        10. sms_9.png
          sms_9.png
          91 kB

            safat.shahin@moodle.com Safat Shahin
            safat.shahin@moodle.com Safat Shahin
            Michael Hawkins Michael Hawkins
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 weeks, 3 days, 36 minutes
                2w 3d 36m

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