[MDEV-20434] ALTER USER prints bad error message if specified authentication plugin is not loaded Created: 2019-08-27  Updated: 2022-03-01

Status: Open
Project: MariaDB Server
Component/s: Authentication and Privilege System
Affects Version/s: 10.4.7
Fix Version/s: 10.4

Type: Bug Priority: Major
Reporter: Geoff Montee (Inactive) Assignee: Vicențiu Ciorbaru
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
PartOf
is part of MDEV-20435 ALTER USER prints bad error message i... Open
Relates
relates to MDEV-20435 ALTER USER prints bad error message i... Open
relates to MDEV-22312 Bad error message for SET DEFAULT ROL... Closed

 Description   

CREATE USER and GRANT print a very nice error message if a specified authentication plugin does not exist. In contrast, ALTER USER prints a generic error message, so the root cause can be difficult to determine in some cases.

CREATE USER:

MariaDB [(none)]> CREATE USER IF NOT EXISTS 'testuser'@'127.0.0.1' IDENTIFIED VIA ed25518 USING PASSWORD('Pa$swd123');
ERROR 1524 (HY000): Plugin 'ed25518' is not loaded

GRANT:

MariaDB [(none)]> CREATE USER IF NOT EXISTS 'testuser'@'127.0.0.1' IDENTIFIED BY 'Pa$swd123';
Query OK, 0 rows affected (0.001 sec)
 
MariaDB [(none)]> GRANT USAGE ON *.* TO 'testuser'@'127.0.0.1' IDENTIFIED VIA ed25518 USING PASSWORD('Pa$swd123');
ERROR 1524 (HY000): Plugin 'ed25518' is not loaded

ALTER USER:

MariaDB [(none)]> CREATE USER IF NOT EXISTS 'testuser'@'127.0.0.1' IDENTIFIED BY 'Pa$swd123';
Query OK, 0 rows affected (0.001 sec)
 
MariaDB [(none)]> ALTER USER 'testuser'@'127.0.0.1' IDENTIFIED VIA ed25518 USING PASSWORD('Pa$swd123');
ERROR 1396 (HY000): Operation ALTER USER failed for 'testuser'@'127.0.0.1'

I think that ALTER USER's error message should be similar to the one used by CREATE USER and GRANT in this case.



 Comments   
Comment by Robert Bindar [ 2019-12-09 ]

Patch covering this is at: https://github.com/mariadb/server/commit/d87e079c4350ee0cdc8f80522b9c35c57c0c5928

Generated at Thu Feb 08 08:59:27 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.