perf(replay): threats-only by default, no duplicate first-page or summary fetch

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas RayanandClaude Sonnet 5.5 committed 2026-11-23 10:15:50 -03:00
1 parent 19bec553f4
commit 91cdb4acbf
12 files changed
+111 -23

No files matched your search

+1 -1
View File
@@ -327,7 +327,7 @@ The user routes under `/api/v1/*` need `URUTAU_TOKEN` (bearer) or a session cook
| `GET /api/health` | `{"status":"ok"}`, no authentication |
| `GET /login`, `POST /login`, `POST /logout` | session cookie |
| `GET /api/v1/summary` (also `own`: web requests of `--trusted` and `--ignore` origins, counted apart; `totals.trusted`, `totals.internal` and `totals.requests_all` = `requests` + both; `totals.counts.trusted` and `.internal`), `/traffic`, `/ips`, `/ip/{ip}`, `/ip/{ip}/stix` | totals, web analytics, IP table, one address, STIX 2.1 bundle |
| `GET /api/v1/period`, `/period/events`, `/events`, `/events/sessions` | study of a period, event registry search (cursor), sessions |
| `GET /api/v1/period`, `/period/events`, `/events`, `/events/sessions` | study of a period, event registry search (cursor), sessions. `cat` takes a list of categories; a leading `!` negates it (`cat=!ok`, at most 100 characters) |
| `GET /api/v1/events/stream` | live stream over SSE (`?visits=1` adds anonymous visits) |
| `GET /api/v1/live/recent`, `/geo` | latest live events, geography |
| `GET /api/v1/metrics`, `/evolution`, `/concentration`, `/survival`, `/techniques`, `/sessions/funnel` | stable metrics and analytics |
+2 -2
View File
@@ -68,7 +68,7 @@ A side rail (a tab bar on phones, with a "More" menu that scrolls when it is tal
<p align="center"><img src="img/campaigns-dark.png" width="900" alt="Page: Campaigns"><br><sub>Campaigns: coordinated groups of addresses (Gantt and similarity).</sub></p>
<p align="center"><img src="img/campaign-detail-dark.png" width="900" alt="Page: Campaign detail"><br><sub>Campaign detail: members, timeline and shared traits.</sub></p>
**Replay** (`#/replay`): a period played back on the map with the ordered event list and the incident timeline, from the event registry.
**Replay** (`#/replay`): a period played back on the map with the ordered event list and the incident timeline, from the event registry. It plays threats only by default (every category but `ok`, so crawlers browsing a public site do not fill the pages): the category filter also offers "All, including legitimate traffic" or a single category, and the choice is kept in the link (`cat=all`; threats is the absence of `cat`). The timeline strip and the lead sentence count the same filter. Opening the page costs one events request, one period request and one (shared) summary request.
<p align="center"><img src="img/replay-dark.png" width="900" alt="Replay page: a period replayed on the map with the ordered event list and the incident timeline"><br><sub>Replay: a period played back, with incidents on the timeline.</sub></p>
@@ -174,7 +174,7 @@ State and city boundaries on the Geography page are from [Natural Earth](https:/
| `GET /api/v1/traffic` | session or bearer | web analytics of legitimate traffic. Query: `range`, `domain` (`all` or one domain), `host`. Returns visitors, pages, requests, bots, bytes, status classes, `p50_ms`, `p95_ms`, a timeline, top pages, referrers, countries, cities, browsers, operating systems, devices and bot names |
| `GET /api/v1/geo` | session or `URUTAU_TOKEN` | attacker geography. Without `cc`: `{"countries":[{"cc","events","ips","hostile","suspicious","cats"}]}` (up to 250). With `cc=XX` (and optionally `region`): `{"cc","events","ips","hostile","suspicious","cats","regions":[...],"cities":[{"name","region","lat","lon","events","ips"}],"top_ips":[...]}` (64 regions, 200 cities, 50 IPs). Query: `range`, `host`. Cached for 5 s |
| `GET /api/v1/live/recent` | session or `URUTAU_TOKEN` | `{"events":[...]}`: the latest malicious events of every probe, newest first, in the stream format. Query: `limit` (default 200, at most 500) |
| `GET /api/v1/events` | session or bearer | events of the registry, newest first. Query: `range` or `from`/`to`, `host`, `ip`, `cat`, `fam`, `q`, `order`, `limit`, `cursor` |
| `GET /api/v1/events` | session or bearer | events of the registry, newest first. Query: `range` or `from`/`to`, `host`, `ip`, `cat` (a list; a leading `!` excludes instead, so `cat=!ok` is every threat), `fam`, `q`, `order`, `limit`, `cursor` |
| `GET /api/v1/events/sessions` | session or bearer | sessions (bursts with a stage) of the period, optionally for one `ip` |
| `GET /api/v1/period` | session or bearer | the study of a period: sessions, campaigns, first-seen techniques, escalations, spikes, new vs returning, top targets, families, techniques, users and ASNs. Query: `range` or `from`/`to`, `host`, `gap` (seconds between sessions, 30 to 86400) |
| `GET /api/v1/period/events` | session or bearer | the events of a period in the stream format, for replay |
+1 -1
View File
@@ -327,7 +327,7 @@ As rotas de usuário em `/api/v1/*` exigem `URUTAU_TOKEN` (bearer) ou um cookie
| `GET /api/health` | `{"status":"ok"}`, sem autenticação |
| `GET /login`, `POST /login`, `POST /logout` | cookie de sessão |
| `GET /api/v1/summary` (também `own`: requisições web de origens `--trusted` e `--ignore`, contadas à parte; `totals.trusted`, `totals.internal` e `totals.requests_all` = `requests` + ambas; `totals.counts.trusted` e `.internal`), `/traffic`, `/ips`, `/ip/{ip}`, `/ip/{ip}/stix` | totais, web analytics, tabela de IPs, um endereço, bundle STIX 2.1 |
| `GET /api/v1/period`, `/period/events`, `/events`, `/events/sessions` | estudo de um período, busca no registro de eventos (cursor), sessões |
| `GET /api/v1/period`, `/period/events`, `/events`, `/events/sessions` | estudo de um período, busca no registro de eventos (cursor), sessões. `cat` aceita uma lista de categorias; um `!` no início a nega (`cat=!ok`, até 100 caracteres) |
| `GET /api/v1/events/stream` | stream ao vivo por SSE (`?visits=1` inclui visitas anônimas) |
| `GET /api/v1/live/recent`, `/geo` | últimos eventos ao vivo, geografia |
| `GET /api/v1/metrics`, `/evolution`, `/concentration`, `/survival`, `/techniques`, `/sessions/funnel` | métricas estáveis e análises |
+2 -2
View File
@@ -68,7 +68,7 @@ Uma barra lateral (barra de abas no celular, com um menu "Mais" que rola quando
<p align="center"><img src="../img/campaigns-dark-pt.png" width="900" alt="Página: Campanhas"><br><sub>Campanhas: grupos coordenados de endereços (Gantt e similaridade).</sub></p>
<p align="center"><img src="../img/campaign-detail-dark-pt.png" width="900" alt="Página: Detalhe da campanha"><br><sub>Detalhe da campanha: membros, linha do tempo e traços em comum.</sub></p>
**Replay** (`#/replay`): um período reproduzido no mapa com a lista ordenada de eventos e a linha do tempo de incidentes, a partir do registro de eventos.
**Replay** (`#/replay`): um período reproduzido no mapa com a lista ordenada de eventos e a linha do tempo de incidentes, a partir do registro de eventos. Por padrão toca só ameaças (toda categoria menos `ok`, para que robôs navegando num site público não encham as páginas): o filtro de categoria também oferece "Tudo, inclusive tráfego legítimo" ou uma só categoria, e a escolha fica no link (`cat=all`; ameaças é a ausência de `cat`). A faixa da linha do tempo e a frase de abertura contam o mesmo filtro. Abrir a página custa uma requisição de eventos, uma de período e uma de resumo (compartilhada).
<p align="center"><img src="../img/replay-dark-pt.png" width="900" alt="Página Replay: um período reproduzido no mapa com a lista ordenada de eventos e a linha do tempo de incidentes"><br><sub>Replay: um período reproduzido, com incidentes na linha do tempo.</sub></p>
@@ -174,7 +174,7 @@ Os limites de estados e cidades da página Geografia são do [Natural Earth](htt
| `GET /api/v1/traffic` | sessão ou bearer | web analytics do tráfego legítimo. Query: `range`, `domain` (`all` ou um domínio), `host`. Retorna visitantes, páginas, requisições, bots, bytes, classes de status, `p50_ms`, `p95_ms`, linha do tempo, top de páginas, referrers, países, cidades, navegadores, sistemas operacionais, dispositivos e nomes de bots |
| `GET /api/v1/geo` | sessão ou `URUTAU_TOKEN` | geografia dos atacantes. Sem `cc`: `{"countries":[{"cc","events","ips","hostile","suspicious","cats"}]}` (até 250). Com `cc=XX` (e opcionalmente `region`): `{"cc","events","ips","hostile","suspicious","cats","regions":[...],"cities":[{"name","region","lat","lon","events","ips"}],"top_ips":[...]}` (64 regiões, 200 cidades, 50 IPs). Query: `range`, `host`. Cache de 5 s |
| `GET /api/v1/live/recent` | sessão ou `URUTAU_TOKEN` | `{"events":[...]}`: os últimos eventos maliciosos de todas as sondas, do mais novo ao mais velho, no formato do stream. Query: `limit` (padrão 200, máximo 500) |
| `GET /api/v1/events` | sessão ou bearer | eventos do registro, do mais novo ao mais antigo. Query: `range` ou `from`/`to`, `host`, `ip`, `cat`, `fam`, `q`, `order`, `limit`, `cursor` |
| `GET /api/v1/events` | sessão ou bearer | eventos do registro, do mais novo ao mais antigo. Query: `range` ou `from`/`to`, `host`, `ip`, `cat` (uma lista; um `!` no início exclui em vez de selecionar, então `cat=!ok` é toda ameaça), `fam`, `q`, `order`, `limit`, `cursor` |
| `GET /api/v1/events/sessions` | sessão ou bearer | sessões (rajadas com estágio) do período, opcionalmente de um `ip` |
| `GET /api/v1/period` | sessão ou bearer | o estudo de um período: sessões, campanhas, técnicas vistas pela primeira vez, escaladas, picos, novos vs recorrentes, principais alvos, famílias, técnicas, usuários e ASNs. Query: `range` ou `from`/`to`, `host`, `gap` (segundos entre sessões, 30 a 86400) |
| `GET /api/v1/period/events` | sessão ou bearer | os eventos de um período no formato do stream, para o replay |