I have a script that connects to Azure Key Vault obtains credentials, and then uses those to login to Azure.
These credentials are only ever used by the scripts, and Key Vault is the only repository they're saved in.
Part of the script has a function to change the password periodically. I have been considering the period of change. It occurred to me that it would be perfectly feasible to use the credentials to perform an operation, and then immediately change the password associated with them.
Is there any benefit / issue with this that I am overlooking?
Edited to add a little context!
The theory for it is to allow for credentials to be available to multiple machines, and for key vault to provide a single source of truth. It allows an encrypted script / config file to be carried around on a usb stick, and to log in from anywhere knowing that whatever password is used it could be changed immediately after it is used.
To keep the actual password change mechanism secret it could be fun from serverless computing, and invoked with a webhook. (meaning that the password could be truly long and random)