Skip to content

Add Arkose email intelligence service

Ian Anderson requested to merge ia-email-intelligence-service into master

What does this MR do and why?

Closes https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/work_items/813

This MR adds an Arkose email intelligence service. Email intelligence is only available as part of the Verify API so it also includes some refactoring to reuse the code in the Arkose token verification service.

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. Setup Arkose

    > ::Gitlab::CurrentSettings.update(arkose_labs_public_api_key: 'PUBLIC_KEY', arkose_labs_private_api_key: 'PRIVATE_KEY', arkose_labs_namespace: 'client')

    Credentials are in 1Password under ArkoseLabs API keys (use GitLab - Development - Registration Flow - Key 1)

  3. Execute the email intelligence service and verify that the detumbled address and email risk score are present in the response.

    [5] pry(main)> response = Arkose::EmailIntelligenceService.new(email: 'test.user+gitlab@gmail.com').execute
    [6] pry(main)> response.payload.detumbled_email_address
    => "testuser@gmail.com"
    [7] pry(main)> response.payload.email_risk_score
    => 25
Edited by Eugie Limpin

Merge request reports

Loading