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

Rego policy support #260

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open

Conversation

achamayou
Copy link
Member

@achamayou achamayou commented Jan 30, 2025

Add support for a "policyRego" field in configuration, similar to "policyScript" but allowing the definition of Rego policies executed by rego-cpp.

A sample policy may be:

package policy

default allow := false

allow if {
  input.phdr.cwt.iss == "valid_issuer"
  input.phdr.cwt.svn >= 4
}

If both a policyScript and a policyRego are defined, both must pass for the registration to complete.

All JS policy testcases have been templatised to run a rego equivalent, including performance regression test_perf, which feeds into the bencher dashboard.

achamayou and others added 6 commits January 29, 2025 11:19
fmt
@ivarprudnikov
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@achamayou
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

achamayou and others added 11 commits February 6, 2025 21:00
.
.
doc
@achamayou achamayou marked this pull request as ready for review February 12, 2025 15:48
@achamayou achamayou requested a review from a team as a code owner February 12, 2025 15:48
@achamayou
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@achamayou achamayou changed the title Draft: Rego policy support Rego policy support Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants