fugue / fregot

Fugue Rego Toolkit
Apache License 2.0
233 stars 11 forks source link

builtin parity with OPA #224

Open srenatus opened 4 years ago

srenatus commented 4 years ago

Made using this command:

jq -rn --argjson fregot "$(cat extra/capabilities-master.json)" --argjson opa "$(cat v0.24.0.json)" '$opa.builtins[].name | if . | IN($fregot.builtins[].name) then "- [x] \(.)" else "- [ ] \(.)" end'

using the capabilities file of OPA v0.24.0.

srenatus commented 4 years ago

Guess my awk'ing was a bit flawed here. There's an object.union in OPA but not in this list...

srenatus commented 4 years ago

OPA has a capabilities JSON doc now that could be used instead. I believe it would also be nice if fregot exported one of those.

👉 https://github.com/open-policy-agent/opa/pull/2571

srenatus commented 4 years ago

✔️ Updated the issue, using the capabilities doc.

jaspervdj-luminal commented 4 years ago

The capabilities doc is really neat. I think we should be able to support that. One annoyance is that there's issues serializing the types of builtins in fregot because they can be small programs -- see e.g. https://github.com/fugue/fregot/commit/eebc2dfd3691d9ef9ae5438e44cd1c44841e105b where I was experimenting with that.

Getting something out where we either drop the types or we just have any there should not be very hard though.

jaspervdj-luminal commented 3 years ago

@srenatus fregot now also exports a capabilities document: https://github.com/fugue/fregot/blob/master/extra/capabilities-v0.12.3.json.

My previous comment was wrong: due to the refactoring in #250 fregot can now also export the same type description format as OPA.

srenatus commented 3 years ago

@jaspervdj-luminal that's cool, it made it so much easier to check supported builtins across the implementations. Updated the issue above. 🎉

gusfcarvalho commented 1 year ago

Hey all! Are there any plans to include crypto.x509 in fregot?