ape

package
v0.46.14 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2025 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainRouterError added in v0.44.4

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

ChainRouterError is returned when chain router validation prevents the APE request from being processed (no rule found, access denied, etc.).

func NewChainRouterError added in v0.46.5

func NewChainRouterError(target policyengine.RequestTarget, request aperequest.Request, status apechain.Status) *ChainRouterError

func (*ChainRouterError) Error added in v0.44.4

func (e *ChainRouterError) Error() string

func (*ChainRouterError) MarshalLogObject added in v0.46.5

func (e *ChainRouterError) MarshalLogObject(enc zapcore.ObjectEncoder) error

func (*ChainRouterError) Request added in v0.46.5

func (e *ChainRouterError) Request() aperequest.Request

func (*ChainRouterError) Status added in v0.44.4

func (e *ChainRouterError) Status() apechain.Status

func (*ChainRouterError) Target added in v0.46.5

type CheckCore

type CheckCore interface {
	// CheckAPE performs the common policy-engine check logic on a prepared request.
	CheckAPE(ctx context.Context, 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.Source, 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
}

Jump to

Keyboard shortcuts

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