NeilMadden / apisecurityinaction

Source code that accompanies the book API Security in Action
MIT License
147 stars 97 forks source link

Add hashing to DatabaseTokenStore #3

Closed NeilMadden closed 4 years ago

NeilMadden commented 4 years ago

The DatabaseTokenStore should hash the token IDs to avoid token compromise. While this issue is discussed and prevented using the HmacTokenStore, it would be better to avoid the problem in the first place with hashing. (And discuss/mitigate timing attacks and DoS with HMAC instead).

NeilMadden commented 4 years ago

Fixed in latest version.