-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tls certificate issuer and updater #12
Comments
Summary at #12 Changes: - streamlined service installation so that services can now be installed, but not as a system service (such as vault exec on nomad machine) - better logging when a service fails to start - nomad cert generation now happens on the nomad machines - allow for parallel deployment by no longer using ../data locally - gossip keys now happen via configuration and keyring, as it seemed they would get out of sync on restarts otherwise - fixed numerous firewall issues, described in #11 - vault_env now supports foreign vault locations, as well as outputs the token it is using - added missing vault port 8201 to firewall rules - added server tags without type - disabled security group rules as they were not needed, local firewalls seem better - add cloudflare dns servers to resolv.conf on consul installations - curl no longer outputs progress bars
If I install a nomad agent on origin and the masters, then I could use nomad jobs to:
|
Seems https://github.com/hashicorp/consul-template/blob/master/README.md is the official answer, even includes a vault cert gen example |
Two recent progressions to make this easier. Progression One
Found via https://www.vaultproject.io/api/secret/pki/index.html#uri_sans-1 and https://www.vaultproject.io/api/auth/cert/index.html#allowed_uri_sans Then perhaps this issue can now be worked around, rather than implementing Consul Template. Consul Template does offer the advantage of short lived certificates that can update on the fly, but at the expense of a lot more complexity. Progression TwoConsul 1.2 introduces a new feature called Consul Connect, which automatically provides TLS for Consul Services (not consul, vault, and nomad themselves). However, in the docs for its various features, it includes these hints: https://www.consul.io/docs/guides/connect-production.html
https://www.consul.io/docs/connect/platform/nomad.html
Which hopefully means that HashiCorp are working on a way to make TLS automatic, not just for Consul services which Consul Connect already supports, but also for the HashiSuite itself. Relevant links:
ConclusionWith these developments, then it seems that a combination of
Should be the missing pieces for a TLS enabled cluster with minimum complexity for the current day. If option (2) proves to not work, then Consul Template will be required for this use case. However, Consul Template for that use case has limited life expectancy, as it seems HashiCorp are working to provide a automated and builtin alternative. As such, if (2) fails, then the options are:
If we do Consul Template, then in a few months (or years) later, we would end up having to upgrade to the automated updates anyway, moving away from Consul Template. As such, my thinking is if the URI SANs option fails, then just proceed without HashiSuite TLS encryption in the meantime until the updates to occur. |
Is the intent to be able to run the equivalent of Argo Tunnels over TLS due to the fact that Ip addresses are not static ? Your solution is something i have also been thinking about because i am in a non static IP address environment. The new Consul Connect looks interesting. Think a hacky setup should be tried to see if its works |
Seems Hasicorp is finally working to make this easier.
These would be essential reading for anyone who wants to continue this work. |
There is now consul connect support in nomad 0.10 which seems to also assist with this https://www.hashicorp.com/blog/consul-connect-integration-in-hashicorp-nomad/ |
Summary:
Generating the nomad certs on origin did not work as the nomad machines would then have certs which did not include their private_ips in the certs ip_sans, which would cause the cert to be rejected from the local instance.
I then tried to generate the nomad certs on the nomad machines. That fixes the ip_sans issue, but then prevents nomad to nomad communication as each nomad instance then has different certs.
Solving this seems to require a certificate issuer and update service.
Possible Solutions:
Local polling + local issuance:
Developer issuance in pre:
Developer issuance in post:
Abandon local TLS entirely for Cloudflare Argo Tunnel:
Assessment:
Local polling allows short TTL on local TLS. Accomplishes #4
Local polling AND dev issuance in pre, would involve reloading for all existing servers, when each new server added.
Dev issuance in post, would involve reloading for all servers, but only once in post.
Reloading may induce downtime if not timed to be simultaneous.
Conclusion:
Argo Tunnel should be explored. It could turn out to be easiest and most secure. And may turn out to be able to be used with service TLS.
At a later point, implement service TLS. It would require 1-3 weeks by estimate to get the options for it going.
The text was updated successfully, but these errors were encountered: