Remove password from password_manager::CreateSortKey() |
||
Issue descriptionIn its current implementation password_manager::CreateSortKey() builds a key containing the full password (https://codesearch.chromium.org/chromium/src/components/password_manager/core/browser/password_list_sorter.h?l=28&rcl=958c7e4e36162930004d13b0e5c721aa80324297). For security purposes we should remove the dependency on the password and replace it with something else, for example indices. Assigning to vabr@ who's currently refactoring PasswordManagerPresenter.
,
Nov 17 2017
Some updates after speaking to Ioana, Jan and Vadym: Vadym tells me the ability to save two different passwords for the same username in the same signon_realm was a glitch in the past, which got fixed. The users still might have such credentials saved, and as long as we include the password in the sort key, they are able to view all of them. We all agreed that a reasonable next step is to add UMA counting how frequently users have two passwords for a single username and signon realm. Once we have that in the stable, we can discuss whether it is low enough for removing the passwords from the sort key is safe. I plan to collect this UMA during the sort key computation, to inspect the effect on the set of users who actually view the passwords (as opposed to counting that during PasswordStore init). Because that will take a couple of releases to produce useful data, Jan is looking into alternatives to unblock his bug fix, which originally prompted the question of dropping passwords from the sort key.
,
Nov 17 2017
The CL with the UMA is at https://crrev.com/c/776684
,
Nov 20 2017
Can you clarify more the security reason? This is how imagine the structure. - PasswordManagerPresenter knows all the passwords. - It decides to group some of the entries on some criteria (I personally think that items with different passwords should never be in the same group). - It creates a second array of those groups. - We share only the strings we need to show with the JS code. Every row in the Polymer knows its index in the second array in C++.
,
Nov 20 2017
Note that as long as the sort key contains the password, the index in the sorted list is a hash of that password. So what you describe here is a particular instance of Jan's proposal with a hash. I don't think the security implications are serious (I'm also not a security engineer) and in any case this information is already available to the renderer. In the meantime Jan resolved to deal with the original issue by fixing the way unmasked passwords are attached to the page structure (and you provided some helpful comments on the corresponding e-mail thread). You raise a good point that items with different passwords should never be in the same group. What I was aiming at here was ensuring that whenever two entries have the same signon realm and username, they cannot have the same password. If we are sufficiently certain of that we might drop the passwords from the key (and perhaps add a DCHECK). On the other hand, given that we are not going to introduce any more information sharing between browser and renderer, perhaps keeping the key in is the best option. Are we still interested in the UMA from https://crrev.com/c/776684 ?
,
Nov 20 2017
Sorry for a typo: "perhaps keeping the key in is the best option" should have been "perhaps keeping the passwords in the key in is the best option"
,
Nov 20 2017
By index I meant an integer, nothing more. Let's say the list of the password is filtered and sorted by the date (a feature from the future). Still Polymer knows that the first row displayed has the index 7 in the C++ model. Regarding different passwords for the same origin and username. I think it's good to tackle this problem. I don't think it's related to the password list. It should not assume too much about the data stored.
,
Nov 21 2017
IIUC, we now have an agreement that password_manager::CreateSortKey() should keep passwords in the sort key to make it clear that two entries with different passwords will never be merged. As for the ability to store two different passwords for the same signon realm and username, this has not been possible for some time now. The only thing we don't know is how many old credentials with different passwords and same signon realm and username are still stored. I'm not sure if knowing that would influence any future decision. If id would, then I could add UMA in LoginDatabase::ReportMetrics to measure that. Otherwise I suggest doing nothing more.
,
Apr 6 2018
Re-reading #8, I'm not sure if there is anything to do for this any more. Sounds like the code is working as intended, and there seem to also be no TODOs linked to this bug. I'm closing for now, but happy to reopen if somebody knows a concrete action item I missed. |
||
►
Sign in to add a comment |
||
Comment 1 by vabr@chromium.org
, Nov 17 2017Labels: -Type-Bug OS-Android OS-Chrome OS-Fuchsia OS-iOS OS-Linux OS-Mac OS-Windows Type-Task