Open josephmyers opened 1 year ago
I created a cross-platform SIL.PasswordStore library that we could/should use (nuget package). This is a wrapper around OS functionality.
This would change the way we store the password, so we would no longer put it in the config file and we no longer need EncryptPassword/DecryptPassword methods. How the password is stored and encrypted would be left to the OS.
We could consider a migration path where we read the encrypted password from the config file, decrypt it, store it with SIL.PasswordStore, then delete it from the config file.
ServerSettingsModel has the methods EncryptPassword and DecryptPassword. These use System.Security.Cryptography.ProtectedData, which compiles for .NET6 but throws a runtime exception on Linux.
No one is currently using this, but if they try it will break. We need a cross-platform password solution, or one that at least adapts to platform-specific calls.