<div dir="ltr"><div>More summary on our Monday meeting in MTV:</div><div><br></div>Previously, I’ve proposed that data stored in the password manager should be an exact representation of what the user asked for us to capture. Then, we can be flexible with how we interpret that data in the future.<div><br></div><div>The downside with this approach is that potentially violates an important principle in software engineering, DRY: "Every piece of knowledge must have a single, unambiguous, authoritative representation within a system”. Otherwise, terrible things.</div><div><br></div><div>By the end of Monday, we settled on Dolske’s rule for the Firefox password manager (not named while Dolske was in the room, FWIW), which is (something like): </div><div><br></div><div>“Every (username, realm) pair has a single, unique password in the Firefox password DB”. </div><div><br></div><div>WTF is a realm? A realm is a collection of origins where the same username/password combo (regardless of whatever the user’s particular choice is) can be used to log in to all origins in the realm. Sites with HTTP and HTTPS origins are (almost always) realms, but cross domain realms also exist, e.g., many Mozilla domains before Okta, and others.</div><div><br></div><div>Legacy data likely violates Dolske’s rule, and we can’t easily correct it on upgrade (because we don’t really know what the correct password is), so we’ll have to cope. But as a general rule:</div><div><br></div><div>1) If you’re writing the password DB in a way that violates Dolske’s rule, think hard about that. Our current thinking says you’re doing it wrong.</div><div>2) When you have an opportunity to correct a situation that violates Dolske’s rule, do it. For example, if the user has different HTTP and HTTPS passwords stored for a domain, and is saving a new password, consider consolidating the records into one. </div><div><br></div><div>I think having a DRY password DB will make the code simpler and easier to manage.</div><div><br></div><div>-chris</div><div><br></div></div>