Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider applicability of https://github.com/expr-lang/expr #1080

Open
3 tasks done
dadrus opened this issue Dec 4, 2023 · 0 comments
Open
3 tasks done

Consider applicability of https://github.com/expr-lang/expr #1080

dadrus opened this issue Dec 4, 2023 · 0 comments
Labels
Milestone

Comments

@dadrus
Copy link
Owner

dadrus commented Dec 4, 2023

Preflight checklist

Describe the background of your feature request

As of today heimdall makes use of CEL for if conditions as well as for verification purposes of authorization conditions or results from corresponding endpoints. Even CEL is very fast, it is a separate language, which requires custom type bindings and it does not natively allow verification of functions in expressions. Latter is required to enforce the use of particular checks, like verification of used signature algorithms.

Describe your idea

Expr looks very promising. It has similar syntax as CEL but unlike CEL is compiled to go byte code. So, it is expected to be much faster then CEL. It does not require type-bindings as it is actually native go, which means less code and it allows definition of operator overloads, which is not possible with CEL in addition to the DSL like notation options. In addition, it allows verification of used expressions and code injection into those to provide secure defaults. That all makes expr very promising, maybe even as a drop-in replacement for CEL expressions.

Beyond that, it looks like expr could even be used as a replacement for go templates.

The actual task here would be to perform some research to gain knowledge required for taking an educated decision on how to proceed with the known CEL limitations as well as go templates verbosity.

@dadrus dadrus added the research label Dec 4, 2023
@dadrus dadrus changed the title Consider applicability of [Expr](https://github.com/expr-lang/expr) Consider applicability of https://github.com/expr-lang/expr Dec 4, 2023
@dadrus dadrus added this to the v0.13.0-alpha milestone Dec 4, 2023
@dadrus dadrus modified the milestones: v0.13.0-alpha, v0.14.0-alpha Jan 3, 2024
@dadrus dadrus modified the milestones: v0.14.0-alpha, next, Future Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant