Description
Starting in CockroachDB v22.2.0 and above, CockroachDB switched to using the SCRAM protocol for password authentication by default. The SCRAM protocol dictates that the password hash is computed on the client side and sent to the server instead of sending a cleartext password. After testing we determined the optimal default hash cost (iteration count) to be119680. However, this default hashing cost was high for certain clients running on a limited amount of CPU, which resulted in higher than normal connection latency after upgrading to CockroachDB v22.2.0 and above.
Statement
This is resolved in CockroachDB by a fix that sets the default hash cost value to10610 using the cluster setting server.user_login.password_hashes.default_cost.scram_sha_256. This fix has been released in .
Mitigation
Users of CockroachDB v22.2.0 to v22.2.6, should set the value of the cluster settingserver.user_login.password_hashes.default_cost.scram_sha_256 to 10610. You will also need to run ALTER USER... WITH PASSWORD for every user in order to recompute the hash using the lower cost of 10610.
Alternatively, if your application is unaffected or you are not experiencing an increase in connection latency, the release of CockroachDB will include the lower default hashing cost. This will be applied automatically during the upgrade without any user intervention.

