authorize

package
v0.0.0-...-69db04a Latest Latest
Warning

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

Go to latest
Published: May 4, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

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