Skip to content

Commit

Permalink
stop using passlib
Browse files Browse the repository at this point in the history
passlib is unmaintained and has not had a release since 2020
a recent bcrypt release just broke passlib
see pyca/bcrypt#684

trove's use of passlib is pretty tirval so this change
just removes it as a depency and delegate the random password
generation in trove.common.utils to the generate_random_key
function in the trove.common.crypto_utils module

Change-Id: I6b6c64147c627025d5f89db6032d1c54445df94f
  • Loading branch information
SeanMooney committed Mar 26, 2024
1 parent 83a5250 commit 3367c25
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ python-keystoneclient>=2.0.0,!=2.1.0 # Apache-2.0
kombu>=2.5.0
babel>=1.3
python-heatclient>=0.3.0
passlib
jinja2>=2.6
PyMySQL>=0.6.2 # MIT License
python-neutronclient>=2.3.11,<3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ python-keystoneclient>=2.0.0,!=2.1.0 # Apache-2.0
kombu>=2.5.0
babel
python-heatclient>=0.2.9
passlib
jinja2
PyMySQL>=0.6.2 # MIT License
python-neutronclient>=2.3.6,<3
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ sqlalchemy-migrate>=0.11.0 # Apache-2.0
netaddr>=0.7.18 # BSD
httplib2>=0.9.1 # MIT
lxml!=3.7.0,>=3.4.1 # BSD
passlib>=1.7.0 # BSD
python-heatclient>=1.10.0 # Apache-2.0
python-novaclient>=9.1.0 # Apache-2.0
python-cinderclient>=3.3.0 # Apache-2.0
Expand Down
4 changes: 2 additions & 2 deletions trove/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
from oslo_utils.encodeutils import safe_encode
from oslo_utils import importutils
from oslo_utils import strutils
from passlib import pwd

from trove.common import cfg
from trove.common import crypto_utils
from trove.common import exception
from trove.common.i18n import _

Expand Down Expand Up @@ -298,7 +298,7 @@ def generate_random_password(password_length=None):
password_length or
cfg.get_configuration_property('default_password_length')
)
return pwd.genword(length=password_length)
return crypto_utils.generate_random_key(length=password_length)


def try_recover(func):
Expand Down

0 comments on commit 3367c25

Please sign in to comment.