Bash script to check when an azure’s service principal/application password or certificate expires

Sometimes you are gonna create a service principal on Azure Cloud that will manage some applications or automate some tasks. For example you might use a service principal to upload backups on Azure Storage. A service principal can be created with either password or a certificate but it has an expiration date by default. This means that in order to ensure that you can use your service principal and perform tasks you have assigned to it you have to change the password of certificate from time to time. I have created a simple script that uses azure-cli to check when the password or certificate expires. It can be executed via cron or a monit check and notify you.

Continue reading

Advertisements