Skip to content
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

[feature] Reload TLSConfig.CAFile on SIGHUP #3746

Closed
SoMuchToGrok opened this issue Jan 12, 2018 · 9 comments
Closed

[feature] Reload TLSConfig.CAFile on SIGHUP #3746

SoMuchToGrok opened this issue Jan 12, 2018 · 9 comments

Comments

@SoMuchToGrok
Copy link

SoMuchToGrok commented Jan 12, 2018

A very much appreciated feature was recently delivered to support graceful reloads of the TLS configuration.

https://github.com/hashicorp/nomad/pull/3479/files

I think this needs to be extended to also refresh the CA file (if defined). I run very short TTLs on both server certificates and root CAs. As it's currently implemented, this is still a huge pain point for me.

I might be able to take a stab at this myself, but want to get a conversation going first. Thoughts or concerns?

Thanks!

@schmichael
Copy link
Member

Seems reasonable to me! Hopefully as easy as giving TLSConfig.CAFile the same treatment as the CertFile and KeyFile fields got in that PR.

@tmessi
Copy link
Member

tmessi commented Jan 15, 2018

I think you will also want to refresh the VaultConfig.TLSCaFile and ConsulConfig.CAFile and then reload the vault/consul clients to use the new config, since it is likely that these would be using the same CA, or at least the CAs for vault and consul would also be short lived.

Edit: It looks like the vault client is being reloaded, not sure about consul.

@tmessi
Copy link
Member

tmessi commented Jan 16, 2018

It looks like #3492 would almost resolve this issue. The only problem is that this function would potentially prevent reloads when they might be desired. In my case, the TLSConfig itself does not change, but the contents of the files referenced in the TLSConfig do change when a new CA is issued. If this reload would happen every time a SIGHUP is sent, it would address the TLSConfig.CAFile issue (the ConsulConfig.CAFile would still need to be addressed).

@schmichael
Copy link
Member

Just a heads up this feature will not land in #3492 as it's already a large PR that's close to merging. We'll definitely be using what's in #3492 to add this feature though.

@SoMuchToGrok
Copy link
Author

Sounds great @schmichael! Thanks for keeping us updated.

@SoMuchToGrok
Copy link
Author

#4025

I think this might be the enhancement we're looking for?

@Xopherus
Copy link
Contributor

I believe that PR does fix this issue @SoMuchToGrok. Though the fix does not reload the CA or cert on VaultConfig - that issue is captured in #6052

Seems like we can close this @schmichael?

@schmichael
Copy link
Member

Yes, thanks @Xopherus! Closing.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants