[MXS-2493] Database users can't be queried with MaxCtrl Created: 2019-05-15  Updated: 2020-08-25  Resolved: 2019-06-27

Status: Closed
Project: MariaDB MaxScale
Component/s: maxctrl
Affects Version/s: 2.2.21, 2.3.6
Fix Version/s: 2.4.0

Type: Bug Priority: Major
Reporter: Geoff Montee (Inactive) Assignee: Marko Rajala (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MXS-1716 "show dbusers ...service..." returns ... Closed
Sprint: MXS-SPRINT-83, MXS-SPRINT-84, MXS-SPRINT-85

 Description   

MaxAdmin allows you to see which database users are available for a specific service. For example, by executing the following command:

$ sudo maxadmin show dbusers Splitter-Service
User names (Read-Listener): alice@%

But MaxAdmin is deprecated now.

MaxCtrl and the REST API are the new way to get information about MaxScale's state. Unfortunately, information about database users doesn't appear to be available at all via MaxCtrl and the REST API.

Database users are not shown by this command:

maxctrl show service Splitter-Service

Or this command:

maxctrl list listeners Splitter-Service

And this does not even appear to be a valid command:

maxctrl show listener Read-Listener

And neither does this:

maxctrl show dbusers Read-Listener

And neither does this:

maxctrl show dbusers Splitter-Service

I think it is very important to make information about database users available for debugging and troubleshooting purposes, since MaxScale's authentication can get pretty complicated at times.

I think the information about database users should include the following information:

  • The user name.
  • The host.
  • The listener.
  • The service.
  • The authenticator (e.g. PAMAuth, MySQLAuth, GSSAPIAuth).
  • Whether the user has PROXY privileges on any other users. (Definitely relevant for PAMAuth.)


 Comments   
Comment by markus makela [ 2019-05-16 ]

The data is exposed by the REST API but it appears maxctrl doesn't display it.

Comment by markus makela [ 2019-05-16 ]

A workaround is to use the following command to extract the REST API output:

maxctrl api get services/RW-Split-Router data.attributes.listeners[].attributes.authenticator_diagnostics

Replace the RW-Split-Router with the proper service name. You'll get the users for all listeners of that service.

Generated at Thu Feb 08 04:14:32 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.