Hi Sebastien,
Salting is generally reserved for user supplied values (ie passwords) to ensure uniqueness of the hash and a resistance to rainbow tables/dictionary attacks.
For a token element that is a unique long random alphanumeric string, they provide limited value as its generally infeasible to pre-compute an entire SHA256 space.
If you're still concerned, change it to SHA 512, set your token length a bit longer.
------------------------------
Philip Nye
IBM
Gold Coast
------------------------------
Original Message:
Sent: Tue July 25, 2023 03:20 AM
From: Sébastien De Kinder
Subject: Access/Refresh token hashing and salting
Hi,
I couldn't find any information about the way tokens are hashed in the database.
When the following advanced runtime params are enabled :
- oauth20.hashedTokenStorageEnabled = true
- runtime.hashAlgorithm = SHA-256
- runtime.verificationHashAlgorithms = SHA-256
Is it salted or not?
Thank you,
Sébastien
------------------------------
Sébastien De Kinder
------------------------------