From bb06ccd52924800ac501d17c8a42038c8e5c5770 Mon Sep 17 00:00:00 2001 From: Bar Shaul <88437685+barshaul@users.noreply.github.com> Date: Thu, 10 Nov 2022 12:38:47 +0200 Subject: CredentialsProvider class added to support password rotation (#2261) * A CredentialsProvider class has been added to allow the user to add his own provider for password rotation * Moved CredentialsProvider to a separate file, added type hints * Changed username and password to properties * Added: StaticCredentialProvider, examples, tests Changed: CredentialsProvider to CredentialProvider Fixed: calling AUTH only with password * Changed private members' prefix to __ * fixed linters * fixed auth test * fixed credential test * Raise an error if username or password are passed along with credential_provider * fixing linters * fixing test * Changed dundered to single per side underscore * Changed Connection class members username and password to properties to enable backward compatibility with changing the members value on existing connection. * Reverting last commit and adding backward compatibility to 'username' and 'password' inside on_connect function * Refactored CredentialProvider class * Fixing tuple type to Tuple * Fixing optional string members in UsernamePasswordCredentialProvider * Fixed credential test * Added credential provider support to AsyncRedis * linters * linters * linters * linters - black Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com> Co-authored-by: dvora-h --- redis/cluster.py | 1 + 1 file changed, 1 insertion(+) (limited to 'redis/cluster.py') diff --git a/redis/cluster.py b/redis/cluster.py index cb3b2a6..027fe40 100644 --- a/redis/cluster.py +++ b/redis/cluster.py @@ -121,6 +121,7 @@ REDIS_ALLOWED_KEYS = ( "connection_class", "connection_pool", "client_name", + "credential_provider", "db", "decode_responses", "encoding", -- cgit v1.2.1