by siliconmountain on 12/10/20, 7:41 PM with 106 comments
by habosa on 12/11/20, 10:02 AM
Specifically in our rules everything after the "if" is Common Expression Language.
See: https://firebase.google.com/docs/firestore/security/rules-co...
The efficiency and safety of CEL enables us to put security rules in the critical path of every database request.
by iso8859-1 on 12/11/20, 7:36 AM
by jmeister on 12/11/20, 4:12 AM
by frou_dh on 12/10/20, 9:37 PM
Google seem to like these executable config languages because they've got another open source one ("Starlark") a few notches up in expressivity.
by scythe on 12/11/20, 2:06 AM
- hard to write exploits, can be shared/installed without warnings
- easy(-er) to predict behavior of themes so they won't break in new versions
by jt2190 on 12/11/20, 1:27 PM
> Now, I never intended for the file format to become a scripting language—after all, my original view of Ant was that there was a declaration of some properties that described the project and that the tasks written in Java performed all the logic. The current maintainers of Ant generally share the same feelings. But when I fused XML and task reflection in Ant, I put together something that is 70-80% of a scripting environment. I just didn't recognize it at the time. To deny that people will use it as a scripting language is equivalent to asking them to pretend that sugar isn't sweet.
https://web.archive.org/web/20041217023752///x180.net/Journa...
by stevekemp on 12/11/20, 6:19 AM
Initially it was designed to process incoming slack messages, and sometimes trigger a notification to an on-call engineer, but over time I've found uses for it processing email, scripting simple actions on my desktop, and more.
https://github.com/skx/evalfilter/
These kind of things are pretty simple to write, but sometimes I almost think it is a shame there isn't something more standard. (Lua was kinda winning for that embedded-logic role for a long time, but nowadays we still have the mixture of YAML, HCL, and other niche-specific language/filtering and I imagine the time has passed to pick one standard.)
by dathinab on 12/11/20, 2:43 AM
I believe this was a mistake. "?" based conditionals aren't really a good idea IMHO.
by hardwaresofton on 12/10/20, 10:03 PM
by tlarkworthy on 12/10/20, 9:25 PM
https://github.com/google/cel-spec/blob/master/doc/langdef.m...
by hadrien01 on 12/10/20, 9:15 PM
by sandstrom on 12/10/20, 9:58 PM
Too bad it isn’t open sourced.
by taeric on 12/11/20, 1:35 AM
by nojvek on 12/11/20, 4:02 PM
by brundolf on 12/10/20, 11:43 PM
by partialstate on 12/11/20, 8:00 PM
Fast - CEL runs without the need for sandboxing, making it much faster than sandboxed solutions like WebAssembly, Lua, and embedded JavaScript.
Scalable - Features like variables and functions would make CEL more expressive, but also less scalable as it's easy to write a few lines of code with functions that consume exponential amounts of memory and compute. CEL is simply the expression and nothing more.
Portable - CEL is implemented in Go[0], C++[1], and Python[2] with Java open sourcing in development. There is a public codelab[3] available for Go if anyone is interested. There is also a conformance suite in CEL-Spec to ensure consistent behavior between runtimes and environments. Our objective is to make it possible to bring CEL to K8s, J2EE apps, and C++ proxies. Evaluate at line-rate everywhere. Personally, I hope someone tries to make CEL work on IoT devices some day too.
Where? - CEL is usually embedded into larger projects rather than being the one stop shop for solving a particular kind of problem. For example, CEL Policy Templates[4] has an opinionated way of using CEL to validate/evaluate YAML configs. Most of the time CEL is part of a service API.
In addition to being used in Firebase's Cloud Firestore / Cloud Storage security rules, it is also used in several other Google Cloud services: - Cloud Armor[5] - IAM Conditions[6] - Cloud Healthcare Consents[7] - Cloud Build Notifiers[8] - Security Token Service[9] - Access Levels[10], and more.
CEL is also used in some prominent open source projects like Envoy RBAC[11], Caddyserver[12], Krakend.io[13], and Cloud Custodian[14].
[0]: https://github.com/google/cel-go [1]: https://github.com/google/cel-cpp [2]: https://github.com/cloud-custodian/cel-python [3]: https://codelabs.developers.google.com/codelabs/cel-go [4]: https://github.com/google/cel-policy-templates-go [5]: https://cloud.google.com/armor/docs/rules-language-reference [6]: https://cloud.google.com/iam/docs/conditions-overview [7]: https://cloud.google.com/healthcare/docs/concepts/consent-mo... [8]: https://cloud.google.com/cloud-build/docs/filter-build-notif... [9]: https://cloud.google.com/iam/docs/workload-identity-federati... [10]: https://cloud.google.com/access-context-manager/docs/custom-... [11]: https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overv... [12]: https://caddyserver.com/docs/caddyfile/matchers#expression [13]: https://www.krakend.io/docs/endpoints/common-expression-lang... [14]: https://github.com/cloud-custodian/cel-python
by ilaksh on 12/11/20, 7:25 PM
by contravariant on 12/10/20, 10:25 PM
Don't expect your config files to terminate when they use macros, that's all I'm saying.