Skip to content

Capture privacy per project: metadata, redacted or full - #58

Merged
josedaniel-dev merged 1 commit into
mainfrom
feat/capture-privacy
Oct 16, 2026
Merged

josedaniel-dev merged 1 commit into
mainfrom
feat/capture-privacy

Conversation

@josedaniel-dev

Copy link
Copy Markdown
Collaborator

Step 7 of docs/roadmap.md.

  • Modes per project: metadata (no input/output; content-like attributes dropped), redacted (emails, phones, Luhn-valid cards, SSN-shaped numbers, bearer/JWT/API-key shapes and secret-looking keys masked; also span and trace metadata), full. Stored in project_settings (migration 20261018_settings, full downgrade; up→down→up on SQLite, Postgres via CI).
  • Applied on every ingestion path through app/capture.py: the three SDK trace routes, the Manitos ingest (apply_envelope) and OTLP. Server-side, so it does not depend on the sender.
  • No silent change: a project without a mode keeps each path's default (SDK and Manitos store what they send, OTLP metadata). OBSERVATORY_CAPTURE_DEFAULT overrides the defaults. The OTLP-specific attribute filter moved into capture.py (same behaviour).
  • /v1/privacy/projects: list with a report from the latest 2000 spans per project (with input, with output, content-like attributes, sensitive patterns), PUT/DELETE the mode, and POST …/enforce (needs confirm) to rewrite stored data — irreversible, so it asks.
  • Dashboard: Privacy page (mode select, the report, "Apply to stored data" with a confirmation).
  • Tests: patterns (incl. Luhn and no false positives on dates/versions/order numbers), secret keys, each mode, each ingestion path, env default, project override, report and enforce. Backend 220 passed, dashboard 39, ruff/tsc/build clean. Checked in a browser on a synthetic instance: a project with emails in inputs showed 3 sensitive spans; switching to metadata and applying cleaned them; the manitos project showed 0 stored inputs/outputs; no overflow at 390 px.

Limits (docs/privacy.md): redaction is pattern-based, not NER (names/addresses are not detected); the attribute filter looks at key names; SDK traces posted without a project id have no project to configure.

… a stored-data report

metadata / redacted / full per project (project_settings, migration 20261018_settings), applied
in the SDK routes, the Manitos ingest and OTLP through app/capture.py. A project without a mode
keeps each path's default; OBSERVATORY_CAPTURE_DEFAULT overrides them. GET /v1/privacy/projects
reports what the latest spans hold (inputs, outputs, content-like attributes, sensitive patterns);
enforce (explicit confirm) rewrites stored data. Privacy page. Redaction is pattern-based.
Roadmap step 7 done.
@josedaniel-dev
josedaniel-dev merged commit fd9a49a into main Oct 16, 2026
5 checks passed
@josedaniel-dev
josedaniel-dev deleted the feat/capture-privacy branch October 17, 2026 01:49
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