Refering other Rego files (or rules) from a Rego file #716
Unanswered
S1DDHEY
asked this question in
OPA and Rego
Replies: 1 comment 3 replies
-
If your |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to write the policies in such a way that I don't have to check for all the rules one by one instead it just hits the decision rule from one rego file that has the rule references from the other rego files.
auth.rego
rbac.rego
currently I have not written the rule for rebac.rego or global.rego they are just some boilerplate code, I am trying to test out whether my approach is correct or not.
Because when I hit the decision rule in the auth.rego with the input.json file
and roles.json (as data)
the response is just a default deny, opa doesn't check the
data.auth.rbac.allow
rule.But when I try
opa eval
for this rule it gives me the correct response that it should give (i.e.true
)Can someone tell me what is wrong with this logic ?
Beta Was this translation helpful? Give feedback.
All reactions