Skip to main content

SHOW AUTHENTICATION

SHOW AUTHENTICATION

Description

Displays the authentication information of the current user or all users in the current cluster. Each user has privilege to view their authentication information. Only users with the global GRANT privilege and 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

Parameter

Required

Description

ALL

No

If 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.

USERNAME

No

If 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 |
+---------------+----------+-------------+-------------------+

Field

Description

UserIdentity

The user identity.

Password

Whether a password is used to log in to the StarRocks cluster.

  • Yes: A password is used.
  • No: No password is used.

AuthPlugin

The 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.

UserForAuthPlugin

The 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 |
+---------------+----------+-------------------------+-------------------+

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

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