authz

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package authz integrates control-plane mutations with authorization.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidConfiguration reports an unusable authorization dependency.
	ErrInvalidConfiguration = errors.New("control-plane authorization: invalid configuration")
	// ErrUnauthenticated reports a missing authenticated principal.
	ErrUnauthenticated = errors.New("control-plane authorization: unauthenticated")
	// ErrActorMismatch reports an actor that differs from the authenticated ID.
	ErrActorMismatch = errors.New("control-plane authorization: actor mismatch")
	// ErrDenied reports a fail-closed non-allow decision.
	ErrDenied = errors.New("control-plane authorization: denied")
)

Functions

This section is empty.

Types

type Authorizer

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

Authorizer maps authenticated identities into tenant-scoped decisions.

func New

func New(evaluator DecisionMaker, subjectKind authorization.SubjectKind) (*Authorizer, error)

New creates a fail-closed control-plane authorizer.

func (*Authorizer) Authorize

func (a *Authorizer) Authorize(
	ctx context.Context,
	tenant string,
	actor string,
	permission controlplane.Permission,
	target controlplane.Target,
) error

Authorize verifies actor attribution and evaluates the requested permission.

type DecisionMaker

type DecisionMaker interface {
	Decide(context.Context, authorization.Request) (authorization.Decision, error)
}

DecisionMaker is the stable authorization evaluation seam.

Jump to

Keyboard shortcuts

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