Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

feat: standardized audit logging schema and service

オープン
#87 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
静か
技術スタック
go
領域
backend, security

調査の方向性

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 OrgID universal enough for the schema? (Compass doesn't have orgs)
  • Should Target support 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/audit with simple string actor
  • Previous auth/audit package dropped in salt evolution PR #85
主要言語
Go
スター
14
フォーク
8
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

raystack/salt のほかの issue

raystack/salt の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。