At the moment we store the passwords in a plain text file to sign into git and other services. We want to finaly get rid of it and use the windows credential manager. The only problem we are facing is that I don't seem to find a solution to do it java.
I already looked at the following topics:
How do I store and retrieve credentials from the Windows Vault credential manager?
How to retrieve username and password from windows vault using java?
But for me they don't give me clear answer which api to use. If you could help me on my way to access this credential manager that would be awesome.
Looking for a way to access the Windows Credential Manager in java myself, I found that the Microsoft library in Jonas' answer provides a simple way to do that:
The dependency I used was
implementation("com.microsoft.alm:auth-secure-storage:0.6.4")
and the resultingCredential
object allows me to read the user/password. Also, theCredManagerBackedCredentialStore
object allows to add entries into the Windows Credential Manager.