@@ -209,24 +209,37 @@ SQLite databases. If you want to keep using the data set the
209209Update ``config.ini``'s ``password_pbkdf2_default_rounds`` (required)
210210---------------------------------------------------------------------
211211
212- Roundup hashes passwords using PBKDF2 with SHA1. PBKDF2 has a
213- parameter that makes hashing a password more difficult to do.
214- The original 10000 value was set years ago. It has not been
215- updated for advancements in computing power.
212+ Roundup hashes passwords using PBKDF2 with SHA1. In this release, you
213+ can `upgrade to PBKDF2-SHA512 from current PBKDF2-SHA1`. If you
214+ upgrade, you want to set the default rounds according to the
215+ PBKDF2-SHA512 upgrading directions. Note that this algorithm is
216+ expected to be the default in a future version of Roundup.
217+
218+ If you don't want to upgrade, we recommend that you increase the
219+ default number of rounds from the original 10000. PBKDF2 has a
220+ parameter that makes hashing a password more difficult to do. The
221+ original 10000 value was set years ago. It has not been updated for
222+ advancements in computing power.
216223
217224This release of Roundup changes the value to 2000000 (2
218225million). This exceeds the current `recommended setting of
2192261,300,000`_ for PBKDF2 when used with SHA1.
220227
221- If you were using the old 10000 value, it will be automatically
222- upgraded to 2 million by using ``roundup-admin``'s
223- ``updateconfig``. If you were not using the old 10000 default,
224- you should update it manually.
228+ .. caution::
225229
226- After the change users will still be able to log in using the
227- older 10000 round hashed passwords. If ``migrate_passwords`` is
228- set to ``yes``, passwords will be automatically re-hashed using
229- the new higher value when the user logs in.
230+ If you were using the old 10000 value, **it will be automatically
231+ upgraded** to 2 million by using ``roundup-admin``'s
232+ ``updateconfig``. If you were not using the old 10000 default, you
233+ should update it manually.
234+
235+ After the change users will still be able to log in using the older
236+ 10000 round hashed passwords. If ``migrate_passwords`` is set to
237+ ``yes``, passwords will be automatically re-hashed using the new
238+ higher value when the user logs in. If
239+ ``password_pbkdf2_default_rounds`` is set to a lower value than was
240+ used to hash a password, the password will not be rehashed so the
241+ higher value will be kept. The lower value will be used only if the
242+ password is changed using the web or command line.
230243
231244Increasing the number of rounds will slow down re-hashing. That's the
232245whole point. Sadly it will also slow down logins. Usually the hash
@@ -240,17 +253,17 @@ You can see how long it will take by using the new ``roundup-admin``
240253``perftest`` command. After you have finished migrating your database,
241254run::
242255
243- roundup-admin -i <tracker_home> perftest password rounds=10000
256+ roundup-admin -i <tracker_home> perftest password scheme=PBKDF2 rounds=10000
244257
245258and then::
246259
247- roundup-admin -i <tracker_home> perftest password rounds=2,000,000
260+ roundup-admin -i <tracker_home> perftest password scheme=PBKDF2 rounds=2,000,000
248261
249262so see the difference. Output from this command looks like::
250263
251264 Hash time: 0.203151849s scheme: PBKDF2 rounds: 10000
252265
253- If your testing reports a hash time in the 0.5 second range for 10000
266+ If your testing reports a hash time above 0.5 seconds for 10000
254267rounds, there may be another issue. See if executing::
255268
256269 python3 -c 'from hashlib import pbkdf2_hmac'
@@ -267,6 +280,61 @@ install an OS vendor package or some other library.
267280
268281.. _recommended setting of 1,300,000: https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html#pbkdf2
269282
283+ Upgrade to PBKDF2-SHA512 from current PBKDF2-SHA1 (recommended)
284+ ---------------------------------------------------------------
285+
286+ We recommend that you upgrade to using PBKDF2-SHA512 for hashing your
287+ passwords. This is a more secure method than the old PBKDF2 (with
288+ SHA1). Because the algorithm is more secure, it uses a smaller value
289+ for ``password_pbkdf2_default_rounds``. Setting
290+ ``password_pbkdf2_default_rounds`` to ``250000`` exceeds the current
291+ `recommended setting of 210,000`_ iterations for PBKDF2 when used with
292+ SHA512.
293+
294+ You can see how long this takes to calculate on your hardware using
295+ ``roundup-admin``'s perftest command. For example::
296+
297+ roundup-admin -i <tracker_home> perftest password scheme=PBKDF2S5 rounds=250,000
298+
299+ produces::
300+
301+ Hash time: 0.161892945 seconds, scheme: PBKDF2S5, rounds: 250000
302+
303+ Any increase in the number of rounds will cause the password to
304+ automatically be rehashed to the higher value the next time the user
305+ logs in via the web interface. Changing the number of rounds to a
306+ **lower** value will not trigger a rehash during login unless the
307+ scheme is also being changed. The lower number will be used only when
308+ the password is explicitly changed using the web interface or the
309+ command line (``roundup-admin`` for example).
310+
311+ Change the default hashing scheme by adding the following lines to
312+ |the interfaces.py file|_ in your tracker home::
313+
314+ ## Use PBDKF2S5 (PBKDF2-SHA512) for passwords. Re-hash old PBDFK2
315+ # Force password with scheme PBKDF2 (SHA1) to get re-hashed
316+ Password.deprecated_schemes.insert(0, Password.known_schemes[0])
317+ # choose PBKDF2S5 as the scheme to use for rehashing.
318+ Password.default_scheme = Password.experimental_schemes[0]
319+
320+ You may need to create the ``interfaces.py`` file if it doesn't exist.
321+ In the future, when the default hash is changed to PBKDF2S5, upgrade
322+ directions will include instructions to remove these lines and
323+ the file ``interfaces.py`` if it becomes empty.
324+
325+ You can verify that PBKDF2S5 is used by default by running::
326+
327+ roundup-admin -i <tracker_home> perftest password rounds=250,000
328+
329+ and verify that the scheme is PBKDF2S5.
330+
331+ .. _the interfaces.py file:
332+ reference.html#interfaces-py-hooking-into-the-core-of-roundup
333+
334+ .. |the interfaces.py file| replace:: the ``interfaces.py`` file
335+
336+ .. _recommended setting of 210,000: https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html#pbkdf2
337+
270338jQuery updated with updates to user.help.html (recommended)
271339-----------------------------------------------------------
272340
0 commit comments