Skip to content

Save data from ArkoseLabs only if user has been persisted

Eugie Limpin requested to merge el-save-arkose-data-when-user-persisted into master

Resolves https://gitlab.com/gitlab-org/gitlab/-/issues/389524

What does this MR do and why?

This updates the behavior of EE::RegistrationsController to only record a new user's data from ArkoseLabs when their user DB record has already been created.

Why?

Without checking for persistence the controller throws an error and the registration flow is disrupted.

Screenshots or screen recordings

before after
Screen_Recording_2023-01-27_at_4.52.01_PM Screen_Recording_2023-01-27_at_4.55.33_PM

How to set up and validate locally

Set up

  1. Toggle relevant feature flags and configure ArkoseLabs integration:
    $ rails console
    > Feature.enable(:arkose_labs_signup_challenge)
    > ApplicationSetting.first.update({ arkose_labs_public_api_key: '****', arkose_labs_private_api_key: '****', arkose_labs_namespace: 'client' })
    Notes:
    • Credentials are available in GitLab 1Password Engineering Vault

Validate

  1. Go to the registration page

  2. Fill up the form with duplicate username/email

  3. Solve the ArkoseLabs challenge if presented

  4. Validate that the registration form is re-rendered and the form errors are dipslayed:

    Like this

    Screenshot_2023-01-27_at_3.52.54_PM

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Eugie Limpin

Merge request reports