= OpenId Roadmap = '''Bug Bug:210943 is the overarching bug about this.''' Steps required to turn Launchpad into a normal OpenId Consumer. '''As a ''' user<
> '''I want ''' to authenticate using my preferred OpenId provider<
> '''so that ''' I have fewer credentials to manage<
> == Rationale == A number of users would like to use their preferred OpenId provider rather than the Canonical OpenId provider (CanonicalSSO). * It is more convenient. * It is often more secure - if the OpenId provider is also the email service provider, only one party needs to be trusted. * It improves perception of Launchpad being a system for all Open Source developers, rather than for projects targetted at Ubuntu. This work has not been scheduled. Launchpad is currently in a 'good enough' state, having offloaded authentication to the CanonicalSSO, and the authentication system contains a lot of tech debt that needs to be cleaned up. == Stakeholders == Our users. ISD, maintainers of the CanonicalSSO. == Constraints and Requirements == === Must === * Keep Launchpad Account creation easy for users happy to use the CanonicalSSO. === Nice to have === === Must not === ''What MUST it not do?'' == Subfeatures == Steps 1-4 are tech-debt, irrespective of whether we follow this plan. 1. --(Tear out OpenId Provider code. Implement simple Developer/Test OpenId Provider. Bug:629167)-- (./) The OpenId Provider we currently use for development and testsuite environments is needlessly complex, from when Launchpad was itself an OpenId Provider. We should tear out all of this code, implementing a minimal OpenId Provider. The login screen can just be a single form containing: * a drop down list of the email addresses in the EmailAddress table. * a text box to use an email address not in the EmailAddress table. * a text box to override the OpenId Identity to use. * a login button. * a fail to login button. Doing this, we remove a load of code. It allows us to drop the AccountPassword and numerous legacy OpenId tables. It allows us to refactor the Account/EmailAddress/Person/OpenIdIdentifier parts of the data model. 1. Improve Launchpad/CanonicalSSO Integration. Bug:629169 /* This is here to wrestle moin syntax into submission. Without it, the next para joins with the bullet point above. Non-hacky help welcome. */ Currently, we mirror selected Launchpad information to the lp_* 'mirror' tables. These tables are then replicated using Slony-I to the CanonicalSSO databases. At a minimum, the CanonicalSSO systems need to stop using the lp_Account table to map OpenId Identifiers to Launchpad Person data (such as TeamParticipation). The CanonicalSSO could use a mirror the Launchpad EmailAddress information to map CanonicalSSO accounts to Launchpad information, or some entirely different mechanism allowing us to seperate the CanonicalSSO and Launchpad databases into separate replication clusters. 1. Simplify the Account table. Bug:629170 /* This is here to wrestle moin syntax into submission. Without it, the next para joins with the bullet point above. Non-hacky help welcome. */ Drop the displayname column on the Account table. Consider dropping the Account table entirely, linking OpenIdIdentifier directly to Person. 1. --(Drop EmailAddress.account Bug:629172)-- (./) Remove all Account and EmailAddress records not linked to a Person, reducing the number of Account records on the system by 90%. Drop the redundant EmailAddress.account link. 1. Switch to using OpenId Identity URLs. Currently, we are storing just the token used to generate the OpenId Identity URL. We should store the full URL. 1. Spec and implement workflow for signing up to Launchpad using a 3rd party OpenId Provider. Spec and implement workflow for attaching a 3rd party OpenId Identity to an existing Launchpad Account. Implement, rollout etc. == Workflows == ''What are the workflows for this feature? Even a short list can help you and others understand the scope of the change.'' ''Provide mockups for each workflow.'' '''''You do not have to get the mockups and workflows right at this point. In fact, it is better to have several alternatives, delaying deciding on the final set of workflows until the last responsible moment.''''' == Success == === How will we know when we are done? === === How will we measure how well we have done? === == Thoughts? == The following are notes about openid and identity from a conversation Curtis and Gary had recently. They are recorded as a brain dump in case they are useful later. Gary's writing this bit, so mistakes are his. We have several separate user interfaces to Launchpad: ssh + bzr; oauth + webservice; openid + browser; and email, with additional power provided by GPG signing. Each one of these has some method of providing Launchpad with a concept of trusted identity: ssh, openid/oauth, email, and GPG. Each should enable Launchpad to *uniquely* associate the input with a "Person" record. One notable thing about this for our discussion is that having access to an email account alone is sufficient for performing some actions on Launchpad. Alone, it is partially trusted. If you have GPG and email, you can do even more. To reiterate, email access is as good as openid for some activities. Openid relates to email because openid providers can include email addresses in their authentication messages. This can be a source a source of confusion. We see examples of this confusion with our trusted Canonical openid provider (see https://answers.launchpad.net/launchpad-foundations/+question/136307 and https://answers.launchpad.net/launchpad-foundations/+question/135971 for a couple of examples I can pull up in under a minute). Users don't understand that the systems are separate, or that setting a preferred email in Launchpad has little or nothing to do with the email they use to log into SSO. When they learn that they have to manage emails separately, they are understandably annoyed. Perhaps this confusion and annoyance will be less when the division between openid provider and Launchpad is greater. To make the division greater, we should do a few things. - Shut down login.launchpad.net. Even Canonical staff think this site is Launchpad. User believe they are providing Launchpad data. - State clearly that users are using a separate OpenID authenticator before following the link to that authentication. I believe this will follow naturally from supporting multiple OpenID providers. The openid-provided emails also give us some chances for automation. The automation can add to the confusion. We will first talk about the automation possibilities, and then discuss how they can add to confusion. An openid authentication to Launchpad can have one of the following three characteristics. * The openid provider includes email addresses in its authentication messages to Launchpad, and we trust the provider to give us verified email addresses. Canonical's SSO is an example of this kind of provider. We might also argue that we can trust Google's SSO, since it inherently includes a gmail account. We will call this TRUSTED. * The openid provider includes email addresses, but we do not trust them. This would be any openid provider that sends emails, and that we had not explicitly decided to trust (white list). We will call this UNTRUSTED. * The openid provider does not include email addresses. This would be any openid provider that does not send emails. We will call this NO EMAIL. The scenarios that we'll consider are these. * We have a TRUSTED or UNTRUSTED openid provider giving us an openid Launchpad has never seen before, with a validated email that is already associated in launchpad with an active (that is, not deactivated) person. We'll call this KNOWN EMAIL. * The same as the first one, but Launchpad has not validated the email. This is KNOWN UNVALIDATED EMAIL. [EmailAddressStatus.NEW] * The same as the first one, but the person with the email is deactivated. This is KNOWN DEACTIVATED EMAIL. [EmailAddressStatus.VALIDATED which can be used in email-based action if the user also has an email in EmailAddressStatus.NEW] [Curtis: Launchpad does not track user status or origin via email address. The PersonCreationRationale knows this, which can be observed by checking the person the email address is associated with. The Person's AccountStatus will state if the user was deactivated.] * We have a TRUSTED or UNTRUSTED openid provider giving us an openid Launchpad has never seen before with an email we've never seen before, or we have a NO EMAIL provider. This is NEW EVERYTHING. In the KNOWN EMAIL scenario with a TRUSTED openid provider, we have two trusted sources of emails. We can deduce that they are the same person, and simply connect the openid token with the existing person. Unfortunately this can increase the perception that the SSO and Launchpad are the same code base. Adding a step to confirm the connection, or at least a notification that it has happened, may help. If we are in the KNOWN EMAIL scenario with an UNTRUSTED provider, if the user wants to assert that they are the same person, I believe that we will need to do something like a merge of profiles: we will need to send out emails to some or all of the Launchpad emails to have them approve that the openid can be used for the account. Note generally in the KNOWN EMAIL scenario that, if the trusted, openid-provided email address is that of a team, we must not associate it (Bug:556680). With a KNOWN UNVALIDATED EMAIL, I don't quite know what to do and I don't think Curtis and I discussed it. With a KNOWN DEACTIVATED EMAIL, this is pretty much the same as what we should do if someone returns with a known openid for a deactivated person. Previously, the deactivation has made the emails unverified (per Curtis' note below, this may not be true; I don't understand yet). We should verify with the user that they want to reactivate their profile (that is, the Person record) (we don't right now). If so, we can automatically verify emails from TRUSTED providers; for UNTRUSTED providers, as with NO EMAIL providers, we need to get email verification again before we can reactivate the account. [Curtis: [A] person is active when there is 1 email address in EmailAddressStatus.PREFERRED. A deactivated user has 1 or more addresses in EmailAddressStatus.VALIDATED. Users were implicitly reactivated when they reset their password by setting the address used by the LoginToken as EmailAddressStatus.PREFERRED. The reset password scenario is not possible with OpenID, but the user should enter into an explicit reactivate profile scenario that uses LoginToken to verify the address the user wants set as preferred.] With a NEW EVERYTHING scenario, Curtis has convinced me that we should ask users what to do before we create a new profile, and warn them that, if they expected to log in to an existing account, they need to use an older email address. We have gotten several confused users thinking that we had deleted their accounts because they logged in with a new or different email address. [When Lp switched to OpenID, Launchpad lost the path to create profile LoginToken scenario. This seemed like a gift since users could use Lp much quicker. We can now see the gift is cracked, because there are cases where the user really should know he is setting up a profile, and know that Lp needs more than an email address to do many actions. Lp trusts email addresses from Ubuntu SSO, but this will not be the case with other OpenID providers -- many users should enter a profile setup workflow and start by validating their email address.] Other things to note: * Curtis tells me that a person can never delete all of their emails, even if they are deactivated. That's good. [Curtis: Users can delete their preferred address. The preferred address is changed to NEW when the user is deactivated] * The only way that a person can lose all of the emails is to be merged, or, right now, for the code in lib/lp/registry/model/person.py (getOrCreateByOpenIDIdentifier) to move an email. We strongly suspect that we should stop doing that last thing. * We ought to be able to see the openid account information the way we can see our emails. We might want to be able to manage these directly also. * [Curtis: Remove EmailAddress.account. That column can cause criss-crossed information where Account can point to a different Person.] * RobertCollins I think we haven't considered the directory service aspect properly. SSO needs to handle non-SSO accounts being returned from team membership lookups. Probably we need to either separate or check our assumptions about the SSO group management aspects. Specifically I think for things like U1 being a general openid client might be a win, but for Canonical websites its trusted group management we care about (and even there we might not care about which openid provider, but we will care a great deal about the integrity of the member-list of teams.