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

Username parameter not supported for redis connection #36298

Closed
SPie opened this issue Feb 17, 2021 · 1 comment
Closed

Username parameter not supported for redis connection #36298

SPie opened this issue Feb 17, 2021 · 1 comment

Comments

@SPie
Copy link
Contributor

SPie commented Feb 17, 2021

  • Laravel Version: 8.28.1
  • PHP Version: 7.4.15
  • Database Driver & Version: Redis 6.0.10 using predis

Description:

I'm using a Redis DB with the ACL feature, added in version 6, but I can't use the auth command with username and password because in Illuminate\Redis\RedisManager::parseConnectionConfiguration the username gets removed from the parameters.

return array_filter($parsed, function ($key) {
    return ! in_array($key, ['driver', 'username'], true);
}, ARRAY_FILTER_USE_KEY);

The username parameter is supported now by predis.

Steps To Reproduce:

'client' => env('REDIS_CLIENT', 'predis'),
'session' => [
            'host' => env('REDIS_HOST', '127.0.0.1'),
            'port' => env('REDIS_PORT', '6379'),
            'username' => env('REDIS_USERNAME'),
            'password' => env('REDIS_PASSWORD'),
            'database' => env('REDIS_DB', '0'),
 ],

Trying to use session handling with Redis throws a Predis\Connection\ConnectionException
AUTH failed: ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct?

@taylorotwell
Copy link
Member

Can you submit a PR that fixes your issue?

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

No branches or pull requests

2 participants