authz

package
v0.0.0-...-b5b2af5 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultRunner

func NewDefaultRunner(server Server) defaultRunner

func NewDockerPluginServer

func NewDockerPluginServer(opts ...DockerServerOption) (dockerPluginServer, error)

func WriteEvents2Log

func WriteEvents2Log(events []*event.Event, writer io.Writer) error

Types

type DockerPluginConfig

type DockerPluginConfig struct {
	Log        Log       `toml:"log"`
	Listener   Listener  `toml:"listener"`
	DockerAuth auth.Auth `toml:"docker_auth"`
	Policies   []Policy  `toml:"policies"`
}

func NewDockerPluginConfig

func NewDockerPluginConfig(paths ...string) (*DockerPluginConfig, error)

type DockerServerOption

type DockerServerOption func(option *dockerServerOption) error

func WithAuthLog

func WithAuthLog(path string) DockerServerOption

func WithListenerUnix

func WithListenerUnix(addr string) DockerServerOption

func WithPluginLog

func WithPluginLog(path string) DockerServerOption

func WithPolicy

func WithPolicy(policies ...Policy) DockerServerOption

func WithServerOptions

func WithServerOptions(options ...DockerServerOption) DockerServerOption

type Listener

type Listener struct {
	ListenAddr string `toml:"listener_addr"`
}

type Log

type Log struct {
	AuthZLogPath  string `toml:"auth_log_path"`
	PluginLogPath string `toml:"plugin_log_path"`
}

type Option

type Option interface{}

type Policy

type Policy struct {
	Action          string   `toml:"action"`
	EnabledPlugins  []string `toml:"enabled_plugins"`
	PluginParams    []string `toml:"plugin_params"`
	RiskLevelFilter []string `toml:"risk_level_filter"`
	Block           bool     `toml:"block"`
	Alert           bool     `toml:"alert"`
}

type Runner

type Runner interface {
	Run() error
}

type Server

type Server interface {
	Init() error
	Start() error
	Wait() error
	Close() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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