auditlog

package
v1.801.307 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: Apache-2.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package auditlog mounts the ORG-SCOPED audit trail surface (GET /v1/audit): an org admin's read of THEIR OWN organization's security-relevant events off the same tamper-evident, hash-chained store the AuditTrail middleware writes and the admin god-view (/v1/admin/audit) reads.

WHY THIS EXISTS. An enterprise buyer's own compliance team must be able to see "what happened in MY org" — the audit trail is table stakes for SOC 2 / ISO / a security review — WITHOUT being a fleet operator. The pre-existing surface was admin-ONLY (/v1/admin/audit, s.guard → SuperAdmin), so a normal org owner had no audit route at all. This adds exactly the customer-facing, org-scoped read.

TENANT ISOLATION (the whole point). The org is the VALIDATED IAM owner claim (principal.Org — the trusted X-Org-Id the identity middleware minted from the caller's verified bearer, HIP-0026; NEVER a client-supplied header). Filter.Org is PINNED server-side to that org and a client `org` query param is dropped, so a caller can only ever read its OWN org's events — the per-org READ twin of the admin god-view. Fail-closed: no validated principal → 401, no store → 501.

The tamper-evidence GLOBAL verify (whole-chain hash walk) stays admin-only — it is a fleet property that would cross tenants — but every row carries its own hash/prevHash so an org admin still sees the chain linkage of their events.

Registered as "auditlog" (NOT "audit") + order 144: the name diverges from the /v1/audit route so serve.go's generic GET /v1/<name>/health liveness route parks at /v1/auditlog/health and never shadows the real trail. Order 144 binds /v1/audit before the ai subsystem's /v1/* catch-all (150).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mount

func Mount(app cloud.Router, deps cloud.Deps) error

Mount wires the org-scoped audit surface onto app per HIP-0106. The store is the SAME *audit.Recorder Serve builds and the AuditTrail middleware writes (handed through deps.Audit, which is NOT in Base) — this subsystem opens NO second store. Constructs the value directly (cloud.NewBase) since the store comes from Deps.

Types

This section is empty.

Jump to

Keyboard shortcuts

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