smallstep / certificates

🛡️ A private certificate authority (X.509 & SSH) & ACME server for secure automated certificate management, so you can use TLS everywhere & SSO for SSH.
https://smallstep.com/certificates
Apache License 2.0
6.38k stars 417 forks source link

Regularly reload provisioners from DB #1754

Open ndtretyak opened 4 months ago

ndtretyak commented 4 months ago

Hello!

Issue details

If I understood the code correctly, the PUT /provisioners/{name} updates the provisioner object in the local cache of the instance that processes the request, and then this provisioner is saved to the database. However, it appears that all other instances connected to this database do not receive the updated configuration until a restart occurs. Would it be possible to introduce a goroutine that periodically calls ReloadAdminResources to ensure all instances are consistently updated?