ape

package
v0.44.0-rc.7 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckCore

type CheckCore interface {
	// CheckAPE performs the common policy-engine check logic on a prepared request.
	CheckAPE(prm CheckPrm) error
}

CheckCore provides methods to perform the common logic of APE check.

func New

func New(localOverrideStorage policyengine.LocalOverrideStorage, morphChainStorage policyengine.MorphRuleChainStorageReader,
	frostFSSubjectProvider frostfsidcore.SubjectProvider, state netmap.State,
) CheckCore

type CheckPrm

type CheckPrm struct {
	// Request is an APE-request that is checked by policy engine.
	Request aperequest.Request

	Namespace string

	Container cid.ID

	// An encoded container's owner user ID.
	ContainerOwner user.ID

	// PublicKey is public key of the request sender.
	PublicKey *keys.PublicKey

	// The request's bearer token. It is used in order to check APE overrides with the token.
	BearerToken *bearer.Token

	// If SoftAPECheck is set to true, then NoRuleFound is interpreted as allow.
	SoftAPECheck bool
}

Jump to

Keyboard shortcuts

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