When using RedisClient, the Redis connection is configured via a JSON file (see redis_config.json).
You can control transport security with two optional keys:
ssl(bool): enable TLS for the Redis connectionssl_verify(bool): whenssl: true, verify the server certificate
Backwards-compatible behavior:
- If
sslis omitted, the client behaves like older versions: TLS is enabled whenca_cert_pathis present; otherwise the connection is plaintext. - If
sslis true andssl_verifyis omitted, verification defaults to true.
Plaintext (insecure):
{
"host": "localhost",
"port": 6379,
"password": "your_password",
"encryption_key": "your_fernet_key",
"ssl": false
}TLS with certificate verification (recommended):
{
"host": "your.redis.host",
"port": 6379,
"password": "your_password",
"encryption_key": "your_fernet_key",
"ssl": true,
"ssl_verify": true,
"ca_cert_path": "path/to/ca.crt"
}TLS without certificate verification (insecure; vulnerable to MITM):
{
"host": "your.redis.host",
"port": 6379,
"password": "your_password",
"encryption_key": "your_fernet_key",
"ssl": true,
"ssl_verify": false
}