Currently, user mapping is only supported by the PAM authentication plugin, and that functionality is implemented in a PAM module outside of the server.
Some users would like the server to support some kind of built-in user mapping for all authentication plugins.
MySQL 5.7 added this via the check_proxy_users system variable, but using PROXY privileges to define user mappings, rather than just privileges for user mappings, is pretty unintuitive. (See
MDEV-19428 for more information.)
Maybe MariaDB should implement user mapping in the server in some other way.