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

The Curious Case of Disappearing Authentication



    • Affected Branches:



      Authentication type is quietly disabled when it's code is not available on the server.

      To reproduce the issue:

      1. As an admin, go to /admin/category.php?category=authsettings .
      2. Enable an extra authentication plugin (say) - "LDAP server".
      3. Review mdl_config table, notice that row with name="auth" will contain the value "email,ldap".
      4. Remove from the code directory auth/ldap.
      5. As a non logged user (e.g. use another browser) open the login page login/index.php
      6. Notice that "LDAP server" authentication was quietly (no trace of disabling it anywhere) removed. To confirm, review mdl_config table, the "auth" row now just contains "email"

      You can bring the auth/ldap directory back now - but that will not re-enable LDAP authentication plugin.

      Story behind the issue

      The behavior above creates a condition race when some work is done on the backend server (Moodle code is updated,  moved, copied, etc). We have experienced that seemingly random disabling of the authentication plugins in our production systems. Each time there was no trace of why did this happen. And because it happened very rarely (we are talking about few times in the last 10 years) the issue was hard to pin-point. I suspect it was happening somewhere during our deployment process.

      What next?

      Some ideas:

      • Don't ever disable the plugin.
      • If we really should / need to disable it - then at least log it.





            • Votes:
              0 Vote for this issue
              6 Start watching this issue


              • Created: