You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the issues holding back performance of the API is the problem of hashing.
Whilst banning BASIC authentication with passwords will help, the API Token scheme
still requires a PBKDF2 hash - which means that heavy API use (using Tokens) can
still cause enormous numbers of hash computations.
A slight solution to this whilst we consider moving to using JWT based tokens and/or
a session orientated solution is to simply cache the successful tokens. This has some
security issues but this should be balanced by the security issues of load from
hashing.
Related #14668
Signed-off-by: Andrew Thornton <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Copy file name to clipboardExpand all lines: custom/conf/app.example.ini
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -378,6 +378,10 @@ INTERNAL_TOKEN=
378
378
;;
379
379
;; Validate against https://haveibeenpwned.com/Passwords to see if a password has been exposed
380
380
;PASSWORD_CHECK_PWN = false
381
+
;;
382
+
;; Cache successful token hashes. API tokens are stored in the DB as pbkdf2 hashes however, this means that there is a potentially significant hashing load when there are multiple API operations.
383
+
;; This cache will store the successfully hashed tokens in a LRU cache as a balance between performance and security.
Copy file name to clipboardExpand all lines: docs/content/doc/advanced/config-cheat-sheet.en-us.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -441,6 +441,7 @@ relation to port exhaustion.
441
441
- spec - use one or more special characters as ``!"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~``
442
442
- off - do not check password complexity
443
443
-`PASSWORD_CHECK_PWN`: **false**: Check [HaveIBeenPwned](https://haveibeenpwned.com/Passwords) to see if a password has been exposed.
444
+
-`SUCCESSFUL_TOKENS_CACHE_SIZE`: **20**: Cache successful token hashes. API tokens are stored in the DB as pbkdf2 hashes however, this means that there is a potentially significant hashing load when there are multiple API operations. This cache will store the successfully hashed tokens in a LRU cache as a balance between performance and security.
0 commit comments