Documentation
¶
Overview ¶
Package admin holds the primitives specific to the reva Admin API: the audit helper. The invocation framework lives in pkg/invoke.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Audit ¶
func Audit(ctx context.Context, ev AuditEvent)
Audit emits a structured audit event (audit=true) on the context logger. Denials and failures are logged at error level, successes at info.
Types ¶
type AuditEvent ¶
type AuditEvent struct {
// Action is the operation, e.g. "request_admin", "invoke".
Action string
// Actor is the username of the caller.
Actor string
// Target is the affected user/service/node, when there is one.
Target string
// Kind is the invocation kind or an action sub-class, when relevant.
Kind string
// Granted records the outcome of a gate decision.
Granted bool
// Err is set when the action failed or was denied.
Err error
// Fields carries any extra structured context.
Fields map[string]string
}
AuditEvent is one admin action worth recording: who did what, against what, and how it turned out.
Click to show internal directories.
Click to hide internal directories.