authz

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: Apache-2.0 Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package authz holds what every authorization decision shares: the resource a check names and the two refusals. It decides nothing itself; auth/rbac does. Kinds, ids and owner kinds are opaque product strings.

Index

Constants

This section is empty.

Variables

View Source
var ErrForbidden = errors.New("authz: forbidden")

ErrForbidden refuses an authenticated caller that lacks the permission.

View Source
var ErrUnauthenticated = errors.New("authz: unauthenticated")

ErrUnauthenticated refuses a caller with no authenticated principal.

Functions

This section is empty.

Types

type Owner

type Owner struct {
	Kind string
	ID   string
}

Owner is who or what a resource belongs to.

type Resource

type Resource struct {
	Kind string
	ID   string
	Name string
	// Owner nil means the owner is unknown, as in a list or a create without one; rules must not read that as an owner they would allow.
	Owner *Owner
}

Resource is the target of a check. Populate what the action needs.

Jump to

Keyboard shortcuts

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