Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Adopt CEL Expressions for Policy Evaluation

## Decision

The experimental work on Common Expression Language (CEL) for evaluating policy expressions will be adopted as a
first-class feature of EDC core. This means that users will be able to define and evaluate policies using CEL
expressions without requiring custom Java code for policy functions.

## Rationale

Integrating CEL into EDC core offers several advantages:

1. **User-Friendly Policy Definition**: CEL provides a more accessible way for users to define policies dynamically,
reducing the need for Java coding skills.
2. **Flexibility**: CEL allows for more complex and nuanced policy definitions that can adapt to changing requirements
without redeploying the EDC runtime.
3. **Performance**: CEL is designed for efficiency, ensuring that policy evaluations remain performant even with complex
expressions.
4. **Standardization**: Adopting CEL aligns EDC with a widely recognized expression language, promoting consistency and
interoperability.

## Approach

The original design document is
available [here](https://github.com/eclipse-edc/Virtual-Connector/blob/main/docs/common_expression_language.md) and
outlines the integration of CEL into EDC platform.

Here's the recap of the approach:

1. **CelExpression** Entity: Introduce a new entity to represent CEL expressions associated with atomic constraints.
2. **CelExpressionStore**: Implement a store to manage the persistence of CelExpression entities.
3. **CelExpressionService**: Create a service to handle the creation, retrieval, updating, and deletion of CelExpression
entities.
4. **CelExpressionEngine**: Develop an engine that utilizes the CEL Java library to evaluate CEL expressions during
policy evaluation.
5. **Policy Function Integration**: Implement a custom policy function that leverages the `CelExpressionEngine` for
evaluating policies using CEL syntax.

The CEL based policy evaluation will be integrated alongside existing Java-based policy functions,
and will still be experimental until stabilized in future releases. It will not be included
in the default BOMs at first, and users will need to explicitly include the CEL extension to use this feature.

The Management API for CEL expressions won't be ported at first to EDC core, they will be ported after the stabilization
of the current `v4beta` release of the Management API.
1 change: 1 addition & 0 deletions docs/developer/decision-records/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,4 @@
- [2025-10-29 Participant identifiers resolution](2025-10-29-participant-identifiers)
- [2025-11-10 Extracting service for presentation requests](2025-11-10-presentation-request-service)
- [2026-01-08 inline DataFlowManager](2026-01-08-inline-data-flow-manager)
- [2026-01-27 Adopt CEL expressions](2026-01-27-adopt-cel-expressions)
Loading