Add increasing wait time between phone verification code sends
What does this MR do and why?
Implements https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/539+
Add increasing wait time between subsequent phone number verification code SMS sends after the first one.
Why?
See https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/539.
Database changes
-
sms_sent_at
(smallint
) andsms_send_count
(datetime_with_timezone
) columns are added tousers_phone_number_validations
table - No new or modified queries
Screenshots or screen recordings
How to set up and validate locally
-
Enable the relevant feature flags
> Feature.enable(:arkose_labs_signup_challenge) > Feature.enable(:identity_verification_phone_number) > Feature.enable(:identity_verification) > Feature.enable(:sms_send_wait_time)
-
Configure application settings for Identity Verification
> ApplicationSetting.first.update(email_confirmation_setting: 'hard') > ApplicationSetting.first.update(arkose_labs_public_api_key: "XXX", arkose_labs_private_api_key: "YYY", require_admin_approval_after_user_signup: false) > ApplicationSetting.first.update(telesign_customer_xid: 'XXX', telesign_api_key: 'YYY')
Note: credentials are in 1Password under
Telesign API keys (Development)
andArkoseLabs API keys (Development)
-
Register a new user
-
Force user to have medium risk
> User.last.custom_attributes.by_key('arkose_risk_band').first.update!(value: 'Medium')
-
Verify the user's email
> User.last.update(confirmed_at: Time.zone.now)
-
On the phone verification step, send a code to a valid phone number
-
Verify that resend links and buttons are disabled and displays a 1 minute wait time
-
Wait for the wait time to expire then send another code
-
Verify that resend links and buttons are disabled and displays the appropriate wait time (3 minutes, 5 minutes, 10 minutes, rate limited). See the demo videos above.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.