Skip to content

Commit cbd4031

Browse files
committed
Update rego rule syntax
1 parent e389dff commit cbd4031

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

modules/tutorials/examples/ldap-auth/trino-opa-bundle-snippet.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,26 @@ data:
22
trino.rego: |
33
package trino
44
5-
import future.keywords.in
6-
75
default allow = false
86
9-
allow {
7+
allow if {
108
is_alice
119
}
12-
extended[i] {
10+
11+
batch contains i if {
1312
some i
1413
input.action.filterResources[i]
1514
is_alice
1615
}
1716
18-
is_alice() {
17+
batch contains i if {
18+
some i
19+
input.action.operation == "FilterColumns"
20+
count(input.action.filterResources) == 1
21+
input.action.filterResources[0].table.columns[i]
22+
is_alice
23+
}
24+
25+
is_alice() if {
1926
input.context.identity.user == "alice"
2027
}

modules/tutorials/pages/authentication_with_openldap.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ Fetch the snippet as before:
317317
[source,bash]
318318
include::example$ldap-auth/70-modify-trino-opa-bundle.sh[tag=get-yaml]
319319

320-
Apply this patch:
320+
Update the ConfigMap to look like the below:
321321

322322
[source,yaml]
323323
----

0 commit comments

Comments
 (0)