Jump to content

MariaDB/Changing user passwords

From Wikitech

How to rotate user passwords. Under construction.

wikiuser and wikiadmin

  • clone https://gitlab.wikimedia.org/ladsgroup/db-password-rotation in cumin
  • Pick a new username and passowrd, usually the year you are doing it. Like wikiuser2023, if that's taken, add the month, like wikiuser202305.
  • Run omg.py to get new report of grants.
  • Run user_duplicator.py to duplicate the user and all the grants (edit it beforehand to set the users)
  • Update the username and password in mediawiki. In deploy1002, /srv/mediawiki-staging/private/PrivateSettings.php
    • Sync it with 'scap sync-file private/PrivateSettings.php 'Rotating wikiuser
  • Make patches to update username in operations/software
  • Make patch in puppet to update the username
  • Merge the puppet change with a patch made in private puppet to update the passwords
  • (not needed for wikiadmin) Update query killer events via running update_events.sh
  • Wait for a while and then run drop_old_user.py (update the username in the code)
  • update labstestwiki