Skip to content

Add tracking when auto banning users

Alex Buijs requested to merge add-tracking-to-auto-banning into master

What does this MR do and why?

This adds tracking when users are auto-banned because they tried to identify with a phone number or credit card that belongs to a previously banned user:

  • write the event to the application log
  • track the event in sisense
  • record a custom attribute for the banned user

Issue: https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/369

How to set up and validate locally

  1. From the console run the following

    Users::AutoBanService.new(user: User.last, reason: :banned_phone_number).execute
  2. Verify the custom attributes on that user's detail page now show something like

    Screenshot_2023-09-26_at_15.14.15

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 Alex Buijs

Merge request reports

Loading