cel

package
v2.16.25 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: Apache-2.0, Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const MaxEvaluatedBodyBytes = 1 << 20 // 1 MiB

MaxEvaluatedBodyBytes bounds what a pre-evaluator is shown of the request.

The body has to be held in memory to be both matched and replayed to the backend, so an unbounded read is a memory amplifier an unauthenticated caller controls.

Variables

View Source
var ErrBodyTooLarge = errors.New("cel: request body exceeds the evaluable limit")

ErrBodyTooLarge is returned when the request body exceeds MaxEvaluatedBodyBytes, so a guarded endpoint REFUSES it.

Truncating instead would be the dangerous choice: the filter would match against a prefix and pass whatever sat past the cut, which turns the cap itself into the bypass — pad ahead of the method name and the rule stops seeing it. A body the guard cannot read in full is a body the guard cannot clear.

Functions

func ProxyFactory

func ProxyFactory(l logging.Logger, pf proxy.Factory) proxy.Factory

Types

type Rejecter

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

func NewRejecter

func NewRejecter(l logging.Logger, cfg *config.EndpointConfig) *Rejecter

func (*Rejecter) Reject

func (r *Rejecter) Reject(data map[string]interface{}) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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