Skip to content

Assume high risk for users who use a duplicate phone number

What does this MR do and why?

Related to: https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/work_items/758

This MR introduces a feature flag to assume high risk for a user when they attempt to verify their identity used by a different user within the same week. When a user is assumed high risk they will need to verify their identity by validating a credit card before they can proceed to validate their phone number. Abusive users have been seen to create a large number of accounts and our SMS provider charges based on the number of messages sent. Implementing this control should make it more difficult for abusive actors to register and reduce costs associated with SMS messaging.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Start GDK with SaaS simulation

    $ export GITLAB_SIMULATE_SAAS=1
    $ gdk start
  2. Ensure that you have a runner setup in GDK.

  3. Enable the relevant feature flags and configure the required settings

    > Feature.enable(:opt_in_identity_verification)
    > Feature.enable(:identity_verification_phone_number)
    > Feature.enable(:identity_verification_credit_card)
    > Feature.enable(:duplicate_phone_number_assume_high_risk)
  4. Create a phone number validation for an existing user

    [43] pry(main)> FactoryBot.create(:phone_number_validation, user: user, international_dial_code: '1', phone_number: '1234567890')
  5. With a different user navigate to http://gdk.test:3000/-/identity_verification and enter the same phone number. You should see that credit card validation is now required before phone validation.

Edited by Ian Anderson

Merge request reports

Loading