docs/en/_assets/commonMarkdown/AuthOption.mdx
auth_option specifies the authentication method. Currently, five authentication methods are supported: StarRocks native password, mysql_native_password, authentication_ldap_simple, JSON Web Token (JWT) Authentication, and OAuth 2.0 Authentication. StarRocks native password is the same as mysql_native_password in logic but slightly differs in syntax. One user identity can use only one authentication method.
auth_option: {
IDENTIFIED BY 'auth_string'
IDENTIFIED WITH mysql_native_password BY 'auth_string'
IDENTIFIED WITH mysql_native_password AS 'auth_string'
IDENTIFIED WITH authentication_ldap_simple AS 'auth_string'
IDENTIFIED WITH authentication_jwt [AS 'auth_properties']
IDENTIFIED WITH authentication_oauth2 [AS 'auth_properties']
}
| Authentication method | Password for user creation | Password for login |
|---|---|---|
| Native password | Plaintext or ciphertext | Plaintext |
mysql_native_password BY | Plaintext | Plaintext |
mysql_native_password WITH | Ciphertext | Plaintext |
authentication_ldap_simple | Plaintext | Plaintext |
:::note StarRocks encrypts users' passwords before storing them. :::
For details of auth_properties for JSON Web Token (JWT) Authentication and OAuth 2.0 Authentication, see the corresponding documents: