You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add an option for TLS server certs
Allow configuring the trust store used to verify connections to Redis.
This is useful when working with something like GCP Memorystore for
Redis ([1]), which will issue a self-signed cert for managed Redis
instances. With this option, I can use Terraform to create the managed
Redis instance, get the server cert that was generated, and render it
into the Caddy configuration file.
[1]: https://cloud.google.com/memorystore/docs/redis
* Review feedback:
- Accept TLS server certs as either PEM string or path to PEM certs
- Add Caddyfile support
- Typos in document
- Provide config example in README
Copy file name to clipboardExpand all lines: README.md
+54-1Lines changed: 54 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,6 +115,59 @@ Connecting to Redis servers managed by Sentinal requires both the `failover` fla
115
115
```
116
116
Failover mode also supports the `route_by_latency` and `route_randomly` cluster configuration parameters.
117
117
118
+
### Enabling TLS
119
+
120
+
TLS is disabled by default, and if enabled, accepts any server certificate by default. If TLS is and certificate verification are enabled as in the following example, then the system trust store will be used to validate the server certificate.
121
+
```
122
+
{
123
+
storage redis {
124
+
host 127.0.0.01
125
+
port 6379
126
+
tls_enabled true
127
+
tls_insecure false
128
+
}
129
+
}
130
+
```
131
+
You can also use the `tls_server_certs_pem` option to provide one or more PEM encoded certificates to trust:
If you prefer not to put certificates in your Caddyfile, you can also put the series of PEM certificates into a file and use `tls_server_certs_path` to point Caddy at it.
170
+
118
171
## Maintenance
119
172
120
173
This module has been architected to maintain a hierarchical index of storage items using Redis Sorted Sets to optimize directory listing operations typically used by Caddy. It is possible for this index structure to become corrupted in the event of an unexpected system crash or loss of power. If you suspect your Caddy storage has been corrupted, it is possible to repair this index structure from the command line by issuing the following command:
@@ -123,4 +176,4 @@ This module has been architected to maintain a hierarchical index of storage ite
123
176
caddy redis repair --config /path/to/Caddyfile
124
177
```
125
178
126
-
Note that the config parameter is optional (but recommended); if not specified Caddy look for a configuration file named "Caddyfile" in the current working directory.
179
+
Note that the config parameter is optional (but recommended); if not specified Caddy look for a configuration file named "Caddyfile" in the current working directory.
0 commit comments