diff options
author | gururajarao79 <gb00566633@techmahindra.com> | 2024-11-22 14:28:41 +0100 |
---|---|---|
committer | gururajarao79 <gb00566633@techmahindra.com> | 2024-11-27 13:26:18 +0100 |
commit | 542b9d143da57bcb3894f730c9ca2200aa7b89cb (patch) | |
tree | b72c52f5bc3aad77c82600b8541d6db2a55ef651 /test/policies/example/policy.rego | |
parent | 55772eebb9ec2bb12cd16e5c2531dceb0860ad5b (diff) |
For details on scope and implementation, please check.
https://lf-onap.atlassian.net/wiki/spaces/DW/pages/51150925/OPA+PDP
Code Coverage Total: 70.8%
Issue-ID: POLICY-5156
Change-Id: Ied07ee1596e9f447183fb715baaa68c704a9fe99
Signed-off-by: gururajarao79 <gb00566633@techmahindra.com>
Diffstat (limited to 'test/policies/example/policy.rego')
-rw-r--r-- | test/policies/example/policy.rego | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/policies/example/policy.rego b/test/policies/example/policy.rego new file mode 100644 index 0000000..cc19285 --- /dev/null +++ b/test/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" +} |