Skip to content

feat(services): store raw packets in plaintext in iceberg tables - #134

Merged
TheMeinerLP merged 1 commit into
mainfrom
feat/iceberg-raw-plaintext
Nov 18, 2026
Merged

TheMeinerLP merged 1 commit into
mainfrom
feat/iceberg-raw-plaintext

Conversation

@TheMeinerLP

Copy link
Copy Markdown
Contributor

Summary

Raw packets in the Iceberg lake are now stored as plaintext, not encrypted per player. Until now every raw payload
was encrypted with a key that is deleted when a player asks for erasure, so an erasure made the old payloads
unreadable. The Iceberg lake is meant to keep raw packets permanently, which only works if its contents are
reviewed as personal data rather than shredded. The decision behind this is the maintainers' (2026-11-18). This PR
implements it for the Iceberg format only.

  • capture.raw in Iceberg holds the payload exactly as the plugin sent it, plus the pseudonymous player key and the
    client protocol version of the session. Version 2 of the layout; a version 1 table is refused at start-up with a
    message that says to drop it (no such table exists in production yet).
  • capture.events gets the player key too, so a later erasure can delete a player's rows in both tables.
  • Iceberg ingest no longer reads or unwraps player keys for raw data.
  • The Parquet format is unchanged: encrypted raw rows, short retention, crypto-shredding. The Parquet writer now
    refuses the plaintext layout, so the two cannot mix by accident.
  • Frames of orphan sessions (no session start seen) are stored with an empty player key and protocol version.

Not in this PR

  • Erasure of Iceberg rows. Until it lands, an erasure request does not remove anything from Iceberg tables.
  • Reading Iceberg raw data in the ML jobs; they still read the Parquet layout.
  • Changes to the capture plugin. It still drops chat and command frames and strips names from some packets, as
    documented in docs/pilot.md. Ingest stores what the plugin sends and filters nothing more.

Layout and the privacy notes are in docs/reference/data-lake.md section 2a.

Testing

  • Unit tests run the Iceberg writer against a local SQL catalog: table layout and version check, plaintext raw rows
    with their columns, player key and protocol version on both tables, orphan frames without them, no key lookup in
    Iceberg mode, erased players not written, the Parquet encoder refusing the plaintext layout, and the Parquet
    layout still encrypted.
  • Not run here: a deployment against the real Polaris catalog.

Iceberg raw rows hold the packet payload as the plugin sent it, in plaintext, together
with the pseudonymous player key and the client protocol version of the session. In this
layout raw packets are kept permanently (decision of 2026-11-18). The Parquet layout keeps
its encrypted, short-retention raw table and its crypto-shredding.

- capture.raw is layout version 2: session_id, segment, seq, offset_nanos, direction,
  state, packet_type, wire_packet_id, protocol_version, player_key, payload_original_size,
  payload, date. A version 1 table is refused at start-up with a clear message.
- capture.events gains player_key (Iceberg only), so every table can be erased per player.
- Iceberg ingest neither reads nor unwraps player DEKs. Parquet ingest is unchanged, and the
  Parquet encoder refuses the Iceberg layout, so plaintext cannot reach a Parquet file.
- Orphan sessions (no SessionStart) have a null player_key and protocol_version.
@TheMeinerLP
TheMeinerLP merged commit 05e0683 into main Nov 18, 2026
13 checks passed
@TheMeinerLP
TheMeinerLP deleted the feat/iceberg-raw-plaintext branch November 18, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant