admin

package
v3.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL