aboutsummaryrefslogtreecommitdiffstats
path: root/compose/config/opa-pdp/policies/example
diff options
context:
space:
mode:
authormuraliparthatechm <muraliparthasarathy.k@techmahindra.com>2024-12-18 18:15:17 +0100
committermuraliparthatechm <muraliparthasarathy.k@techmahindra.com>2024-12-19 13:39:05 +0100
commit32fd1f3c1e22dbeb69e3cc150a6fb1b72ea0ed53 (patch)
treea068657e6b3d7f87506a30f4ec3ce639cf06c5bc /compose/config/opa-pdp/policies/example
parent522cfc28114b076fbcb1da8b2a16894e647ed10c (diff)
Update CSIT with opa-pdp (docker-compose env)
Issue-ID: POLICY-5211 Change-Id: I8b75e6e850fae171fbc75fc67cb59171a78df4e0 Signed-off-by: muraliparthatechm <muraliparthasarathy.k@techmahindra.com>
Diffstat (limited to 'compose/config/opa-pdp/policies/example')
-rw-r--r--compose/config/opa-pdp/policies/example/policy.rego13
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"
+}