Documentation
¶
Overview ¶
Package authorize implement the policy evalution.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAccessDenied was return when the user does not have the sufficient // permissions. ErrAccessDenied = errors.New("the user does not have sufficient permissions") )
Functions ¶
func Authorize ¶
func Authorize(policies []*policy.Policy, action string, object orn.ORN, _context map[string]string) error
Authorize decides whether a given request should be allowed or denied.
The evaluation logic follows these rules:
By default, all requests are denied. An explicit allow overrides this default. An explicit deny overrides any allows.
The order in which the policies are evaluated has no effect on the outcome of the evaluation. All policies are evaluated, and the result is always that the request is either allowed or denied.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.