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

auth_ldap should use get_cache_flag() instead of get_cache_flags()

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.5
    • 3.5
    • Authentication, Performance
    • MOODLE_35_STABLE
    • MOODLE_35_STABLE
    • Hide

      I'm not really sure how you should test this other than make sure it doesn't break anything. The whole goal is to be able to log in and it should be putting entries into the database and using them as needed.

      1. Hack ntlmsso_finish() and put a 120 secs sleep there, just at the beginning of it.
      2. Enable NTLM SSO http://docs.moodle.org/en/NTLM_authentication
      3. Check the cache_flags table for current entries
      4. Login with LDAP
      5. Before the sleep (120 seconds) expires:
        1. Check the cache_flags table for current entries (should be a new one with your session ID)
      6. Once the sleep (120 seconds) has expired:
        1. Check you are effectively SSO logged in.
        2. Check the cache_flags table for current entries (the new one with the session ID is not there anymore)
      Show
      I'm not really sure how you should test this other than make sure it doesn't break anything. The whole goal is to be able to log in and it should be putting entries into the database and using them as needed. Hack ntlmsso_finish() and put a 120 secs sleep there, just at the beginning of it. Enable NTLM SSO http://docs.moodle.org/en/NTLM_authentication Check the cache_flags table for current entries Login with LDAP Before the sleep (120 seconds) expires: Check the cache_flags table for current entries (should be a new one with your session ID) Once the sleep (120 seconds) has expired: Check you are effectively SSO logged in. Check the cache_flags table for current entries (the new one with the session ID is not there anymore)

    Description

      get_cache_flag() uses the name argument to take full advantage of the cache_flags index on flagtype,name. Instead auth_ldap currently uses get_cache_flags() picks out the one name it actually wanted in the first place and tosses away the rest of the result.

      Attachments

        Issue Links

          Activity

            People

              jrchamp Jonathan Champ
              jrchamp Jonathan Champ
              Mark Nelson Mark Nelson
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan, Matteo Scaramuccia, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                17/May/18