Add tracking for Email Verification
What does this MR do and why?
This adds backend Snowplow tracking for email verification, part of barriers to entry.
The following events are tracked:
- an invalid code is entered
se_category: "IdentityVerification::Email", se_action: "failed_attempt", se_property: "invalid",
- the code entered has expired
se_category: "IdentityVerification::Email", se_action: "failed_attempt", se_property: "expired",
- the attempt was rate limited
se_category: "IdentityVerification::Email", se_action: "failed_attempt", se_property: "rate_limited",
- a new code has been sent
se_category: "IdentityVerification::Email", se_action: "sent_instructions",
- the attempt was successful
se_category: "IdentityVerification::Email", se_action: "success",
Issue: https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/123
How to set up and validate locally
- Install Snowplow micro
gdk config set snowplow_micro.enabled true gdk reconfigure
- In rails console enable identity verification
Feature.enable(:identity_verification) ApplicationSetting.first.update(require_admin_approval_after_user_signup: false) ApplicationSetting.first.update(send_user_confirmation_email: true)
- Visit
http://localhost:3000
, logout and create a new user - Visit
http://localhost:3000/rails/letter_opener
and copy the code from the email - Fill in the code on the code verification page
- Visit
http://localhost:9091/micro/good
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.
Edited by Alex Buijs