auditor

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCreateEvent         = errors.New("failed to create audit event")
	ErrCreateEventMetadata = errors.New("failed to create event metadata")
	ErrSendEvent           = errors.New("failed to send audit event")
	ErrNilAuditor          = errors.New("auditor is nil")
)

Functions

This section is empty.

Types

type AuditLogger

type AuditLogger interface {
	SendEvent(ctx context.Context, logs plog.Logs) error
}

AuditLogger interface for easier testing and dependency injection

type Auditor

type Auditor struct {
	// contains filtered or unexported fields
}

Auditor handles audit logging for CMK operations

func New

func New(ctx context.Context, config *config.Config) *Auditor

New creates a new Auditor instance

func (*Auditor) SendCmkAvailableAuditLog

func (a *Auditor) SendCmkAvailableAuditLog(ctx context.Context, cmkID string) error

SendCmkAvailableAuditLog sends an audit log for CmkAvailable

func (*Auditor) SendCmkCreateAuditLog

func (a *Auditor) SendCmkCreateAuditLog(ctx context.Context, cmkID string) error

SendCmkCreateAuditLog sends an audit log for CMK creation

func (*Auditor) SendCmkDeleteAuditLog

func (a *Auditor) SendCmkDeleteAuditLog(ctx context.Context, cmkID string) error

SendCmkDeleteAuditLog sends an audit log for CMK deletion

func (*Auditor) SendCmkDetachAuditLog

func (a *Auditor) SendCmkDetachAuditLog(ctx context.Context, cmkID string) error

SendCmkDetachAuditLog sends an audit log for CMK detachment

func (*Auditor) SendCmkDisableAuditLog

func (a *Auditor) SendCmkDisableAuditLog(ctx context.Context, cmkID string) error

SendCmkDisableAuditLog sends an audit log for CMK disabling

func (*Auditor) SendCmkEnableAuditLog

func (a *Auditor) SendCmkEnableAuditLog(ctx context.Context, cmkID string) error

SendCmkEnableAuditLog sends an audit log for CMK enabling

func (*Auditor) SendCmkOffboardingAuditLog

func (a *Auditor) SendCmkOffboardingAuditLog(ctx context.Context, cmkID, systemID string) error

SendCmkOffboardingAuditLog sends an audit log for CMK offboarding

func (*Auditor) SendCmkOnboardingAuditLog

func (a *Auditor) SendCmkOnboardingAuditLog(ctx context.Context, cmkID, systemID string) error

SendCmkOnboardingAuditLog sends an audit log for CMK onboarding

func (*Auditor) SendCmkRotateAuditLog

func (a *Auditor) SendCmkRotateAuditLog(ctx context.Context, cmkID string) error

SendCmkRotateAuditLog sends an audit log for CMK rotation

func (*Auditor) SendCmkSwitchAuditLog

func (a *Auditor) SendCmkSwitchAuditLog(ctx context.Context, systemID, cmkIDOld, cmkIDNew string) error

SendCmkSwitchAuditLog sends an audit log for CMK switching

func (*Auditor) SendCmkTenantDeleteAuditLog

func (a *Auditor) SendCmkTenantDeleteAuditLog(ctx context.Context, tenantID string) error

SendCmkTenantDeleteAuditLog sends an audit log for CMK tenant deletion.

func (*Auditor) SendCmkTenantModificationAuditLog

func (a *Auditor) SendCmkTenantModificationAuditLog(
	ctx context.Context,
	cmkID, systemID string,
	action otlpaudit.CmkAction,
) error

SendCmkTenantModificationAuditLog sends an audit log for CMK tenant modification

func (*Auditor) SendCmkUnauthorizedRequestAuditLog

func (a *Auditor) SendCmkUnauthorizedRequestAuditLog(ctx context.Context, resource, action string) error

SendCmkUnauthorizedRequestAuditLog sends an audit log for CMK Unauthorized

func (*Auditor) SendCmkUnavailableAuditLog

func (a *Auditor) SendCmkUnavailableAuditLog(ctx context.Context, cmkID string) error

SendCmkUnavailableAuditLog sends an audit log for CmkUnavailable

Jump to

Keyboard shortcuts

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