diff options
Diffstat (limited to 'compose/config/opa-pdp/policies/example/policy.rego')
-rw-r--r-- | compose/config/opa-pdp/policies/example/policy.rego | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/compose/config/opa-pdp/policies/example/policy.rego b/compose/config/opa-pdp/policies/example/policy.rego new file mode 100644 index 00000000..cc192851 --- /dev/null +++ b/compose/config/opa-pdp/policies/example/policy.rego @@ -0,0 +1,13 @@ +package example + +import rego.v1 + +allow if { + input.path == ["users"] + input.method == "POST" +} + +allow if { + input.path == ["users", input.user_id] + input.method == "GET" +} |