We have the following scenario:
- MVVM userinterface where a user can place his password (actually a
PasswordBox
) - Server that shall do some work
- Server connects to some Database that requires authentification
And I already read this Question on PasswordBox in MVVM
But there is no answer on how to do! Just lots over "never ever do that".
What is the correct way of passing a password around? How to resolve the security issues?
There is no proper way of Binding
to the PasswordBox
and
the Password shall not be stored somewhere, okay.
So, what is the MVVM way of doing such things?
Even if the pattern is broken, is there a good way to achieve such things?
Thought of a Func<string>
to retrieve it, but without Binding this
will get a mess...
Update Same for initialising the PasswordBox from a (hopefully encrypted) password store. Isn't that breaking the MVVM pattern? The User does not want to enter the password each time he starts the application or wants to work with the database I believe.