From bc6b2f1b0b70b9906d5d1ccade1e82b48f87fa38 Mon Sep 17 00:00:00 2001 From: wangxiyuan Date: Mon, 29 Oct 2018 11:13:18 +0800 Subject: [PATCH] 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 --- keystone/tests/unit/identity/test_backends.py | 6 ++++++ lower-constraints.txt | 2 +- releasenotes/notes/bug-1735250-b60332a7f288cf94.yaml | 8 ++++++++ requirements.txt | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/bug-1735250-b60332a7f288cf94.yaml diff --git a/keystone/tests/unit/identity/test_backends.py b/keystone/tests/unit/identity/test_backends.py index 47e4916e1c..45da9591fc 100644 --- a/keystone/tests/unit/identity/test_backends.py +++ b/keystone/tests/unit/identity/test_backends.py @@ -374,6 +374,12 @@ class IdentityTests(object): PROVIDERS.identity_api.delete_user, uuid.uuid4().hex) + def test_create_user_with_long_password(self): + user = unit.new_user_ref(domain_id=CONF.identity.default_domain_id, + password='a' * 2000) + # success create a user with long password + PROVIDERS.identity_api.create_user(user) + def test_create_user_missed_password(self): user = unit.new_user_ref(domain_id=CONF.identity.default_domain_id) user = PROVIDERS.identity_api.create_user(user) diff --git a/lower-constraints.txt b/lower-constraints.txt index 912dd66d9b..3b15ffbd18 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -57,7 +57,7 @@ scrypt==0.8.0 six==1.10.0 Sphinx==1.6.5 sqlalchemy-migrate==0.11.0 -SQLAlchemy==1.0.13 +SQLAlchemy==1.1.0 stestr==1.0.0 stevedore==1.20.0 tempest==17.1.0 diff --git a/releasenotes/notes/bug-1735250-b60332a7f288cf94.yaml b/releasenotes/notes/bug-1735250-b60332a7f288cf94.yaml new file mode 100644 index 0000000000..f423a4c0d8 --- /dev/null +++ b/releasenotes/notes/bug-1735250-b60332a7f288cf94.yaml @@ -0,0 +1,8 @@ +--- +fixes: + - | + [`bug 1734244 `_] + Users can't set password longer than 128 if Keystone using + `Sqlalchemy` < 1.1.0. Update `Sqlalchemy` to a higher version can solve + this problem. + [`Related Sqlalchemy Changelog `_]. diff --git a/requirements.txt b/requirements.txt index f651e3b007..37dc6c78db 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ Flask!=0.11,>=1.0.2 # BSD Flask-RESTful>=0.3.5 # BSD cryptography>=2.1 # BSD/Apache-2.0 six>=1.10.0 # MIT -SQLAlchemy>=1.0.13 # MIT +SQLAlchemy>=1.1.0 # MIT sqlalchemy-migrate>=0.11.0 # Apache-2.0 stevedore>=1.20.0 # Apache-2.0 passlib>=1.7.0 # BSD