From 31b21d3f2deede4b502195fee155e30fe95865fb Mon Sep 17 00:00:00 2001 From: Maxi Wittich Date: Wed, 29 Jan 2025 10:36:55 +0100 Subject: [PATCH 1/3] Updating to opa 1.0.0 --- docs/modules/hbase/examples/rego/hbase.rego | 2 +- docs/modules/hbase/examples/rego/hbase_test.rego | 2 +- docs/modules/hbase/examples/usage-guide/hbase-regorules.yaml | 2 -- docs/modules/hbase/pages/usage-guide/security.adoc | 2 +- tests/templates/kuttl/opa/12-rego-rules.txt.j2 | 4 +--- tests/test-definition.yaml | 2 +- 6 files changed, 5 insertions(+), 9 deletions(-) diff --git a/docs/modules/hbase/examples/rego/hbase.rego b/docs/modules/hbase/examples/rego/hbase.rego index 6e20fa30..978a144a 100644 --- a/docs/modules/hbase/examples/rego/hbase.rego +++ b/docs/modules/hbase/examples/rego/hbase.rego @@ -1,6 +1,6 @@ package hbase -import rego.v1 + default allow := false default matches_identity(identity) := false diff --git a/docs/modules/hbase/examples/rego/hbase_test.rego b/docs/modules/hbase/examples/rego/hbase_test.rego index 20a9567b..5d327bab 100644 --- a/docs/modules/hbase/examples/rego/hbase_test.rego +++ b/docs/modules/hbase/examples/rego/hbase_test.rego @@ -1,6 +1,6 @@ package hbase -import rego.v1 + test_permission_admin if { allow with input as { diff --git a/docs/modules/hbase/examples/usage-guide/hbase-regorules.yaml b/docs/modules/hbase/examples/usage-guide/hbase-regorules.yaml index 7ca07322..d46b7e97 100644 --- a/docs/modules/hbase/examples/usage-guide/hbase-regorules.yaml +++ b/docs/modules/hbase/examples/usage-guide/hbase-regorules.yaml @@ -9,6 +9,4 @@ data: hdfs.rego: | package hbase - import rego.v1 - default allow = true diff --git a/docs/modules/hbase/pages/usage-guide/security.adoc b/docs/modules/hbase/pages/usage-guide/security.adoc index a6c65e15..ae14026a 100644 --- a/docs/modules/hbase/pages/usage-guide/security.adoc +++ b/docs/modules/hbase/pages/usage-guide/security.adoc @@ -138,7 +138,7 @@ The basic structure of this rego rule is shown below. ---- package hbase -import rego.v1 + # Turn off access by default. default allow := false diff --git a/tests/templates/kuttl/opa/12-rego-rules.txt.j2 b/tests/templates/kuttl/opa/12-rego-rules.txt.j2 index be67b2a3..4ccbc7c9 100644 --- a/tests/templates/kuttl/opa/12-rego-rules.txt.j2 +++ b/tests/templates/kuttl/opa/12-rego-rules.txt.j2 @@ -9,9 +9,7 @@ data: hbase.rego: | package hbase - import rego.v1 - - default allow := false + default allow if := false default matches_identity(identity) := false # table is null if the request is for namespace permissions, but as parameters cannot be diff --git a/tests/test-definition.yaml b/tests/test-definition.yaml index 8d27924a..e50a8586 100644 --- a/tests/test-definition.yaml +++ b/tests/test-definition.yaml @@ -35,7 +35,7 @@ dimensions: - 1.21.1 - name: opa values: - - 0.67.1 + - 1.0.0 # Used for zookeeper, hdfs and hbase - name: listener-class values: From 08f60c269a5710da8b020fd15c700f8b865b91aa Mon Sep 17 00:00:00 2001 From: Maxi Wittich Date: Wed, 29 Jan 2025 11:07:56 +0100 Subject: [PATCH 2/3] fixing test --- tests/templates/kuttl/opa/12-rego-rules.txt.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/templates/kuttl/opa/12-rego-rules.txt.j2 b/tests/templates/kuttl/opa/12-rego-rules.txt.j2 index 4ccbc7c9..08e72f00 100644 --- a/tests/templates/kuttl/opa/12-rego-rules.txt.j2 +++ b/tests/templates/kuttl/opa/12-rego-rules.txt.j2 @@ -9,7 +9,7 @@ data: hbase.rego: | package hbase - default allow if := false + default allow := false default matches_identity(identity) := false # table is null if the request is for namespace permissions, but as parameters cannot be From 1897000a3e6d08eb530db97b3e07b5c5b25b8d90 Mon Sep 17 00:00:00 2001 From: Maxi Wittich Date: Wed, 29 Jan 2025 11:39:18 +0100 Subject: [PATCH 3/3] Removing unecessary empty lines --- docs/modules/hbase/examples/rego/hbase.rego | 2 -- docs/modules/hbase/examples/rego/hbase_test.rego | 2 -- 2 files changed, 4 deletions(-) diff --git a/docs/modules/hbase/examples/rego/hbase.rego b/docs/modules/hbase/examples/rego/hbase.rego index 978a144a..f83211e9 100644 --- a/docs/modules/hbase/examples/rego/hbase.rego +++ b/docs/modules/hbase/examples/rego/hbase.rego @@ -1,7 +1,5 @@ package hbase - - default allow := false default matches_identity(identity) := false diff --git a/docs/modules/hbase/examples/rego/hbase_test.rego b/docs/modules/hbase/examples/rego/hbase_test.rego index 5d327bab..67278935 100644 --- a/docs/modules/hbase/examples/rego/hbase_test.rego +++ b/docs/modules/hbase/examples/rego/hbase_test.rego @@ -1,7 +1,5 @@ package hbase - - test_permission_admin if { allow with input as { "callerUgi" : {