3.0 KiB
3.0 KiB
type, title, description, tags, timestamp, story_id, status
| type | title | description | tags | timestamp | story_id | status | ||||
|---|---|---|---|---|---|---|---|---|---|---|
| User Story | Preserve a CloudEvents-style audit trail | Authentication, UI, account, Discord, network, and game actions create searchable immutable-style events. |
|
2026-08-14T01:23:35Z | US-010 | verified |
User Story
As an operator, I want security and identity activity recorded consistently, so that incidents and account changes can be reconstructed and later published to Kafka.
Acceptance Criteria
- Events preserve CloudEvents-style ID, specification version, source, type, subject, time, content type, and JSON data.
- Events can include user actor, IP address, and correlation ID.
- Portal access, magic-link creation and consumption, account changes, nickname changes, VPN blocks, game decisions, and confirmed proxy connections are recorded.
- Username changes learned from Velocity create their own event.
- Administrative actions include the acting SSO identity in event data.
- Every sent RCON command is represented in the audit ledger with its complete command text and acting SSO identity.
- RCON responses and credentials are never persisted in audit events.
- RCON command events are searchable by command text, server, and administrator.
- Events can be filtered by operator-friendly view and selected event types globally and from an individual user view.
- Every listed event links to a detail page showing its complete CloudEvents envelope and formatted JSON data.
published_atreserves an outbox path for future Kafka publishing.
Implementation
packages/database/src/events.tspackages/database/src/schema.tsapps/web/src/lib/audit.tsapps/web/src/lib/rcon-command-history.tsapps/web/src/app/admin/(console)/rcon/actions.tsapps/web/src/app/admin/(console)/rcon/history/page.tsxapps/web/src/app/admin/(console)/events/page.tsxapps/web/src/app/admin/(console)/events/[eventId]/page.tsx
Validation
The shared CloudEvent contract is covered by packages/contracts/test/contracts.test.ts. RCON action and history tests verify complete command attribution, correlated outcomes, audit-before-send behavior, and response and credential exclusion. All workspace tests, type checks, web lint, OKF validation, Semgrep, dependency audit, and the production build passed on 2026-08-14.