Support for custom CA
Opened this issue · 0 comments
DrMagPie commented
Hello, in my limited testing of this tool I have faced issue with our custom CA certificates.
which are configured using these env vars https://www.consul.io/docs/commands/index.html#consul_cacert
I have glanced into your code and looks like there is no support for it.
Am I missing something?
Is it planned to add support for CONSUL_CACERT, CONSUL_CLIENT_CERT, CONSUL_CLIENT_KEY parameters?
Or might be you could suggest how to use your tool without these certs?
$ ./consul-snapshot backup
[INFO] v0.2.3: Starting Consul Snapshot
2019/08/20 08:59:56 [DEBUG] Backup starting on interval: 5s
2019/08/20 09:00:01 [INFO] Starting Backup At: 1566291601
2019/08/20 09:00:01 [INFO] Listing keys from consul
2019/08/20 09:00:01 [ERR] Unable to list keys: Get https://localhost:8500/v1/kv//?consistent=&recurse=: x509: certificate signed by unknown authority
$ export CONSUL_HTTP_SSL_VERIFY=false
$ ./consul-snapshot backup
[INFO] v0.2.3: Starting Consul Snapshot
2019/08/20 09:01:36 [DEBUG] Backup starting on interval: 5s
2019/08/20 09:01:41 [INFO] Starting Backup At: 1566291701
2019/08/20 09:01:41 [INFO] Listing keys from consul
2019/08/20 09:01:41 [ERR] Unable to list keys: Get https://localhost:8500/v1/kv//?consistent=&recurse=: remote error: tls: bad certificate