auditlog

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package auditlog provides audit logging functionality for Warden service. It wraps the audit-kit library to provide convenient logging methods for user operations, access control events, and configuration changes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogger

func GetLogger() *audit.Logger

GetLogger returns the audit logger instance

func Init

func Init(storage audit.Storage, cfg *audit.Config)

Init initializes the audit logger with the given storage and config

func LogAccessDenied

func LogAccessDenied(ctx context.Context, userID, resource, ip, reason string)

LogAccessDenied records an access denied event

func LogAccessGranted

func LogAccessGranted(ctx context.Context, userID, resource, ip string)

LogAccessGranted records an access granted event

func LogConfigChange

func LogConfigChange(ctx context.Context, configKey, oldValue, newValue, ip, userAgent string)

LogConfigChange records a configuration change event (like log level)

func LogUserCreate

func LogUserCreate(ctx context.Context, userID, ip string)

LogUserCreate records a user creation event

func LogUserDelete

func LogUserDelete(ctx context.Context, userID, ip string)

LogUserDelete records a user deletion event

func LogUserQuery

func LogUserQuery(ctx context.Context, userID, identifier, identifierType, ip string, success bool, reason string)

LogUserQuery records a user query event

func LogUserUpdate

func LogUserUpdate(ctx context.Context, userID, ip string)

LogUserUpdate records a user update event

func Stop

func Stop() error

Stop stops the audit logger

Types

This section is empty.

Jump to

Keyboard shortcuts

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