login_attempts


Description

{“what”:“Log of each login attempt with outcome and context.”,“why”:“Without it, security incidents and account lockouts cannot be investigated.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:24.089241297+00:00”}

Columns

Column Type Size Nulls Auto Default Children Parents Comments
record_id text 2147483647 null

{“what”:“Unique opaque identifier for each attempt; primary key.”,“why”:“Without it, attempts cannot be referenced individually for updates or deduplication.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:24.116298167+00:00”}

user_id text 2147483647 √ null

{“what”:“User account identifier if known at attempt time.”,“why”:“Without it, attempts cannot be directly associated with a user account for lockout or audit.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:24.130503652+00:00”}

email text 2147483647 null

{“what”:“Email address submitted in the login form.”,“why”:“Without it, attempts cannot be matched to a user when user_id is absent.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:24.170361232+00:00”}

method text 2147483647 null

{“what”:“Authentication method used (e.g., password, oauth, magic-link).”,“why”:“Without it, security analysis cannot distinguish between credential attacks and token failures.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:24.184492667+00:00”}

success bool 1 null

{“what”:“Whether the attempt authenticated successfully.”,“why”:“Without it, success/failure rates and lockout triggers cannot be computed.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:24.199468198+00:00”}

failure_reason text 2147483647 √ null

{“what”:“Reason for failure when success is false (e.g., wrong password, expired token).”,“why”:“Without it, support cannot diagnose why a specific attempt failed.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:24.225749381+00:00”}

ip_address text 2147483647 √ null

{“what”:“Client IP address from which the attempt originated.”,“why”:“Without it, brute-force detection and geo-blocking are impossible.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:24.294374085+00:00”}

user_agent text 2147483647 √ null

{“what”:“Client user-agent string from the login request.”,“why”:“Without it, anomalous device patterns cannot be identified.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:24.403790708+00:00”}

attempted_at timestamptz 35,6 now()

{“what”:“UTC timestamp when the attempt was recorded.”,“why”:“Without it, rate limiting and time-based analysis of attack patterns are impossible.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:24.551865094+00:00”}

duration_ms int4 10 √ null

{“what”:“Elapsed time of the authentication attempt in milliseconds.”,“why”:“Without it, performance degradation of the login flow cannot be measured.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-22T23:55:24.627112470+00:00”}

Indexes

Constraint Name Type Sort Column(s)
login_attempts_pkey Primary key Asc record_id
idx_la_email Performance Asc/Desc email + attempted_at
idx_la_user Performance Asc/Desc user_id + attempted_at

Relationships