tech5usa / TLSential

A server for providing short-lived TLS certificates to all services within a firewall restricted network.
GNU General Public License v3.0
15 stars 2 forks source link

Add Autorenewal go routine #23

Closed d1str0 closed 4 years ago

d1str0 commented 4 years ago

main.go now initiates a go routine to scan hourly for any certificates needing renewal. Default renewal is 30 days before expiration.

todo[bot] commented 4 years ago

Have API calls trigger a channel so all renews/issues funnel to

https://github.com/ImageWare/TLSential/blob/baafa8213bba56ebefaa68a709e97cad33bfa5c8/autorenew.go#L17-L22


This comment was generated by todo based on a TODO comment in baafa8213bba56ebefaa68a709e97cad33bfa5c8 in #23. cc @ImageWare.
d1str0 commented 4 years ago

BTW, the way I tested this was by setting the scanPeriod in autorenew.go to 1 min, and then I set the DefaultRenewAt in model/certificate.go to 90 days, then created a cert. This triggers it to renew every minute. WIthout those changes, it properly does NOT trigger renew.

debus commented 4 years ago

Not specified as a reviewer but looks good