-
Notifications
You must be signed in to change notification settings - Fork 26
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
Usage of multiple modules possible? #36
Comments
You're right. From the code https://github.com/open-policy-agent/opa-docker-authz/blob/master/main.go#L162 it looks like a single policy file can be loaded. Can you expand on your use-case and the kind of policies you want to enforce ? |
Use-case:
The idea is having common rules in modules being used by Docker and docker-compose:
And the specific rules like This use-case as an ugly work-around for this limitation: finding out the Docker REST request that would result of a docker-compose configuration and pass it to the opa-docker-authz policy. But don't really like it and the question is also if being able to have multiple modules is a feature desired by other users. |
Maybe something like conftest could help with this ?
I can imagine the plugin leveraging the load api to load all the *.rego files in a directory. |
As @ashutosh-narkar mentioned, the implementation could be improved by using the |
Does the current implementation of the plugin allow splitting the policy in multiple modules? It doesn't look to me as it would be possible.
If this possibility is missing, is it planned to add it?
The text was updated successfully, but these errors were encountered: