store client-secret as hash only#273
Conversation
|
Hi @Thomblin, |
|
Hi @ajgarlag I appreciate your suggestion. I guess that is possible. Do you think adding another dependency is worth the benefit? |
|
Another question: Currently the changes expects everyone to run league:oauth2-server:hash-client-secrets, else the client secret verify will return false. Do you have a changelog or new version in mind to handle backward incompatible changes, or should I tweak the verify function to compare non hashed secrets as plain text (as it is currently implemented) |
The
I'd like to explore whether the password migration feature can be leveraged to verify plain secrets and rehash them dynamically. |
|
@ajgarlag I added symfony/password-hasher and it works well. It even converts plain text secrets to hashed ones on the fly when used. I tested as well that rehashing to a new algorithm works |
|
Latest update introduces the migration of plaintext secrets without breaking backward compatibility. Secrets will be migrated transparently leveraging the migration capabilities of It adds a new configuration option, The proposal is to remove support for plaintext secrets starting with version 2 of the bundle. To continue using plaintext secrets, the new service |
Client secrets are stored as plain text in the
oauth2_clienttable. If the database is compromised, all client secrets are immediately exposed. This is a well-known security anti-pattern — secrets should be stored as one-way hashes, just like user passwords.