So I've made a bit of progress on this. I've fixed the issue by adding this line:
env_file: certwarden.env
Inside my file, I have listed:
CW_CLIENT_AES_KEY_BASE64='QJJBfCeyQ6JnlbZQS8Us0GFQN06nUGfHfMjNZnZXYfc'
This allows the cert to run and properly pull a cert. However, I'm now facing a seperate problem. I cannot figure out how to properly configure the client and server to pull down a new certificate once it's updated.
The client pulls the cert on a "fresh" start. But when the server updates, it complains that it cannot connect to the client:
11/20/2024, 3:17:30 PM, error, orders/post_process_do_client.go:104, orders: post processing worker 2: order 3: notify client failed: failed to post to client (Post "https://domain.com:5055/certwardenclient/api/v1/install": context deadline exceeded (Client.Timeout exceeded while awaiting headers)) (cert: 1, cn: domain.com)
I dont understand why the server is trying to connect to the client on https://domain.com ?
The guide says the client needs to be configured on CW_CLIENT_SERVER_ADDRESS (CLIENT ---> SERVER) but where is the connection in the opposite direction specified? I see there is an optional ENV variable called "CW_CLIENT_BIND_ADDRESS", but I cannot get the client to start up using anything for this value.
Error:
2024-11-20T15:30:20.973-0600 info main/config.go:148 starting Cert Warden Client v0.3.1
2024-11-20T15:30:20.974-0600 info main/config.go:258 new key/cert files will be permitted to write on Sunday Monday Tuesday Wednesday Thursday Friday Saturday between 03:00 and 05:00
2024-11-20T15:30:21.056-0600 info main/update_common.go:198 running key/cert update of client's cert
2024-11-20T15:30:21.057-0600 info main/update_common.go:208 new tls key/cert installed in https server
2024-11-20T15:30:21.057-0600 info main/update_common.go:185 key/cert file(s) write: not performed, but a write is needed
2024-11-20T15:30:21.058-0600 info main/https_server.go:33 starting https server bound to 192.168.1.109:5055
2024-11-20T15:30:21.058-0600 info main/update_schedule.go:117 scheduling write certs job for 2024-11-21 03:00:37 -0600 CST
2024-11-20T15:30:21.058-0600 fatal main/main.go:53 could not start https server (%s)