To what degree is PasswordVault securing and isolating data?

166 views Asked by At

I am considering using PasswordVault to store a sensitive piece of data in my Windows Store app.

I have already done some basic research around examining the protection this class provides. I wrote two sample applications, the first writes a bit of data to the vault and the second tries to get that data.

It appears that even though the second application is using the same key as the first app used in saving the data; the second app cannot retrieve that data. This is good.

Does anybody know how the PasswordVault isolates the data to one App? For another app to get it's hands on my app's PasswordVault data would it have to impersonate my App's sid?

For clarity:

App1 does this

    const string VAULT_RESOURCE = "App1 Credentials";
    var vault = new PasswordVault();
    vault.Add(new PasswordCredential(VAULT_RESOURCE, "Foo", "Bar"));

App2 does this

        var vault = new PasswordVault();
        const string VAULT_RESOURCE = "App1 Credentials";
        try
        {
            var creds = vault.FindAllByResource(VAULT_RESOURCE).FirstOrDefault();
            if (creds != null)
            {
                UserName = creds.UserName;
                Password.Text = vault.Retrieve(VAULT_RESOURCE, "Foo").Password;
            }
        }
        catch (COMException)
        {
            // this exception likely means that no credentials have been stored
        }

Now App2 receives an exception indicating no such credential exists. This is good. What I want to understand is to what degree would App2 need to go to get it's hands on the data App1 stored.

0

There are 0 answers