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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redis 6.0 compatibility, its new ACL feature and authentication problems #21913
Comments
Does 'password' => array('user' => 'default', 'password' => 'xyz'), in config.php not work? |
I've tried that and Nextcloud wouldn't allow it, it just defaulted to false instead. So the easiest approach for me was to make the change at source code level. |
Also did the upgrade from 19.0.0 to 19.0.1 and now having the same issue. |
I'm using Redis with password authentication and it works like a charm. As @kesselb already wrote, you need to set the password in the redis configuration file and adjust the Nextcloud configuration accordingly: Redis configuration:
Nextcloud configuration:
|
Yeah, that could be another option. |
I'm having nextcloud and redis running in docker. Tried to add a redis password with the following in my docker-compose:
But no success. Does anybody know a way to set a password with redis in docker? |
@mazen-mardini I think if a different syntax is required to access a Redis server, this need to be changed in Nextcloud somehow. But before this is done, could someone please test if the new syntax ( |
@nocin Set this volume |
@j-ed I think "password" will just default to false if you pass an array to it. |
@mazen-mardini @kesselb I just applied the patch on my server with Nextcloud 18.0.7 installed,, restarted the web server and checked the log file of my Redis 5.0.9 server, while I used the Nextcloud GUI. I seems that everything still works as expected without an impact on the server. If someone else confirms that the patch has no impact on the communication with the Redis server (5.0.x) I would recommend to modify the code accordingly. |
@j-ed do you have a docker-composer for me? |
@kesselb No, I'm sorry. I don't have a docker composer for you. |
Already tried a similar way, but it just creates a folder with the name "/redis.conf/". Couldn't find the correct way to the redis.conf until now. But hopefully this will be fixed on NC side, that would make much more sense. |
The thing is that |
I figured out the problem. The auth-method call was improperly guarded. Even if a password was not set, auth would be called. I changed if (isset($config['password']) && $config['password'] !== '' && $config['password'] !== false) {
$this->instance->auth($config['password']);
}
@nocin There is no need to set a Redis password if you apply the changes above. Although setting a Redis password fixes the problem, the previous patch was pretty useless. I'm deleting it to prevent any confusion. |
Sounds like nextcloud/docker#1179 If password is not defined (no item with name password) isset is false. If there is a item with name password and value false or '' isset is true. That should be fixed over at nextcloud/docker. Afaik the current implementation works as documented. |
Ah, so it's a Docker-image problem. Thanks for the link. One question, is it wrong to define 'password' as false? Because currently if you do, you'll get issues with Redis. |
server/config/config.sample.php Line 1181 in cda6fad
|
Seems like this was fixed in the docker repository. |
How to use GitHub
Steps to reproduce
Expected behaviour
Nothing, Nextcloud should connect to Redis.
Actual behaviour
Redis authentication errors:
ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct?
caused bylib/private/RedisFactory.php:94
.This is probably an issue due to Redis 6 new ACL feature. Redis can have users now, and the "password" for Redis is now the password for a pre-defined user called
default
.Server configuration
Operating system: Using Docker, host is Linux 5.4.
Web server: Apache/2.4.38 (Debian)
Database: PostgreSQL 12.3
PHP version: PHP 7.4.8
Nextcloud version: 19.0.1
Updated from an older Nextcloud/ownCloud or fresh install: Updated from Nextcloud 19.0.0
Where did you install Nextcloud from: Docker
Signing status:
Signing status
No errors have been found.Are you using external storage, if yes which one: no
Are you using encryption: no
Are you using an external user-backend, if yes which one: no
Logs
Nextcloud log (data/nextcloud.log)
The text was updated successfully, but these errors were encountered: