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

Upgrade JMESPath to 2.7.0

XMLWordPrintable

    • MOODLE_405_STABLE
    • MOODLE_405_STABLE
    • MDL-80641_upgrade-jmespath
    • Hide

      Instructions copied from MDL-78511.

      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 will lock out a user.

      Setup

      More detailed setup instructions for MFA testing can be found in MDL-78509, the following setup are just the basics and there is some assumed knowledge.

      Third party libraries 

      1. Apply the patch and upgrade
      2. Login as admin.
      3. Navigate to: Site administration > plugins > administration tools > Multi-factor authentication
      4. Enable the "MFA plugin enabled" Checkbox

      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 third party libraries

      1. As admin, go to "Site administration" / "Development" / "Third party libraries
      2. Verify that the library "AWS SDK for PHP" exist. 
      3. Verify that the library "JMESPath" exist. 

      Test Mobile phone SMS Authentication:

      1. Access to your Moodle as admin user.
      2. Go to "Admin tools" / "Multi-factor authentication" / "Mobile phone SMS"
      3. Enable the factor and include the AWS credentials created before
      4. Access to your user preferences / "Multi-factor authentication preferences"
      5. Set up "Mobile phone SMS" factor with a test phone number.
      6. Check you have received an SMS in your phone number
      7. Enter the code you received and continue. 
      8. Open another browser and access to Moodle with your user 
      9. Enter your username and password, 
      10. Check a new screen will be display where it will ask for the Mobile phone SMS
      11. Check you have received an SMS in your mobile. 
      12. Enter the code in the box and click on verify code
      13. Check you have been login successfully and you have access to Moodle.

       

      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"

      PHP Unit tests 

      Please run PHPUnit for admin/tool/mfa/factor/sms/tests/factor_test.php

      for the MDK can use the below command:

      mdk phpunit -r -u admin/tool/mfa/factor/sms/tests/factor_test.php

      Or

      vendor/bin/phpunit admin/tool/mfa/factor/sms/tests/factor_test.php

       

      Show
      Instructions copied from MDL-78511 . 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 will lock out a user. Setup More detailed setup instructions for MFA testing can be found in  MDL-78509 , the following setup are just the basics and there is some assumed knowledge. Third party libraries  Apply the patch and upgrade Login as admin. Navigate to: Site administration > plugins > administration tools > Multi-factor authentication Enable the "MFA plugin enabled" Checkbox 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 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: Access to your Moodle as admin user. Go to "Admin tools" / "Multi-factor authentication" / "Mobile phone SMS" Enable the factor and include the AWS credentials created before Access to your user preferences / "Multi-factor authentication preferences" Set up "Mobile phone SMS" factor with a test phone number. Check you have received an SMS in your phone number Enter the code you received and continue.  Open another browser and access to Moodle with your user  Enter your username and password,  Check a new screen will be display where it will ask for the Mobile phone SMS Check you have received an SMS in your mobile.  Enter the code in the box and click on verify code Check you have been login successfully and you have access to Moodle.   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" PHP Unit tests  Please run PHPUnit for  admin/tool/mfa/factor/sms/tests/factor_test.php for the MDK can use the below command: mdk phpunit -r -u admin/tool/mfa/factor/sms/tests/factor_test.php Or vendor/bin/phpunit admin/tool/mfa/factor/sms/tests/factor_test.php  

      JMESPath    lib/jmespath    2.6.1  -->  2.7.0    https://github.com/jmespath/jmespath.php

        1. result_1.png
          result_1.png
          33 kB
        2. result_2.png
          result_2.png
          204 kB
        3. result_3.png
          result_3.png
          445 kB
        4. result_4.png
          result_4.png
          45 kB
        5. result_5.png
          result_5.png
          104 kB

            Daniel Ziegenberg Daniel Ziegenberg
            sarjona Sara Arjona (@sarjona)
            Raquel Ortega Raquel Ortega
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Huong Nguyen Huong Nguyen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 26 minutes
                3h 26m

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