Edit

SHOW AUTHENTICATION

Description

Displays the authentication information of the current user or all users in the current cluster. Each user has permissions to view their authentication information. Only users with the global GRANT_PRIV permission can view the authentication information of all users.

Syntax

SHOW [ALL] AUTHENTICATION;

Paramaters

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.

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, AUTHENTICATION_LDAP_SIMPLE, or AUTHENTICATION_KERBEROS. 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_KERBEROS | HADOOP.COM        |
+---------------+----------+-------------------------+-------------------+