gregtwallace / certwarden

Cert Warden is a centralized ACME Client. It provides an API for certificate consumers to fetch their individual keys and certs with API keys.
https://www.certwarden.com/
Other
176 stars 6 forks source link

Add post delete script for certificates #57

Closed Buco7854 closed 1 day ago

Buco7854 commented 4 days ago

Hello,

I use post processing script to write the certificate in a file so that it can be used by my web server. It's not super important but I wondered if that would be possible to add post delete script so that when i delete the cert in certwarden i can have a script that cleanup the certificate file.

gregtwallace commented 3 days ago

Initial setup and tear down events are generally one time occurrences that are done manually. I'm not understanding the utility of an automated delete script in this context.

Can you help me understand a scenario / use case?

Buco7854 commented 3 days ago

Just so that it's easier to do whatever for cleanup. After post processing you generally "setup" something with the script. So basically if I delete the cert it means whatever I setup need cleanup (in most case).

It's not that bothersome to go and delete the certificate file I created in post processing but it would be nice to have some script automatically called on delete to do it for me.

It's not that important a feature, just a small suggestion.

gregtwallace commented 1 day ago

How often are you deleting things?

In my mind I am seeing each renewal overwriting the old files (so deleting old files isn't needed). In that case, you would only ever have to delete once whenever you do the final teardown of whatever you're providing the files to.

If you're serializing the files or something, your post-process script could check for old files and delete them as a final step of the process which installs the new files.

Buco7854 commented 1 day ago

Well not really often for sure. my setup is fine as is, its probably not worth the time.

gregtwallace commented 1 day ago

Ok. This can be readdressed in the future if it becomes a commonly repeated activity for some reason.