I have a deployment system with a user interface that is accessible over the Internet. I want to make it more secure by re rolling the password periodically over the API. Is there a safe way I can store the password locally on my computer? I’m worried about someone brute forcing the password on the publicly available interface.
If you're the system's developer, that's an insecure model. The password should be salted and hashed at client side, then hashed again with a server-supplied nonce, and that hash checked on the server. The client machine should also be checked before checking the password. If the IP isn't static, it can be done with certificates.
The user-entered password shouldn't be used as anything other than a password, not as a key (use a KDF), not as an environment variable, nor stored any longer than it takes to hash it. Other secrets should be irreversibly derived from it and other values.
If you're not the developer and have been forced into this model by an application, then it seems like you're just looking for a local storage password manager like LastPass.
Well - you are asking for trouble here with your current setup. Why do you have a deployment interface exposed to the web?
You need to add
- IP whitelisting or host internally and connect into the network securely
- 2FA using an authenticator - SMS is out these days
- Store the salted hash not the password
- Use PBKDF2 or bCrypt for the hashing. Look up current suggested iterations numbers and imimplementation