ape

package
v0.44.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResourceCondition = "resourcecondition"
	RequestCondition  = "requestcondition"
)

Variables

This section is empty.

Functions

func ConvertEACLToAPE

func ConvertEACLToAPE(eaclTable *eacl.Table) (*apechain.Chain, error)

ConvertEACLToAPE converts eacl.Table to apechain.Chain.

func ParseAPEChain

func ParseAPEChain(chain *apechain.Chain, rules []string) error

ParseAPEChain parses APE chain rules.

func ParseAPEChainBinaryOrJSON

func ParseAPEChainBinaryOrJSON(chain *apechain.Chain, path string) error

func ParseAPERule

func ParseAPERule(r *apechain.Rule, rule string) error

ParseAPERule parses access-policy-engine statement from the following form: <status>[:status_detail] <action>... [<condition>...] <resource>...

Examples: deny Object.Put * deny:QuotaLimitReached Object.Put * allow Object.Put * allow Object.Get ResourceCondition:Department=HR RequestCondition:Actor=ownerA * allow Object.Get any ResourceCondition:Department=HR RequestCondition:Actor=ownerA * allow Object.Get all ResourceCondition:Department=HR RequestCondition:Actor=ownerA * allow Object.* * allow Container.* *

Types

type ConvertEACLError

type ConvertEACLError struct {
	// contains filtered or unexported fields
}

func (*ConvertEACLError) Error

func (e *ConvertEACLError) Error() string

func (*ConvertEACLError) Unwrap

func (e *ConvertEACLError) Unwrap() error

Jump to

Keyboard shortcuts

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