Documentation
¶
Overview ¶
Package authorization defines protocol-neutral authorization contracts: a Request of principal, action and resource entities plus context, an Authorizer that returns a Decision, and the PolicySource and EntitySource interfaces an implementation reads from. Package cedar provides the Cedar implementation.
The package does not import package authentication; callers map an authenticated principal to a request entity themselves.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidConfiguration reports invalid constructor options. ErrInvalidConfiguration = errors.New("authorization: invalid configuration") // ErrInvalidRequest reports a malformed or unbounded request. ErrInvalidRequest = errors.New("authorization: invalid request") // ErrSource reports that a policy or entity source failed. ErrSource = errors.New("authorization: source unavailable") // ErrInvalidSource reports policies or entities that are empty, oversized // or malformed. ErrInvalidSource = errors.New("authorization: invalid source") )
Sentinel errors returned by authorizers. A non-nil error always means the request is not authorized.
Functions ¶
This section is empty.
Types ¶
type Authorizer ¶
Authorizer evaluates an authorization request.
type EntitySource ¶
EntitySource supplies Cedar entity JSON for one request.
type PolicySource ¶
PolicySource supplies Cedar policy text.