feat: standardized audit logging schema and service
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 30/100
調査の方向性
Start by comparing Frontier's core/audit/ implementation with the previous auth/audit package referenced in the issue, then review evolution PR #85. Resolve the OrgID, multiple targets, and Level design questions before defining the shared schema, Repository interface, and context helpers; done means the common package design is agreed and its scope is separated from project-specific storage and publishing.
索引モデルが issue の本文から書いたものです。
説明
Context
The previous auth/audit package was too simple — flat actor string, no target, no org scoping, no event publishing. Meanwhile frontier has a rich audit system with typed actors/targets, org scoping, webhook publishing, and event filtering.
Every raystack service that needs audit logging builds its own. A shared schema would enable consistent audit trails across services.
Proposed solution
Salt provides the common schema and context helpers. Projects provide storage and publishing.
Schema
type Actor struct {
ID string
Type string
Name string
}
type Target struct {
ID string
Type string
Name string
}
type Log struct {
ID string
OrgID string
Source string
Action string
Actor Actor
Target Target
Metadata map[string]string
CreatedAt time.Time
}
Interfaces
type Repository interface {
Create(ctx context.Context, log *Log) error
List(ctx context.Context, filter Filter) ([]Log, error)
GetByID(ctx context.Context, id string) (Log, error)
}
Context helpers
audit.SetActor(ctx, Actor{ID: "user-123", Type: "user", Name: "alice"})
audit.SetMetadata(ctx, map[string]string{"ip": "1.2.3.4"})
What projects provide themselves
- Storage implementation (postgres, kafka, external service)
- Event name constants (
app.user.created, etc.) - Publishing/webhook integration
- Target helpers specific to their domain
Design questions
- Is
OrgIDuniversal enough for the schema? (Compass doesn't have orgs) - Should
Targetsupport multiple targets per event? - Should the schema include a
Level(info/warn/critical)?
References
- Frontier's audit:
core/audit/— rich implementation with Actor/Target structs, webhook publishing - Guardian's audit: used old
salt/auditwith simple string actor - Previous
auth/auditpackage dropped in salt evolution PR #85
- 主要言語
- Go
- スター
- 14
- フォーク
- 8
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
raystack/salt のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
似ている issue
-
agentic-workflows
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
agentic-workflows
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
microsoft/agent-framework-go#1179 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
[Bug]: OLLAMA_KEEP_ALIVE="5m" / "24h" crashes Ollama embedding and vision models with ValueError オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
infiniflow/ragflow#20223 · リアクション 1 件 ·
-
bug needs triage pkg/translator/faro
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
open-telemetry/opentelemetry-collector-contrib#51484 · コメント 1 件 ·