Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

audit: standardize operation correlation, identity provenance, and outcome semantics

Aperta
#341 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
15/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go

Direzione di ricerca

Start with audit/event.go, which defines AuditEvent, the subject and target fields, the metadata map, and the LogTo and JSON paths. The issue asks for a documented profile and version policy, so the first step is a design proposal agreed with maintainers, not code. Done means the profile is documented, the JSON and slog projections are specified, and tests cover unknown outcomes, missing identities, and caller-supplied recording IDs.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

needs-triage

Problem

An investigation should be able to answer who did what, when, where, and with what outcome across components that use audit.AuditEvent. We already have the basic structure, generated event IDs, UTC logging timestamps, MCP event constants, and extensible metadata. We should reuse those rather than have each consumer invent a different record format.

What is missing is a documented shared profile for correlating an operation across authorization, dispatch, and observation, and for distinguishing verified identities from reported context. Free-form maps can carry the data today, but independently chosen keys and meanings make cross-component investigations unreliable.

Existing code: https://github.com/stacklok/toolhive-core/blob/5ba2b36edf8051b47bab103aad93223cb3dcd0b3/audit/event.go

Requested enhancement

Define shared conventions, constants, and only the small helpers needed for:

  • An operation identifier, an attempt identifier, and the existing event identifier. Multiple events can describe one attempt; a retry is a new attempt; resending the same audit record does not invent a new event.
  • Distinct authorization-decision, dispatch-intent/attempt, and observed-outcome events. A permit is not proof of dispatch, and a response is not independent proof of a downstream effect.
  • An explicit unknown or indeterminate outcome, distinct from denied, failed, and successful. In particular, a timeout after possible dispatch must not be reported as proof of nonexecution.
  • Issuer/trust-domain-qualified identities and evidence provenance: what the recording component verified, what another component reported, and what is unavailable. Do not promote an unverified identity from a rejected request into an authenticated subject.
  • Consistent action/target and recording component/location fields, plus namespaced optional references to policy revisions or other explanatory evidence. Keep the profile generic rather than adding product-specific session or agent models to the package.
  • A precise definition of LoggedAt as recording time and a convention for occurrence time when it differs. Preserve UTC/offset semantics and identify whose clock supplied a timestamp.

Prefer existing AuditEvent, Subjects, Target, and metadata extension points where they suffice. Document a stable profile/version and compatibility policy rather than requiring a wholesale schema redesign. Document the JSON and slog projections explicitly; they need consistent meaning even where field names already differ.

Acceptance criteria

  • Examples show two services recording a denied operation and a retried operation with an unknown first outcome. An investigator can distinguish events, attempts, sources, and verified versus reported subjects.
  • Tests cover shared field semantics in both JSON serialization and LogTo output, including missing identities, unknown outcomes, and caller-supplied recording IDs.
  • Existing event consumers and existing outcome values remain compatible, or any necessary breaking change is explicitly assessed before implementation.
  • Examples use allowlisted metadata and references, not raw credentials, claims, request headers, or unrestricted request/response bodies.

Scope

This supports the record-content and timestamp goals of NIST SP 800-53 AU-3 and AU-8. It does not claim full NIST compliance or select an event-retention backend, authorization policy, exactly-once execution mechanism, or required event inventory for every consumer.

NIST reference: https://csrc.nist.gov/pubs/sp/800/53/r5/upd1/final

One motivating consumer is the agent-audit design in https://github.com/stacklok/mecatl/pull/2121, but the profile should work for gateways, brokers, services, and workflows generally.

Lingua principale
Go
Stelle
2
Fork
5
Merge medio
1g 16h
PR unite (30g)
84

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di stacklok/toolhive-core

Tutte le issue di stacklok/toolhive-core

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.