cel-go icon indicating copy to clipboard operation
cel-go copied to clipboard

Make subsetting the standard environment simple

Open TristonianJones opened this issue 6 years ago • 2 comments

Feature request checklist

  • [X] There are no issues that match the desired change
  • [X] The change is large enough it can't be addressed with a simple Pull Request
  • [ ] If this is a bug, please file a Bug Report.

Change Currently it is easy to extend a standard environment, but painful to subset it. Effectively, the user must copy and paste code from the supported library which is less than ideal.

Make it possible to specify in terms of types and operators which functionality they would like to support and ensure that only this subset is exposed at check-time and evaluation time.

TristonianJones avatar Dec 18 '19 20:12 TristonianJones

Custom environments are difficult to construct since its non-trivial to subset the standard CEL environment. In addressing this feature request an example, as requested in #344, should be added to the cel_test.go file.

TristonianJones avatar Apr 30 '20 05:04 TristonianJones

Note, https://github.com/google/cel-policy-templates-go/pull/14 permits the specification of a CEL environment via YAML and would be a good reference for supporting environment subsetting.

TristonianJones avatar Jun 19 '20 17:06 TristonianJones