Back to Yugabyte Db

Enable authentication

docs/content/v2.20/secure/enable-authentication/_index.md

2026.1.0.0-b251.8 KB
Original Source

Enabling user authentication in YSQL and YCQL requires setting the appropriate flags on server startup:

  • --ysql_enable_auth=true in YSQL
  • --use_cassandra_authentication=true in YCQL

In YSQL, further fine-grained control over client authentication is provided by setting the --ysql_hba_conf_csv flag. You can define rules for access to localhost and remote clients based on IP addresses, authentication methods, and use of TLS (aka SSL) certificates.

<div class="row"> <div class="col-12 col-md-6 col-lg-12 col-xl-6"> <a class="section-link icon-offset" href="ysql/"> <div class="head">
    <div class="title">Enable user authentication</div>
  </div>
  <div class="body">
      Enable authentication and configure user authorization in YugabyteDB.
  </div>
</a>
</div> <div class="col-12 col-md-6 col-lg-12 col-xl-6"> <a class="section-link icon-offset" href="ysql-login-profiles/"> <div class="head">
    <div class="title">Create login profiles</div>
  </div>
  <div class="body">
      Prevent brute force exploits by enabling login profiles in YSQL.
  </div>
</a>
</div> <div class="col-12 col-md-6 col-lg-12 col-xl-6"> <a class="section-link icon-offset" href="ysql_hba_conf-configuration/"> <div class="head">
    <div class="title">Configure client authentication</div>
  </div>
  <div class="body">
      Use the ysql_hba_conf_csv flag to configure client authentication in YSQL.
  </div>
</a>
</div> </div>