Telemetry
Security and audit SQL recipe

Detect Suspicious Authentication Bursts

Find short authentication windows with repeated failures across many identities or coarse network sources.

Advancedauthentication_eventsReviewed 2026-07-28Tested with Apache DataFusion 45.2.0

Reviewed by the Telemetry product team on . SQL compatibility, event contract, synthetic output, and operational caveats. Editorial ownership

Question answered

Which authentication windows show concentrated failure activity?

A burst view separates ordinary mistyped credentials from concentrated automated attempts. It uses privacy-safe actor and network buckets rather than raw credentials or full IP addresses.

Event contract

Fields the query expects

FieldTypeWhy it exists
timestamp_utcTimestampAuthentication outcome time.
actor_idUtf8Privacy-safe actor identifier.
network_bucketUtf8Approved coarse network or risk bucket.
authentication_methodUtf8Controlled authentication method.
outcomeUtf8success or failed.
DataFusion SQL

Copy the query

sql
SELECT
  date_trunc('hour', timestamp_utc) AS hour,
  network_bucket,
  authentication_method,
  COUNT(*) AS attempts,
  SUM(CASE WHEN outcome = 'failed' THEN 1 ELSE 0 END) AS failures,
  COUNT(DISTINCT actor_id) AS targeted_actors
FROM authentication_events
WHERE timestamp_utc >= now() - INTERVAL '24 hours'
GROUP BY date_trunc('hour', timestamp_utc), network_bucket, authentication_method
HAVING SUM(CASE WHEN outcome = 'failed' THEN 1 ELSE 0 END) >= 20
ORDER BY failures DESC, targeted_actors DESC;

This read-only query is planned and executed against an empty typed table with Apache DataFusion 45.2.0. The deterministic sample output is synthetic and reviewed separately; validate field types, thresholds, and business definitions against your own data. Read the testing methodology.

Query result

Authentication failures by network bucket

The proxy-risk bucket targets far more identities and has the largest failure volume.

hournetwork_bucketauthentication_methodattemptsfailurestargeted_actors
2026-07-28 18:00risk-proxypassword480451206
2026-07-28 19:00unknown-datacenterpassword12210411

Synthetic example output. Run the query against your own event schema and thresholds before using it for operational decisions.

Authentication failures by network bucket: static chart of synthetic failures values from the Detect Suspicious Authentication Bursts example result
Indexable SVG of the deterministic example output. Download it for an article, runbook, or design review with attribution.

Reproduce the example

Download the public fixture

The JSON bundle includes the typed event contract, illustrative input rows, exact SQL, expected output, review notes, and engine version. The CSV contains the displayed result.

How the SQL works

  1. 1Hour, network bucket, and method create an investigation unit.
  2. 2Distinct actors separates broad spraying from repeated attempts against one identity.
  3. 3The threshold is a review candidate, not an automatic proof of abuse.

Edge cases to decide

  • Privacy and security owners must approve network bucketing.
  • Shared corporate networks can create benign concentration.
  • Do not log passwords, tokens, cookies, or full IP addresses.

Recommended dashboard

  • Bars: failures by network bucket
  • Trend: targeted_actors by hour
  • Table: reviewed bursts and response outcome

Alert guidance

Route high-volume bursts to the security response process only after volume and actor thresholds are approved.

Read alert setup

Put the recipe to work

Related instrumentation and guides

Continue the analysis

Run it on real events

Create a table, adapt the fields, and save the result

Start free, send structured events, and use the query result as a chart, shared dashboard widget, or alert input.

Get an API key