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

Open Policy Agent's rego #2571

Closed
ralgozino opened this issue Oct 2, 2020 · 2 comments
Closed

Open Policy Agent's rego #2571

ralgozino opened this issue Oct 2, 2020 · 2 comments

Comments

@ralgozino
Copy link

Motivation

We're using Prism in our opensource project Gatekeeper Policy Agent to show rego code snippets and yaml/json files. We are using as a workaround the "ruby" highlighter that is somewhat similar to rego, but sadly is not good enough.

Language
OPA is purpose built for reasoning about information represented in structured documents. The data that your service and its users publish can be inspected and transformed using OPA’s native query language Rego.

What is Rego?
Rego was inspired by Datalog, which is a well understood, decades old query language. Rego extends Datalog to support structured document models such as JSON.

Rego queries are assertions on data stored in OPA. These queries can be used to define policies that enumerate instances of data that violate the expected state of the system.

Additional resources

Official docs
https://www.openpolicyagent.org/docs/latest/policy-language/

There's also a VSCode plugin that adds syntax highlighting, can be useful as starting point:
https://github.com/open-policy-agent/vscode-opa/blob/master/syntaxes/Rego.tmLanguage

Let me know if you need anything else or how can I help to add support for this language 🙂
Thank you!

@RunDevelopment
Copy link
Member

Solved by #2624.

@ralgozino
Copy link
Author

Thank you! <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants