Skip to main content

SHOW AUTHENTICATION

Description

Displays the authentication information of the current user or all users in the current cluster.

tip

All users have the privilege to view their own authentication information. Only users with the user_admin role can view the authentication information of all users or the authentication information of specified users.

Syntax

SHOW [ALL] AUTHENTICATION [FOR USERNAME]

Parameters

ParameterRequiredDescription
ALLNoIf this keyword is specified, the authentication information of all users in the current cluster is returned. If this keyword is not specified, only the authentication information of the current user is returned.
USERNAMENoIf this parameter is specified, the authentication information of a specified user can be viewed. If this parameter is not specified, only the authentication information of the current user can be viewed.

Output

+---------------+----------+-------------+-------------------+
| UserIdentity | Password | AuthPlugin | UserForAuthPlugin |
+---------------+----------+-------------+-------------------+
FieldDescription
UserIdentityThe user identity.
PasswordWhether a password is used to log in to the StarRocks cluster.
  • Yes: A password is used.
  • No: No password is used.
AuthPluginThe interface that is used for authentication. Valid values: MYSQL_NATIVE_PASSWORD and AUTHENTICATION_LDAP_SIMPLE. If no interface is used, NULL is returned.
UserForAuthPluginThe name of the user using the LDAP or Kerberos authentication. If no authentication is used, NULL is returned.

Examples

Example 1: Display the authentication information of the current user.

SHOW AUTHENTICATION;
+--------------+----------+------------+-------------------+
| UserIdentity | Password | AuthPlugin | UserForAuthPlugin |
+--------------+----------+------------+-------------------+
| 'root'@'%' | No | NULL | NULL |
+--------------+----------+------------+-------------------+

Example 2: Display the authentication information of all users in the current cluster.

SHOW ALL AUTHENTICATION;
+---------------+----------+----------------------------+-------------------+
| UserIdentity | Password | AuthPlugin | UserForAuthPlugin |
+---------------+----------+----------------------------+-------------------+
| 'root'@'%' | Yes | NULL | NULL |
| 'chelsea'@'%' | No | AUTHENTICATION_LDAP_SIMPLE | NULL |
+---------------+----------+----------------------------+-------------------+

Example 3: Display the authentication information of a specified user.

SHOW AUTHENTICATION FOR root;
+--------------+----------+------------+-------------------+
| UserIdentity | Password | AuthPlugin | UserForAuthPlugin |
+--------------+----------+------------+-------------------+
| 'root'@'%' | Yes | NULL | NULL |
+--------------+----------+------------+-------------------+