yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #75985
[Bug 1735250] Re: Password column limit (128 char) in the Password table exceeded when using passwords exceeding 2000 characters (sqlalchemy<1.1.0)
Reviewed: https://review.openstack.org/613830
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=bc6b2f1b0b70b9906d5d1ccade1e82b48f87fa38
Submitter: Zuul
Branch: master
commit bc6b2f1b0b70b9906d5d1ccade1e82b48f87fa38
Author: wangxiyuan <wangxiyuan@xxxxxxxxxx>
Date: Mon Oct 29 11:13:18 2018 +0800
Bump sqlalchemy minimum version to 1.1.0
Sqlalchemy add a new class for hybrid property in v1.1.0[1]. It
can solve the password length problem for User password SQL obj.
[1]: https://docs.sqlalchemy.org/en/latest/changelog/migration_11.html#change-3653
Change-Id: I7a18bd528607ec5112cc55c7682f95d61be8b509
Closes-bug: #1735250
** Changed in: keystone
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Identity (keystone).
https://bugs.launchpad.net/bugs/1735250
Title:
Password column limit (128 char) in the Password table exceeded when
using passwords exceeding 2000 characters (sqlalchemy<1.1.0)
Status in OpenStack Identity (keystone):
Fix Released
Status in OpenStack Identity (keystone) pike series:
Confirmed
Status in OpenStack Identity (keystone) queens series:
Confirmed
Bug description:
Type: Automation Test case
Last Successful Run: Newton
Test Release: Pike
Test:
'openstack --os-username 'keystoneuser005_ber' --os-password 'Li69nux*' --os-project-name admin --os-auth-url http://192.168.204.2:5000/v3 --os-region-name RegionOne --os-user-domain-name Default --os-project-domain-name Default --os-identity-api-version 3 --os-interface internal user set --password 'RgJSa?dB&4rH;Q|c,*Ij,zs+nC<bwivV8kEfXePD~pmA2{{KUoN3%q6t_h$1Y9Zy]L7.0lM=5:<O@TxuFWG^Ik2|h&>2Y{{A4?2}},vy],9,,j@s?3@9p9G<nYaem@i?wAb_bvZ59>Yd[0~W#8udA[LMpgKXqzqTD<Wpp*:i,gig$#ZV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bkmNzVq[%w}}zTV3}}la,:tEPBD+}}askQ~p,smeidy^s9Vbgt1&D72aod*xo?6iA)TIw6WMh}}IrJEm:v@ktx#;rO[iB,lhhM;:=fNId0kG?yTEe7P;0<At4=&0&,.:7bI?jCaC|R6],,+oG{{<f<s2hT{{&,(8.kG5n?<(Nv%B7&G,IWDJU0jD*}}hGe|C$B^~QQXHCg(<t<dH:IM+mq,?K|pa^o9>^itP[F<n8F3Z<(@P]g|0c3IiwIa_hK:@zdK?^,_t%_d4ICA;*&@hRD4EIjTs(xDeD~WqE1+kDRl8RmhcX,J&^...F~GNL@sV8~1v7f^>a_]x|>LJF9SOmDJ=l<T:27;ZzY8lZ]dwL02,cOM;58;[8hU?<(?(?=DOa.Q@&t|*iX3+l2[(4}}@%^)(>+,}}Zkp_:An<erwfu;iwV),(A*:*.vF<nY?#?rXKc}}+jDnbC&y)T{{1;56B9HMhhHa~3?LnnS9X1=2#7v,Qqr[W,:QkPI)3Df=<,CqoFScSbO,@5,aMc@MYP4oES0=Ki8L0C*WQ^3KMDt)V<:]ct,,gl2F@[,|5(=Aqbv==c<[C(f<%8V:R@,V<*}}seK~:{{,3zI<c,ish,U86.h,5:<*@uQ,r2' exceeds the limit of column password(CHAR(128)). (HTTP 400) (Request-ID: req-7ae07943-6b13-44e8-bae1-4a0ba4fa6788)
Debug Response:
https://thepasteb.in/p/P1hvXyN88DXtl
Uptill Newton, SHA512 was used for hashing, however this had a number
of vulnerabilities, and in Ocata a much stronger password hashing
scheme was adopted by Keystone.
Security Note: https://wiki.openstack.org/wiki/OSSN/OSSN-0081
Blueprint: https://github.com/openstack/keystone/commit/8ad765e0230ceeb5ca7c36ec3ed6d25c57b22c9d
The new Hashing scheme doubles the size of the Salt value which causes
it to exceed the 128 character restriction on the DB column. However
Keystone’s configuration still indicates 4096 characters as being the
maximum allowed password, so our test case should have succeeded.
Based on initial conversation with Morgan Fainberg and Lance Bragstad, this seems to be an issue in the following code section:
https://github.com/openstack/keystone/blob/master/keystone/identity/backends/sql_model.py#L189-L191
which is retrieving the class version of the hybrid_property and not
the instance version.
N.B:
- CONF.identity.rolling_upgrade_password_hash_compat is NOT set
- Default hashing configuration (for Pike) is used
- Same issue seen both on creating a user (with long password) or updating them
To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1735250/+subscriptions
References