[perf] speedup login times for acceptance tests: use weak bcrypt params (#2801)

The overhead of password checks goes down from about 200ms to
 sub-millisecond times on a modern i7 processor (3.8GHz).
In my testing on server CPUs (2.4GHz) this goes down from 400ms to
 single digit ms.

GitOrigin-RevId: 895580fcbf1cde0bae5213ed6d8aae30c67fcfa3
This commit is contained in:
Jakob Ackermann 2020-05-04 15:03:59 +02:00 committed by Copybot
parent 45f87dc927
commit d3240b8f9c

View file

@ -220,7 +220,7 @@ module.exports = settings =
# --------
security:
sessionSecret: sessionSecret
bcryptRounds: 12 # number of rounds used to hash user passwords (raised to power 2)
bcryptRounds: if process.env['NODE_ENV'] == 'test' then 1 else 12 # number of rounds used to hash user passwords (raised to power 2)
httpAuthUsers: httpAuthUsers