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 to obtain policy file names and content from an Engine #254

Closed
bromls opened this issue May 29, 2024 · 1 comment · Fixed by #267
Closed

Provide a way to obtain policy file names and content from an Engine #254

bromls opened this issue May 29, 2024 · 1 comment · Fixed by #267

Comments

@bromls
Copy link

bromls commented May 29, 2024

To support use cases like policy auditing, it would be helpful if the Engine exposed a function that allowed callers to iterate over the mappings of policy file names to policy file content.
An application that uses Rego policies may be run with different policies over time, as the software or configuration is updated, or based on the runtime environment.
For use cases like “Collaboration using Import”, the policy Engine supports composition of packages, and accepts multiple policy files.
All of this information is available during Engine creation, as it is input to the add_policy and add_policy_from_file functions. However, some applications may separate Engine creation from where an Engine is used to evaluate rules or queries. Therefore, it would be valuable for an Engine user to have access to the policy file content.

@anakrish
Copy link
Collaborator

@bromls How do policies get audited? Do you compute the hash of the policy file contents?

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 a pull request may close this issue.

2 participants