-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UWP => WinUI3 migration: PasswordVault cannot be accessed anymore #4393
Comments
The PasswordVault documentation does indicate that there is a difference in behaviour between an application in an AppContainer and one not in an AppContainer. There are two avenues of investigation that you can follow here.
Remember, desktop applications, when packaged, don't run in an AppContainer by default, where UWP applications do. It is also possible that there is a difference in the heavyweight AppContainer that UWP uses versus the lightweight AppContainer that desktop applications use. |
What is the package identity of your WinAppSDK WinUI3 application? The vault uses package identity to isolate creds between applications. If your WinAppSDK app is unpackaged, you likely won't see the creds from the prior application. |
Hi @DarranRowe & @jonwis, Thanks a lot for your assistance as well as your valuable feedback.
As vault resource and user name in the screenshot might suggest, the affected app is some sort of document management application. Thanks, BR Thomas |
@jonwis The only thing I haven't tried yet is to impersonate using a token created by NtCreateLowBoxToken to see if that helps. That would be a bit awful if that is how you are supposed to obtain the AppContainer credentials. --Edit--
|
Describe the bug
We are storing a randomly generated key inside the PasswordVault in order to encrypt and decrypt user data serialized to an xml (for improved security).
This is working fine for both the UWP and the WinUi3 applications on their own.
However, if the user was updating from UWP to WinUi3 application (package friendly name, etc. are identical, whereas the OS also handles this as an update!) the previously stored credentials are no longer retrievable!
Thus any encrypted serialization data in place prior to the update is now lost and no longer usable.
Steps to reproduce the bug
=> Please note, that no entry will be found.
Expected behavior
After upgrading app, credentials should still be fetchable.
Screenshots
The below image depicts the 'Credential Manager' (the above entry is from UWP, and the bottom one was generated within the very same app after migrating to WinUi3):
NuGet package version
Windows App SDK 1.5.3: 1.5.240428000
Packaging type
Packaged (MSIX)
Windows version
Windows 11 version 22H2 (22621, 2022 Update)
IDE
Visual Studio 2022
Additional context
No response
The text was updated successfully, but these errors were encountered: