Skip to content

Authenticate RedisCluster seeds restored from the slot cache - #2957

Open
ebubekiryigit wants to merge 1 commit into
phpredis:developfrom
ebubekiryigit:fix/cluster-slot-cache-auth
Open

ebubekiryigit wants to merge 1 commit into
phpredis:developfrom
ebubekiryigit:fix/cluster-slot-cache-auth

Conversation

@ebubekiryigit

Copy link
Copy Markdown
Contributor

cluster_init_cache recreates seed sockets without credentials. Ordinary reads and writes can succeed because data-node sockets have credentials, but a subsequent authenticated topology remap cannot use these seeds and fails after a MOVED response to a promoted replica.

Copy the configured username and password to cached seeds, matching cluster_init_seeds.

This fix was originally implemented in the RedisCluster pipeline PR #2798, in commit d9dd96e. Since #2798 is a larger feature PR, I am submitting this change separately so the bug fix can be reviewed and merged independently. This PR also adds regression coverage for the existing non-pipeline remap path.

Closes #2202.

Validation

The broader RedisCluster suite has two WATCH-abort failures also reproduced on clean develop (testFailedTransactions and testQueuedReplyModes). All other applicable tests passed after installing the session runner's serializer dependencies.

Copy configured credentials to seeds restored from the slot cache so authenticated topology remaps can use them. Add regression coverage for cached and uncached clients with persistent and nonpersistent connections.

Extract the independent auth fix already included in pipeline PR phpredis#2798. Related to phpredis#2202.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RedisCluster slot caching causes RedisClusterException on master change

1 participant