Back to Starrocks

AuthOption

docs/en/_assets/commonMarkdown/AuthOption.mdx

4.1.11.8 KB
Original Source
  • 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.

    SQL
    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 methodPassword for user creationPassword for login
    Native passwordPlaintext or ciphertextPlaintext
    mysql_native_password BYPlaintextPlaintext
    mysql_native_password WITHCiphertextPlaintext
    authentication_ldap_simplePlaintextPlaintext

    :::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: