GitHub user MiniaczQ created a discussion: Redis password no longer loaded from
`REDIS_PASSWORD` env var
### Bug description
I'm migrating from 0.15.2/5.0.0 to 0.22.4/6.1.0.
The most glaring issue is how sometimes `REDIS_PASSWORD` env var is used in
`superset_config.py`, but other times the password is inserted as plaintext.
In 0.15.2:
```
REDIS_BASE_URL=f"{env('REDIS_PROTO')}://{env('REDIS_USER',
'')}:{env('REDIS_PASSWORD')}@{env('REDIS_HOST')}:{env('REDIS_PORT')}"
```
```
RESULTS_BACKEND = RedisCache(
host=env('REDIS_HOST'),
password=env('REDIS_PASSWORD'),
port=env('REDIS_PORT'),
key_prefix='superset_results',
)
```
both load the password from environment.
In 0.22.4:
```
_redis_user = quote(env('REDIS_USER', ''), safe='')
_redis_password = quote(env('REDIS_PASSWORD', ''), safe='')
_redis_auth = f"{_redis_user}:{_redis_password}@" if (_redis_user or
_redis_password) else ""
REDIS_BASE_URL = f"redis://{_redis_auth}{env('REDIS_HOST')}:{env('REDIS_PORT')}"
```
```
RESULTS_BACKEND = RedisCache(
host="***.svc.cluster.local",
password="from-secret",
port=6379,
key_prefix="superset_results",
)
GLOBAL_ASYNC_QUERIES_CACHE_BACKEND = {
"CACHE_TYPE": "RedisCache",
"CACHE_REDIS_HOST": "***.svc.cluster.local",
"CACHE_REDIS_PORT": 6379,
"CACHE_REDIS_USER": "",
"CACHE_REDIS_PASSWORD": "from-secret",
"CACHE_REDIS_DB": 1,
"CACHE_KEY_PREFIX": "qc-",
"CACHE_DEFAULT_TIMEOUT": 86400,
"CACHE_REDIS_SSL": False,
"CACHE_REDIS_SSL_CERTFILE": None,
"CACHE_REDIS_SSL_KEYFILE": None,
"CACHE_REDIS_SSL_CERT_REQS": "required",
"CACHE_REDIS_SSL_CA_CERTS": None,
}
GLOBAL_ASYNC_QUERIES_RESULTS_BACKEND = {
"backend": "redis",
"host": "***.svc.cluster.local",
"port": 6379,
"prefix": "qc-",
"db": 1,
"password": "from-secret",
}
```
the first part is correct, while the second inserts my placeholder
`from-secret` phrase.
### Screenshots/recordings
_No response_
### Superset version
master / latest-dev
### Python version
3.11
### Node version
16
### Browser
Chrome
### Additional context
_No response_
### Checklist
- [x] I have searched Superset docs and Slack and didn't find a solution to my
problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug
report.
- [x] I have checked Superset's logs for errors and if I found a relevant
Python stacktrace, I included it here as text in the "additional context"
section.
GitHub link: https://github.com/apache/superset/discussions/43172
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]