-
Functional Test
-
Minor
-
None
-
Moodle 5.0
This is an exploratory test of a new feature or improvement, so please feel free to try anything you like and not just the test steps!
Prerequisites
- This test requires admin access and access to terminal to run CLI commands, as part of the testing will lock out a user from accessing the site.
- You will need a resource for testing SMS sending in AWS (if you are an HQ team member testing this, feel free to reach out to the Platform team who may be able to help with access to an AWS sandbox for testing).
Troubleshooting
IMPORTANT: If you 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
|
You can also reset user authentication factors:
- As admin go to Plugins > Multi-factor authentication > Reset user authentication factors
- Search by one user with authentication factors
- Click on button "Reset user factor"
- Finally, you must redo the user preferences setup for the SMS factor
Setup
- As admin go to Site administration > Plugins > Admin tools > Multi-factor authentication
- Enable the "MFA plugin enabled" setting and save changes.
SMS Sandbox setup
- 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 third party libraries
- As admin, go to Site administration > Development > Third party libraries
- Verify that the library "AWS SDK for PHP" exist.
- Verify that the library "JMESPath" exist.
Test Mobile phone SMS Authentication:
- As admin 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 enable the factor.
- Navigate to the settings for "SMS mobile phone" and make sure the secret validity is not 0.
- Navigate to Site administrator > plugins > SMS > Manage SMS gateways
- Click Create a new SMS gateway button.
- Fill all the fields using the AWS credentials created previously (access key and secret), we are not using user keychain for this, those settings can be ignored.
- Save changes.
- Confirm that you can see the newly created SMS Gateway.
- Navigate back to Site administration > plugins > admin tools > SMS
- Set "SMS gateway" to your newly created gateway.
- 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.
- Log out from your account.
- Confirm you can log in and can access your Moodle account.
- is a QA test written for
-
MDL-78509 Add Multi-factor authentication (MFA) plugin
-
- Closed
-