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

Provide a way for users to validate policies during bundling/packaging phase #2598

Closed
tsandall opened this issue Jul 31, 2020 · 2 comments
Closed

Comments

@tsandall
Copy link
Member

As a user of OPA in a large organization that delegates policy authoring to different groups, I would like to be able to validate that policies packaged into bundles conform to certain standards and best practices that are specific to my organization. For example:

  • App repos should not be able to modify the system package except for the system/log/mask decision
  • App policy packages must be namespaced under package acmecorp.<app_name>
  • App API authorization policies must include a default allow = false rule (any other value is not allowed for the default allow rule)

One solution would be to have the build command accept an option that loads a special policy that could evaluate against the policy ASTs. The policy would be passed as set of policy ASTs as input and would be expected to produce a decision as to whether the policies are valid.

@tsandall tsandall added this to TODO (Things That Should Be Done) in Open Policy Agent via automation Jul 31, 2020
@tsandall tsandall removed this from Backlog in Open Policy Agent Dec 2, 2021
@stale
Copy link

stale bot commented Jul 20, 2022

This issue has been automatically marked as inactive because it has not had any activity in the last 30 days.

@anderseknert
Copy link
Member

Most of this is available using Regal today, and the new rule for enforcing naming conventions alone would would solve most of these requirements. For the rest of them, there's always the option to write custom rules in Rego, or to open an issue in that project for suggesting a new built-in rule. Integrating Regal at the time a bundle is built is simple, and I do believe the procedure described above is virtually identical to how we solve this in Regal, so I doubt it's worth duplicating the effort in OPA.

Closing as completed. Feel free to re-open if I missed something.

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