audit: standardize operation correlation, identity provenance, and outcome semantics
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 15/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- go
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
LoggedAtas 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
LogTooutput, 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.
- 主要言語
- Go
- スター
- 2
- フォーク
- 5
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 124
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
stacklok/toolhive-core のほかの issue
-
needs-triage
難易度 3/5 1〜2日 初心者へのやさしさ 66/100
stacklok/toolhive-core#426 ·
メンテナーはふだん 1 日以内に返信
-
mcpcompat/server: refuse dispatch of a request whose per-request context is gone対応中かも @jhrozek が 10 日前に担当しました。 オープンneeds-triage
難易度 4/5 3〜5日 初心者へのやさしさ 54/100
stacklok/toolhive-core#414 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 5/5 1週間以上 初心者へのやさしさ 8/100
stacklok/toolhive-core#343 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
stacklok/toolhive-core#342 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
stacklok/toolhive-core#239 ·
メンテナーはふだん 1 日以内に返信
stacklok/toolhive-core の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
teradata-labs/loom#574 ·
メンテナーはふだん 1 日以内に返信
-
cli: name the CRID when saved link limits fail after publish; soften plain-republish mint warningオープンenhancement pr-polish-followup priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
layervai/qurl-integrations#1994 ·
メンテナーはふだん 1 日以内に返信
-
bug needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
CycloneDX/cyclonedx-go#304 ·
-
[Bug]: snowflake_share fails to read a share attached to a listing with target accounts ('TARGETED ACCOUNTS' in the "to" column)対応中かも @akhil9tiet が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
snowflakedb/terraform-provider-snowflake#5366 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信