Skip to content

[api-gaps] G19. Audit export: the console's minimum shape (tracked by #33) #56

Closed

Description

@Adron

Priority 4 (when demand shows up) · Size M · Console milestone M4 · Tracked by #33

Problem

There's no audit export. This is already planned as #33 (Phase 3, triggered by a real compliance need). This issue records the minimum shape the console needs, so #33 can satisfy both at once.

Recommendation

Build it as part of #33 with this shape, and close this issue when #33 closes.

Plan (minimum the console needs)

  1. POST /v1/audit-exports: the same filters as GET /v1/audit-events, plus format: ndjson|csv. Hot window only. Permission audit.view (app-confined keys forced to their Application, as for the list). Idempotency-Key required. Returns 202 with an export id.
  2. GET /v1/audit-exports/{id}: status: pending|running|ready|failed, row_count, and, when ready, a signed S3 URL valid for 15 minutes, re-signed on each GET. Exports kept 7 days.
  3. Worker: the jobs Lambda streams the query to a private S3 bucket (SSE-KMS, lifecycle delete at 7 days), in pages, so large exports never hold everything in memory.
  4. Writes audit.exported (who, filters, row count), which is itself audited.

Acceptance

Delivered by #33. The console can request an export and download it when it's ready.

How to build it (per plan-remaining.md → Rules for every change): spec page and openapi.yaml first, then make gen; permission checks from the first commit; contract tests for every new or changed response; expand-only migrations, numbered in the order they reach production (0005 is reserved for #30); a Changelog entry.

Source: the management-console gap analysis (2026-10-21), openapi.yaml 1.0.0-draft.3, 118 operations.

Activity

  1. Adron commented on Oct 22, 2026

    @Adron
    MemberAuthor

    Delivered by #61 in the shape described here (via #33).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions