open-consul/agent/connect
Matt Keeler 133a6d99f2
Fix issue with changing the agent token causing failure to renew the auto-encrypt certificate
The fallback method would still work but it would get into a state where it would let the certificate expire for 10s before getting a new one. And the new one used the less secure RPC endpoint.

This is also a pretty large refactoring of the auto encrypt code. I was going to write some tests around the certificate monitoring but it was going to be impossible to get a TestAgent configured in such a way that I could write a test that ran in less than an hour or two to exercise the functionality.

Moving the certificate monitoring into its own package will allow for dependency injection and in particular mocking the cache types to control how it hands back certificates and how long those certificates should live. This will allow for exercising the main loop more than would be possible with it coupled so tightly with the Agent.
2020-07-21 12:19:25 -04:00
..
ca Remove unused return values 2020-06-24 13:00:15 -04:00
common_names.go
common_names_test.go Enable gofmt simplify 2020-06-16 13:21:11 -04:00
csr.go
generate.go
generate_test.go
parsing.go
sni.go
sni_test.go
testing_ca.go Fix issue with changing the agent token causing failure to renew the auto-encrypt certificate 2020-07-21 12:19:25 -04:00
testing_ca_test.go
testing_spiffe.go
uri.go
uri_agent.go Fix issue with changing the agent token causing failure to renew the auto-encrypt certificate 2020-07-21 12:19:25 -04:00
uri_agent_test.go
uri_service.go Fix issue with changing the agent token causing failure to renew the auto-encrypt certificate 2020-07-21 12:19:25 -04:00
uri_service_oss.go
uri_service_test.go
uri_signing.go
uri_signing_test.go
uri_test.go