envoyproxy/envoy

Extensible CEL Vocabulary

Open

#18.063 geöffnet am 10. Sept. 2021

Auf GitHub ansehen
 (3 Kommentare) (1 Reaktion) (0 zugewiesene Personen)C++ (5.373 Forks)batch import
area/extensionarea/rbacenhancementhelp wantedno stalebot

Repository-Metriken

Stars
 (27.997 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 8T) (378 gemergte PRs in 30 T)

Beschreibung

Support extending the CEL expression evaluator with custom vocabulary.

Essentially allow for custom forms of the evaluation context to register as a ExprVocabularyProvider or similar and be referenced by e.g. RBAC, such that CEL evaluation is run against the custom vocabulary (either exclusively, or potentially in addition to the native Envoy attribute vocabulary).

Rework the common/expr/ library such that users of it (e.g. RBAC) may pass in the custom ExprVocabularyProvider. The ExprVocabularyProvider will take common data structures as inputs (StreamInfo::StreamInfo and others), and allow access to their attributes, new convenience functions, and derived attributes via custom CelValueProducer implementations they attached to Activations.

Use cases include:

  • Evaluating syntactically different (same functionality, different naming) CEL
  • Exposing domain specific, internal, and convenience attributes and functions in the CEL language that are not appropriate in the OSS vocabulary.

Contributor Guide