Page MenuHomePhabricator

WBaaS: Grant REPLICA MONITOR to individual wiki dbs
Closed, ResolvedPublic

Description

In https://github.com/wmde/wbaas-deploy/pull/19 we bumped the sql version from 10.5.12 to 10.3.22

And started seeing:

Access denied; you need (at least one of) the SUPER, SLAVE MONITOR privilege(s)

Per docs the permissions that we need has changed https://mariadb.com/kb/en/show-replica-status/#description

This statement requires the SUPER privilege, the REPLICATION_CLIENT privilege, or, from MariaDB 10.5.2, the REPLICATION SLAVE ADMIN privilege, or, from MariaDB 10.5.9, the REPLICA MONITOR privilege.

We now need to grant REPLICA MONITOR to mediawiki-db-manager and to mediawiki accounts when we are using a newer sql version like this.

The change to the SQL init script will likley be needed first, then the change to the API that creates mediawiki accounts.

Event Timeline

Also, this should apply

When a database is upgraded from an older major release to MariaDB Server 10.5.9 or later, any user accounts with the REPLICATION CLIENT or REPLICATION SLAVE privileges will automatically be granted the new REPLICA MONITOR privilege. The privilege fix occurs when the server is started up, not when mariadb-upgrade is performed.t

https://mariadb.com/kb/en/grant/#replica-monitor

Also, this should apply

When a database is upgraded from an older major release to MariaDB Server 10.5.9 or later, any user accounts with the REPLICATION CLIENT or REPLICATION SLAVE privileges will automatically be granted the new REPLICA MONITOR privilege. The privilege fix occurs when the server is started up, not when mariadb-upgrade is performed.t

https://mariadb.com/kb/en/grant/#replica-monitor

Thats very nice to know.
That means for wbstack.com for example all that would need to happen is ensure it runs the new version of API before updating the SQL servers