Certificate Renewal for near expiration certificates

Hello guys!

I’m trying to automate the process of renewing the near expiration certificates with a script. We have many certificates issued by a CA and renewing them all manually is a huge pain( a kind of pain we are experiencing right now!). I started writing a script for the renewal in “Inline Source Code” as one part of the process for one project. The plan is that the script should find near the expiration date certificates in all certificates in octopus deploy and replace those with the provided one by asking the target server for the certificate file. This step is being put in one of the steps of the process in our project and after days of searching, I’m still helpless in importing the new certificate from the server and put it as a replacement. Can you kindly help me with that? More importantly, is that action even possible with octopus deploy?

Cheers,
Atefeh

Hi Atefeh,

Thanks for getting in touch! That’s a great question. After some research online for code samples, I came across the following thread where a user provided their PowerShell script for certificate renewal.

In addition, as of Octopus 3.16 we’ve included built-in support for Let’s Encrypt which might help automate the process of renewing your certificates.

Not sure if this is exactly what you’re after but thought I’d include our sample API code repo where we have a couple in relation to creating and replacing certificates.

Do any of these help you achieve what you’re after? Let me know what you think or if you have any further questions going forward. :slight_smile:

Best regards,

Kenny