Skip to content

FM-943 — Audit query API and audit log page #146

Closed

Description

@Andreas-Froyland

Epic: #122 · Depends on: FM-901

Context

The append-only audit ledger has no query surface.

Goal

GET /api/v1/audit with actor/action/resource/outcome/time filters and cursor pagination, fleetctl audit list --output json, and an Audit page.

Architecture reference

FM-104 audit ledger; ADR-0004.

Dependencies

FM-901

Research required

None.

Acceptance criteria

  • Metadata only; secrets never present by construction; new audit.read permission

Non-goals

  • Export/SIEM integration

Tests

Storage query tests, authz, API contract, CLI snapshots.

Activity

  1. added
    agent:codexAssign to Codex: logic, API, storage, backend
    agent:glmAssign to GLM 5.3 flash: simple, tightly specified tasks
    on Sep 24, 2026
  2. Andreas-Froyland commented on Sep 24, 2026

    @Andreas-Froyland
    MemberAuthor

    Split by model: the audit query API (storage query, audit.read permission, OpenAPI, fleetctl audit list) is agent:codex; the audit log page is agent:glm once the API has landed.

  3. Andreas-Froyland commented on Sep 24, 2026

    @Andreas-Froyland
    MemberAuthor

    Implementation approach: keep this Codex slice to the audit query API and fleetctl; the issue comment assigns the Audit page to agent:glm after the API lands. Add an application-layer authorized audit read use case and query port, with the SQLite adapter applying actor/action/resource/outcome/time filters before sequence cursor pagination. Expose the filtered page as metadata-only API DTOs, document it in OpenAPI, regenerate the TypeScript client, and add fleetctl audit list --output json with the same filters/cursor. Keep audit.read as the existing catalog permission, enforce it in the application layer, and cover storage filtering/pagination, denied authorization, API contract, and CLI output.

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

    agent:codexAssign to Codex: logic, API, storage, backendagent:glmAssign to GLM 5.3 flash: simple, tightly specified tasks

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions