audit

package
v1.801.60 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package audit is the /v1/admin/audit query surface, wired to cloud's REAL tamper-evident audit store (the audit.Recorder Serve builds and hands over via deps.Audit).

cloud keeps its OWN append-only, hash-chained trail of every security-relevant request against this binary, and that is what a compliance auditor queries here. IAM's own login/session records remain a DIFFERENT trail; admin still federates them as a fallback when cloud's local store is not configured, so no capability is lost.

SECURITY. Both handlers are registered behind core.Guard (SuperAdmin only, fail-closed). They are READ-ONLY (Query and Verify issue SELECT only), so exposing them cannot weaken the append-only property.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Records

func Records(s *cloud.Service[core.State], c *zip.Ctx) error

Records answers GET /v1/admin/audit from cloud's local tamper-evident store when configured, else falls back to the IAM get-records proxy (federated view). Filters: org, sub, action, resource, result, since, until, pageSize, p (page). The response is the /v1 list envelope { data:[rows], data2:total } with the current chain integrity summary attached.

func Routes

func Routes(app *zip.App, s *cloud.Service[core.State])

Routes registers the /v1/admin/audit* surface (SuperAdmin only).

func Verify

func Verify(s *cloud.Service[core.State], c *zip.Ctx) error

Verify answers GET /v1/admin/audit/verify — the tamper-evidence check. It walks the whole hash chain and returns the integrity result (ok, count, head, and the seq where the chain first breaks if tampered).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL