Release / Plan (reuse the published image?) (push) Successful in 4s
CI / Docker image (build and smoke test) (push) Skipped
CI / Format and vet (push) Successful in 19s
CI / Tests (Linux, race detector) (push) Successful in 35s
CI / Dependency audit (push) Successful in 16s
Release / ci (push) Successful in 35s
Release / Build image (arm64) (push) Successful in 51s
Release / Build image (amd64) (push) Successful in 1m11s
Release / Publish tags (push) Successful in 13s
Release / Gitea release (push) Skipped
A new console interface (side rail, seven pages, opening sentence and active slice on every page, IP drawer, light and dark design tokens); a Geography page that drills from the world to a country's regions and cities; a Live page drawing attacks as arcs on a flat map or a globe. Backend: GET /api/v1/geo, GET /api/v1/live/recent, host/src/dst on live events, --location, a strict static file pattern, and live federation through GET /api/v1/peer/stream (peer token only, bounded and sanitized relay on the hub). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
57 lines
6.3 KiB
Markdown
57 lines
6.3 KiB
Markdown
<p align="center"><a href="../README.md">◂ Back to README</a></p>
|
|
|
|
# Interface
|
|
|
|
The dashboard is embedded in the binary: plain HTML, CSS and JavaScript, no build step and no external request (fonts, scripts and styles are all served by Urutau, which the Content-Security-Policy enforces). It follows the system light or dark theme, can be switched by hand, and speaks English or Portuguese (button in the header; the choice is remembered in the browser).
|
|
|
|
## Login
|
|
|
|
Open the address of the instance. Without a session you are sent to `/login`: paste `URUTAU_TOKEN`. The session lasts 12 hours (`urutau_session` cookie, `HttpOnly`, `SameSite=Strict`) and is revocable: it holds a random id kept in memory, **Log out** revokes it (and closes its live stream), and a restart of the daemon invalidates every session. Login and logout reject cross-site requests. After 5 failures from the same address (IPv6 counted per /64) in 10 minutes the login answers 429, and a correct token is still accepted but after a 1 second delay, so the limiter cannot lock the owner out. Wrong bearer tokens on the API count as failures too. The address is the real client behind the proxies listed in `--trusted-proxy`.
|
|
|
|
## Header
|
|
|
|
- A live indicator showing whether the event stream (SSE) is connected (an instance serves at most 20 stream clients at once).
|
|
- The **host** selector: `all`, this instance and every peer of a hub.
|
|
- The **range** selector: `1h`, `24h` or `7d`.
|
|
- Language, theme and logout buttons.
|
|
|
|
## Threats tab
|
|
|
|
- **KPIs:** requests, malicious events, hostile IPs, suspicious IPs, bans and the "monitoring" counter (benign requests from monitor User-Agents, kept out of the traffic numbers).
|
|
- **Timeline:** stacked counters per category over the selected range.
|
|
- **IPs:** a table with score, level (`hostile`, `suspicious`, `low`), categories, hosts, reverse DNS, country, city and ASN, last seen and ban state. It has a search box (IP or reverse DNS), a level filter, a "banned only" filter, sorting by IP, score or last seen, and paging. Click a row for the detail drawer: first and last seen, per-category counts, sample paths, User-Agents (parsed into browser, OS, device, bot or attack tool), domains, users and jails.
|
|
- **Live feed:** the latest events as they arrive. Fields from the logs are shown as text, never as markup.
|
|
- **Top lists:** attacked paths, domains, User-Agents and targeted users.
|
|
- **Blocklist:** pick a minimum score (default 50), copy the list or download it. It only lists hostile, globally routable addresses (never `--ignore` or `--trusted` ranges, never an IP with a successful SSH login); IPv6 appears as its /64, written `x:x:x:x::/64`.
|
|
- **Map:** a world map of the origin countries of hostile activity.
|
|
- **Hosts and sources:** every instance with its state (online, latency, version) and every log source with its state (`following`, `waiting`, `backfill`, `error`), lines read, malformed lines and last event. The file paths are not shown.
|
|
|
|
## Traffic tab
|
|
|
|
Privacy-friendly web analytics for legitimate traffic, built from the same Traefik log and replacing the analytics of the proxy: unique visitors, pages, referrers, countries, browsers, operating systems and devices, response latency (p50 and p95), bytes sent, and a world map of visitor countries. Unique visitors are counted by a hash with a daily salt; the IP of a legitimate visitor is never stored. See [SECURITY.md](../SECURITY.md).
|
|
|
|
## Attribution
|
|
|
|
IP geolocation data by [DB-IP](https://db-ip.com), licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). The credit also appears in the footer of the dashboard.
|
|
|
|
## HTTP routes
|
|
|
|
| Route | Auth | Purpose |
|
|
|---|---|---|
|
|
| `GET /api/health` | none | `{"status":"ok"}` |
|
|
| `GET /login`, `POST /login`, `POST /logout` | none | session |
|
|
| `GET /` and the static files | session | the dashboard |
|
|
| `GET /api/v1/summary` | session or bearer | everything the dashboard shows. Query: `range` (`1h`, `24h`, `7d`), `host` (`all`, a name) |
|
|
| `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 this instance and its peers, newest first, in the stream format. Query: `limit` (default 200, at most 500) |
|
|
| `GET /api/v1/peer/stream` | peer token only | live federation: server-sent malicious events of this instance. At most 10 connections; same 404/401/403 rules as the export |
|
|
| `GET /api/v1/peer/export` | peer token only | federation: `{"v":1,"summary":...,"traffic":{...}}` with the top 500 IPs and their detail. Query: `range` (`1h`, `24h`, `7d`). Cached for 5 s. 404 when no peer token is set, 401 for `URUTAU_TOKEN`, 403 from a source outside `--peer-allow` |
|
|
| `GET /api/v1/ips` | session or bearer | IP table. Query: `range`, `host`, `min_score`, `level`, `q`, `banned=1`, `sort` (`score`, `last`, `first`, `events`, `ip`), `order=asc`, `per` (1 to 200, default 50), `page` |
|
|
| `GET /api/v1/ip/{ip}` | session or bearer | detail of one IP, merged with the peers' exports |
|
|
| `GET /api/v1/events/stream` | session or bearer | Server-Sent Events, event `ev`, a ping every 20 s |
|
|
| `GET /api/v1/blocklist.txt` | session or bearer | one IP per line. Query: `min_score` (default 50), `range` (default `7d`), `host`, `family` (`4`, `6`; default both; `4` suits `ipset hash:ip`), `download=1` |
|
|
| `GET /api/v1/blocklist.json` | session or bearer | `{"generated","min_score","count","ips":[{"ip","score","last","hosts"}]}`; the `ip` of an IPv6 entry is a `/64` prefix |
|
|
|
|
API clients send `Authorization: Bearer <URUTAU_TOKEN>`. The peer token is accepted only by `/api/v1/peer/export` and `/api/v1/peer/stream`; every other route answers 403 to it.
|