Repository: paperless-ngx/paperless-ngx

Issue:
[BUG] WebSocket connection failed when enable password auth in Redis
### Description

The browser gives an error saying "WebSocket connection to 'wss://domain.com/ws/status/' failed" when I enable the password authentication in `/etc/redis/redis.conf` as follows

```
user    paperless       on      >password       allcommands allkeys allchannels
```

And the corresponding paperless-ngx config is also updated

```
PAPERLESS_REDIS=redis://paperless:password@172.17.0.1:6379
```

Everything works fine when no password is applied to Redis.

### Steps to reproduce

1. Set up password in `/etc/redis/redis.conf` by adding a line `user    paperless       on      >password       allcommands allkeys allchannels`.
2. Update the paperless-ngx config as `PAPERLESS_REDIS=redis://paperless:password@172.17.0.1:6379`
3. Restart Redis
4. Restart Paperless-ngx

### Webserver logs

```bash
It seems that there are no useful logs related to this issue.


[2023-03-23 12:35:56,075] [INFO] [paperless.management.consumer] Received SIGINT, stopping inotify
[2023-03-23 12:35:56,219] [DEBUG] [paperless.management.consumer] Consumer exiting.
[2023-03-23 12:36:19,672] [INFO] [paperless.management.consumer] Using inotify to watch directory for changes: /usr/src/paperless/consume
[2023-03-23 12:38:38,147] [INFO] [paperless.management.consumer] Received SIGINT, stopping inotify
[2023-03-23 12:38:38,154] [DEBUG] [paperless.management.consumer] Consumer exiting.
[2023-03-23 12:38:54,295] [INFO] [paperless.management.consumer] Using inotify to watch directory for changes: /usr/src/paperless/consume
[2023-03-23 12:39:07,098] [INFO] [paperless.management.consumer] Received SIGINT, stopping inotify
[2023-03-23 12:39:07,101] [DEBUG] [paperless.management.consumer] Consumer exiting.
[2023-03-23 12:39:21,806] [INFO] [paperless.management.consumer] Using inotify to watch directory for changes: /usr/src/paperless/consume
[2023-03-23 12:40:14,128] [INFO] [paperless.management.consumer] Received SIGINT, stopping inotify
[2023-03-23 12:40:14,135] [DEBUG] [paperless.management.consumer] Consumer exiting.
[2023-03-23 12:40:35,501] [INFO] [paperless.management.consumer] Using inotify to watch directory for changes: /usr/src/paperless/consume
[2023-03-23 12:42:56,560] [INFO] [paperless.management.consumer] Received SIGINT, stopping inotify
[2023-03-23 12:42:56,564] [DEBUG] [paperless.management.consumer] Consumer exiting.
[2023-03-23 12:43:11,954] [INFO] [paperless.management.consumer] Using inotify to watch directory for changes: /usr/src/paperless/consume
[2023-03-23 13:05:03,748] [INFO] [paperless.management.consumer] Received SIGINT, stopping inotify
[2023-03-23 13:05:03,764] [DEBUG] [paperless.management.consumer] Consumer exiting.
[2023-03-23 13:06:39,610] [INFO] [paperless.management.consumer] Using inotify to watch directory for changes: /usr/src/paperless/consume
[2023-03-23 13:09:44,876] [INFO] [paperless.management.consumer] Received SIGINT, stopping inotify
[2023-03-23 13:09:44,886] [DEBUG] [paperless.management.consumer] Consumer exiting.
[2023-03-23 13:10:04,482] [INFO] [paperless.management.consumer] Using inotify to watch directory for changes: /usr/src/paperless/consume
[2023-03-23 13:18:01,873] [INFO] [paperless.management.consumer] Received SIGINT, stopping inotify
[2023-03-23 13:18:01,880] [DEBUG] [paperless.management.consumer] Consumer exiting.
[2023-03-23 13:19:07,067] [INFO] [paperless.management.consumer] Using inotify to watch directory for changes: /usr/src/paperless/consume
[2023-03-23 13:23:57,472] [INFO] [paperless.management.consumer] Received SIGINT, stopping inotify
[2023-03-23 13:23:57,477] [DEBUG] [paperless.management.consumer] Consumer exiting.
[2023-03-23 13:24:16,664] [INFO] [paperless.management.consumer] Using inotify to watch directory for changes: /usr/src/paperless/consume
[2023-03-23 13:27:41,211] [INFO] [paperless.management.consumer] Received SIGINT, stopping inotify
[2023-03-23 13:27:41,219] [DEBUG] [paperless.management.consumer] Consumer exiting.
[2023-03-23 13:27:58,662] [INFO] [paperless.management.consumer] Using inotify to watch directory for changes: /usr/src/paperless/consume
[2023-03-23 13:34:54,946] [INFO] [paperless.management.consumer] Received SIGINT, stopping inotify
[2023-03-23 13:34:54,953] [DEBUG] [paperless.management.consumer] Consumer exiting.
[2023-03-23 13:35:15,317] [INFO] [paperless.management.consumer] Using inotify to watch directory for changes: /usr/src/paperless/consume
```


### Browser logs


```
WebSocket connection to 'wss://domain.com/ws/status/' failed: 
connect @ main.js:3
ngOnInit @ main.js:3
MR @ main.js:3
FE @ main.js:3
fp @ main.js:3
xp @ main.js:3
Gp @ main.js:3
detectChanges @ main.js:3
tick @ main.js:3
_loadComponent @ main.js:3
bootstrap @ main.js:3
(anonymous) @ main.js:3
_moduleDoBootstrap @ main.js:3
(anonymous) @ main.js:3
invoke @ polyfills.js:1
onInvoke @ main.js:3
invoke @ polyfills.js:1
run @ polyfills.js:1
(anonymous) @ polyfills.js:1
invokeTask @ polyfills.js:1
onInvokeTask @ main.js:3
invokeTask @ polyfills.js:1
runTask @ polyfills.js:1
_ @ polyfills.js:1
invokeTask @ polyfills.js:1
Z @ polyfills.js:1
N @ polyfills.js:1
F @ polyfills.js:1
```

### Paperless-ngx version

1.13.0

### Host OS

CentOS Stream release 9

### Installation method

Docker - official image

### Browser

Chrome

### Configuration changes

I only use the ghcr.io/paperless-ngx/paperless-ngx image. The MySQL and Redis databases are from the host.

### Other

_No response_


Discussion:
It's definitely something, but the websocket isn't really handled by us.  This also prevents consuming, and I see the crash coming from channels_redis using aioredis.  There's a chance it doesn't support ACL auth yet.

The workaround is using the older `requirepass` option for the moment.

Resolving patch:
diff --git a/src/paperless/settings.py b/src/paperless/settings.py
--- a/src/paperless/settings.py
+++ b/src/paperless/settings.py
@@ -358,7 +358,7 @@ def _parse_beat_schedule() -> Dict:
 
 CHANNEL_LAYERS = {
     "default": {
-        "BACKEND": "channels_redis.core.RedisChannelLayer",
+        "BACKEND": "channels_redis.pubsub.RedisPubSubChannelLayer",
         "CONFIG": {
             "hosts": [_CHANNELS_REDIS_URL],
             "capacity": 2000,  # default 100


Test patch: