Current behaviour
When a user tries to sign in using alternative sign in flows then login success/failures are tracked manually. But when this alternative login attempt fails because the user does not exist then there can be no user_id for the Datadog::Kit::AppSec::Events.track_login_failure
This results in an ArgumentError user_id cannot be nil even if user_exists: false is provided
Expected behaviour
if user_exists: false is provided, a nil value should be allowed.
Steps to reproduce
Call Datadog::Kit::AppSec::Events.track_login_failure with user_id: nil, user_exists: false
How does datadog help you?
We use datadog for log management, APM and security protection
Environment
- datadog version: 7
- Configuration block (
Datadog.configure ...):
- Ruby version: 3.3.4
- Operating system: Heroku ubuntu
- Relevant library versions:
Current behaviour
When a user tries to sign in using alternative sign in flows then login success/failures are tracked manually. But when this alternative login attempt fails because the user does not exist then there can be no
user_idfor theDatadog::Kit::AppSec::Events.track_login_failureThis results in an
ArgumentError user_id cannot be nileven ifuser_exists: falseis providedExpected behaviour
if
user_exists: falseis provided, anilvalue should be allowed.Steps to reproduce
Call
Datadog::Kit::AppSec::Events.track_login_failurewithuser_id: nil, user_exists: falseHow does
datadoghelp you?We use datadog for log management, APM and security protection
Environment
Datadog.configure ...):