Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support authentication with non-default users for Redis clusters #122

Open
wants to merge 2 commits into
base: 3.1.x
Choose a base branch
from

Conversation

robin-brabants
Copy link
Contributor

Q A
Documentation no
Bugfix no
BC Break no
New Feature yes
RFC no
QA no

Description

This small feature allows to pass a username to the RedisCluster constructor from the phpredis extension in order to be able to authenticate with a non-default user. Even though the README does not mention it, passing username and password in the form of an array is supported, see:

Without this feature, one could not connect to a cluster using a user other than the one named 'default'. When using RBAC it is recommended not to connect with the default user anymore by Redis.

This change should be backwards compatible in the sense that if no username option is specified, the phpredis extension will still connect with the default user.

Note: the stubs in Psalm are outdated: https://github.com/phpredis/phpredis/blob/develop/redis_cluster.stub.php#L50

@robin-brabants
Copy link
Contributor Author

@boesing
When you would find the time, could you maybe have a short look at this PR?

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.

1 participant