access

package
v2.10.1 Latest Latest
Warning

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

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

Documentation

Overview

Package access is the Authorizer for an access list (docs/adr/0011, TAXONOMY.md D27): four roles, each a bundle of permissions, and teams that scope a contributor's work.

The policy is pure. Grants says what a principal holds; the engine puts the chains of teams a manifest sits under, and the fields a write changes, on the Action. Nothing here reads a store.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Policy

type Policy struct {
	// Grants returns what the access list gives a principal. An error is
	// a refusal.
	Grants func(ctx context.Context, p auth.Principal) (auth.Grants, error)
}

Policy decides from what Grants says a principal holds.

func (Policy) Authorize

func (p Policy) Authorize(ctx context.Context, pr auth.Principal, a auth.Action) error

Authorize refuses whoever is not listed or holds no role, lets every role read all but the access list, and decides writes by role, kind, team and field.

func (Policy) Scope

func (p Policy) Scope(ctx context.Context, pr auth.Principal, kind string) (auth.Scope, error)

Scope says how much of kind the principal may write, for an interface to offer only that.

Jump to

Keyboard shortcuts

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