auditors

package
v0.0.0-...-6c3212e Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCtr = prometheus.NewCounterVec(prometheus.CounterOpts{
		Name: "choria_aaa_auditor_errors",
		Help: "Total number of audit requests that failed",
	}, []string{"site", "auditor"})
)

Functions

This section is empty.

Types

type Action

type Action int

Action is the action taken by the authorizer on a specific message

var (
	// Unknown action
	Unknown Action = 0

	// Allow indicates the message was allowed
	Allow Action = 1

	// Deny indicates the message was denied
	Deny Action = 2

	// ActionNames are descriptive names for actions to be used in logging etc
	ActionNames = map[Action]string{
		Unknown: "unknown",
		Allow:   "allow",
		Deny:    "deny",
	}
)

type Auditor

type Auditor interface {
	// Audit should audit the action taken on a message
	Audit(act Action, caller string, req protocol.Request) error
}

Auditor is a plugin that audits the action taken on a request

Directories

Path Synopsis
Package jetstream implements a auditor that publishes audit logs to NATS JetStream
Package jetstream implements a auditor that publishes audit logs to NATS JetStream
Package logfile is a auditor that simply logs to a file
Package logfile is a auditor that simply logs to a file

Jump to

Keyboard shortcuts

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