envoyproxy / envoy

Cloud-native high-performance edge/middle/service proxy
https://www.envoyproxy.io
Apache License 2.0
24.67k stars 4.75k forks source link

Extensible CEL Vocabulary #18063

Open wjtracey opened 2 years ago

wjtracey commented 2 years ago

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:

htuch commented 2 years ago

CC @kyessenov

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

kyessenov commented 4 months ago

@rshriram FR for extensible attribute vocabulary.