keystone password creation and verification mismatch
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Identity (keystone) |
Fix Released
|
High
|
David Stanek |
Bug Description
In keystone stable/Havana release, password for a user can be set during user creation process. Now if a user initially do a sha512 hash of his password and sent it to the keystone server over the wire, then hash_password method of keystone/
def hash_password(
~ | """Hash a password. Hard."""
~ | password_utf8 = trunc_password(
~ | if passlib.
~ | return password_utf8
~ | h = passlib.
~ | rounds=
~ | return h
will not do any hashing, or it directly store the password in DB.
However, during authentication, the user needs to provide the clear text password for authentication because during authentication it always does sha512 over the password field (it does not check the password is already hashed)
def check_password(
""Check that a plaintext password matches hashed.
hashpw returns the salt value concatenated with the actual hash value.
It extracts the actual salt if this value is then passed as the salt.
"""
if password is None or hashed is None:
return passlib.
Now in this case,
1) user chooses a password which is similar to a sha512 output, now keystone thinks it is already hashed, so it will store it as it is. User provides the sha512 during authentication but he cannot login this time cause now the password is hashed before matching.
There should be consistency for both password creation and verification process.
information type: | Public Security → Public |
tags: | added: security |
Changed in keystone: | |
assignee: | nobody → David Stanek (dstanek) |
Changed in keystone: | |
status: | Fix Committed → Fix Released |
Changed in keystone: | |
milestone: | icehouse-3 → 2014.1 |
As this is not a vulnerability but a bug with some security implication, there is no need to keep this private.