Releases: google/cel-policy-templates-go
Releases · google/cel-policy-templates-go
Release v0.1.5
What's Changed
- Remove expression cost limit based on deprecated cel.EstimateCost method by @TristonianJones in #54
Full Changelog: v0.1.4...v0.1.5
Release v0.1.4
Fixes
- Ensure all
cel.Env
settings are plumbed through to expressions [#52]
Release v0.1.3
Release v0.1.2
Fixes
- Runtime template options available to validator, this allows validator to bind to custom functions during validation.
Release v0.1.1
Fixes
- Production
limit
values now accept negative integers to specify that a feature usage isunlimited
. - How a
ListValue
builds its indices for set containment is now concurrency safe and automatic. ObjectValue
equality has been fixed to compare all object fields not just the set fields.time.Duration
values are now properly supported within YAML instances at compile time.- Upgraded to
cel-go-v0.7.2
to pick up fixes related to golang protobuf v2 API usage.
Release v0.1.0
Initial release of CEL Policy Templates
Policies are usually the combined effort of the following agents:
- Administrators who are experts in how data fit within a particular knowledge domain.
- Architects who write templates that perform logic on admin terms using the capabilities of a given platform.
- Platforms expose variables and functions, an environment which Architects can use within their logic.
In CPT, Admin writes policy instances, Architects write templates, and Platforms define environments.
Each of these artifacts is its own YAML file, but the framework is abstract enough that it should be possible
to support other source formats. Expressions within the YAML files are written as CEL.
Overview
- Define a template to declare the schema of an admin written policy.
- Templates support a
validation
block to ensure admin provided instances are well-formed. - Templates must define an
evaluation
block to indicate how a policy is to be evaluated. - Evaluators may emit multiple policy decisions and may aggregate or short-circuit these decisions
by configuring the policy engine with an aggregator for a given decision name. - The set of variables and functions available to a
validation
orevaluation
block are declared within
an environment yaml file. - The definitions for functions and variables declared within an environment must be provided at runtime
to an instance of thepolicy/engine.go
You can find a series of example policy templates and instances in the test/testdata
directories with the contents
being consumed within the policy/engine_test.go
.