Help us shape the future of Go! Take the 2026 Go Developer Survey

cedarauthority

package
v0.0.41 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package cedarauthority provides the optional Cedar-backed authority evaluator.

Index

Constants

This section is empty.

Variables

View Source
var DefaultPolicy = []byte(`permit(principal, action, resource);`)

DefaultPolicy is the static shipped policy. The carried capability set is checked before Cedar evaluates this broad permit, so this policy cannot grant a capability the caller did not carry.

Functions

This section is empty.

Types

type Evaluator

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

Evaluator evaluates one immutable, startup-loaded policy set. Request entities are constructed per authorization; no policy or entity is registered globally.

func New

func New(policy []byte) (*Evaluator, error)

New parses an operator-owned static policy set. Definition-group permits are rejected because instance membership in a definition would widen authority.

func (*Evaluator) AuthorizeTool

func (e *Evaluator) AuthorizeTool(_ context.Context, request port.AuthorityRequest) (port.AuthorityDecision, error)

AuthorizeTool first enforces the carried capability set, then permits Cedar to add only denials such as a workspace path boundary.

func (*Evaluator) RequiresOwnerIdentity

func (*Evaluator) RequiresOwnerIdentity() bool

RequiresOwnerIdentity reports that Cedar policies receive owner entities and therefore cannot safely evaluate an ownerless request.

Jump to

Keyboard shortcuts

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