Skip to content
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

[Feature] Secure email change, multiple identities, and new identity types #1

Open
robotdan opened this issue Sep 26, 2018 · 4 comments
Labels
feature paid-feature Targeted for the paid editions of FusionAuth

Comments

@robotdan
Copy link
Member

robotdan commented Sep 26, 2018

Secure email change and multiple identities

Problem

Allowing just anyone to change your email address without adequate confirmation from both the current email address owner and the new email address owner - hopefully they are the same person - can be a huge security risk.

Solution

To properly handle modifying your email address the existing email address used for login must continue to work for authentication, and the owner of the email address must be notified of the change and allow it to be reversed or not approved at all.

There are many complexities to this problem that need to be solved correctly to ensure a secure transition from one email address to another.

Solution Details

The current design we have will allow for multiple emails per user to account which means the user may have a primary and one-to-many secondary email addresses. The user can then authenticate with a primary email address while a secondary one has been added and perhaps not yet verified during a change email workflow.

Account Takeover Scenarios

One of the use cases will be to protect against account takeover. The following are some examples of account takeover techniques.

Un-verified Email address

The lesson here is that unless you verify that a user owns the email address it can potentially be used for account takeover.

  1. A 3rd party application such as coolonlinegamestore.com allows users to sign up with email
  2. coolonlinegamestore.com does not require email addresses to be verified.
  3. Johnny Hacker signs up for coolonlinegamestore.com with an email address of jared@piedpiper.com.
  4. A user with email address jared@pipedpiper.com already exists in FusionAuth.
  5. FusionAuth has enabled an OpenID Connect IdP to allow users to login with their coolonlinegamestore.com account.
  6. Johnny Hacker logs into an application using FusionAuth as the IdP using the "Login with Cool Online Game Store" button.
  7. Johnny Hacker proceeds to log into coolonlinegamestore.com with his email address of jared@piedpiper.com.
  8. The token is returned to FusionAuth which contains an email claim of jared@piedpiper.com.
  9. FusionAuth looks up this user by email which is globally unique within a FusionAuth tenant and completes login for Johnny Hacker.

Johnny Hacker does not yet known the password for jared@piedpiper.com in FusionAuth but if the application allows the user to modify the password or email he can now completely take over the account. At a minimum he has logged into the application managed by FusionAuth as jared@piedpiper.com.

Non unique loginId

The lesson here is that any "login identifier" that is not globally unique can be potentially used for account takeover. In this example we'll utilize a username as it is the most common example.

FusionAuth is not currently susceptible to this attack because we do not allow the username to be set during a reconcile Lambda or used as the unique identifier during an IdP reconcile. We have discussed removing this limitation because it also limits legitimate use cases where the user of the lambda and IdP can guarantee the uniqueness of the username within a specific domain.

This feature will aim to support a non-unique "login identifier" and provide adequate controls to utilize it safely with external identity providers.

  1. A 3rd party application such as coolonlinegamestore.com allows users to sign up with a username.
  2. Johnny Hacker signs up for coolonlinegamestore.com with an email address of jared.
  3. A user with a username of jared already exists in FusionAuth.
  4. FusionAuth has enabled an OpenID Connect IdP to allow users to login with their coolonlinegamestore.com account.
  5. Johnny Hacker logs into an application using FusionAuth as the IdP using the "Login with Cool Online Game Store" button.
  6. Johnny Hacker proceeds to log into coolonlinegamestore.com with his username of jared.
  7. The token is returned to FusionAuth which contains a preferred_username claim of jared.
  8. FusionAuth looks up this user by username which is globally unique with a FusionAuth tenant and completes login for Johnny Hacker.

In this example, the account takeover may have been malicious, or it may be a username collision.

Johnny Hacker does not yet known the password for jared in FusionAuth but if the application allows the user to modify the password, username or email he can now completely take over the account. At a minimum he has logged into the application managed by FusionAuth as jared.

Self-service account management

This feature will also impact our self-service account management pages. We should ensure that all of the use cases are covered there including updates to email address, username, MFA, and password.

Related Issues

New identity types

Since this feature requires significant changes to our identity modeling, supporting new identity types seems like a good fit to include as well. Currently, FusionAuth supports emails and usernames for identities. Additional identity types might include:

  • Phone number (mobile likely)
  • Government id
  • Secure id
  • Certificate/token
  • None (just an id)

By adding the ability to have different identity types and verification and validation for each, FusionAuth can handle a wide array of use cases.

Related

How to vote

Please give us a thumbs up or thumbs down as a reaction to help us prioritize this feature. Feel free to comment if you have a particular need or comment on how this feature should work.

@robotdan robotdan changed the title Help us prioritize our roadmap Feature : Secure email change Sep 26, 2018
@robotdan robotdan added enhancement New feature or request feature and removed enhancement New feature or request labels Sep 26, 2018
@robotdan robotdan self-assigned this Sep 26, 2018
@robotdan robotdan changed the title Feature : Secure email change Feature: Secure email change Sep 27, 2018
@robotdan robotdan added this to Backlog in FusionAuth Issues via automation Oct 3, 2019
@tyduptyler13 tyduptyler13 self-assigned this Oct 8, 2019
@robotdan robotdan moved this from Backlog to In progress in FusionAuth Issues Oct 13, 2019
@robotdan robotdan moved this from In progress to Designing in FusionAuth Issues Nov 7, 2019
@zbruhnke
Copy link

@robotdan Adding to this (And the conversation in slack today) we have a couple of other ideal use cases for our team.

  1. A user would like to add a secondary email (but not make it primary)
  2. A user would like to add a secondary phone number (but not make it primary)
  3. A user would like to add a new email and set it as primary
  4. A user would like to add a new phone number and set it as primary.

Ideally we could have no limit to the number of emails or phone numbers tied to account but if there was a limit I'd say at least 3-5 would be nice on the high end.

On ALL of these scenarios ideally we would send an email (or text message) to the CURRENT primary email (or Phone number) for confirmation and to the new email (or number).

for a net NEW email or phone number we would want it to be confirmed before it could be made primary or used for account information.

Ideally there would also be a way to configure a setting in FusionAuth to either choose to FORCE the old email or phone to approve the change (with an email or text message) or allow it to happen without approval by the account owner (by just not objecting to it)

Because I think some use cases (like ours – banking) might dictate stricter rules (like always approve) while others (like SAAS) could be slightly more lenient.

In this use case we're thinking both multiple emails and multiple phones because we're using FusionAuth for 2FA and Email verification so building out a backend just for adding the additional ones seems like it would be silly to have that done outside of FA.

Let me know if this all makes sense.

@voidmain voidmain changed the title Feature: Secure email change Feature: Secure email change and multiple identities Feb 14, 2020
@robotdan robotdan added the paid-feature Targeted for the paid editions of FusionAuth label Jun 18, 2020
@voidmain voidmain changed the title Feature: Secure email change and multiple identities Feature: Secure email change, multiple identities, and new identity types Sep 16, 2020
@mooreds mooreds mentioned this issue Nov 9, 2020
@mooreds
Copy link
Collaborator

mooreds commented Feb 2, 2021

Relevant post about digital identity: https://christine.website/blog/identity-model-software-2021-01-31

@robotdan robotdan added this to the 1.37.0 milestone Feb 17, 2022
@robotdan robotdan changed the title Feature: Secure email change, multiple identities, and new identity types [Feature] Secure email change, multiple identities, and new identity types Mar 9, 2022
@robotdan robotdan modified the milestones: 1.37.0, 1.38.0 Jul 17, 2022
@robotdan robotdan modified the milestones: 1.38.0, 1.39.0, 1.40.0 Aug 12, 2022
@robotdan robotdan modified the milestones: 1.40.0, 1.44.0 Sep 16, 2022
@robotdan robotdan added the architecture-review Ready, but needs internal architecture review label Feb 17, 2023
@robotdan robotdan removed their assignment Feb 17, 2023
@robotdan robotdan removed the architecture-review Ready, but needs internal architecture review label Feb 17, 2023
@robotdan robotdan removed this from the 1.44.0 milestone Feb 28, 2023
@sanderkooger
Copy link

sanderkooger commented Jul 31, 2023

@mooreds Quick question.

Will fusionauth support mobile phone / SMS soon as MFA?

and maybe as secondary method to do a password reset?

@ColinFrick
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature paid-feature Targeted for the paid editions of FusionAuth
Projects
None yet
Development

No branches or pull requests

6 participants