Skip to content

Commit 94f8b72

Browse files
authored
Update OPA image reference with v1.4.2 (#640)
* Update Dockerfile-opa with v1 release * Update policy.rego to be compatible with regov1 Signed-off-by: Tyler Schade <tylerschade99@gmail.com>
1 parent a0b5627 commit 94f8b72

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

ext_authz/Dockerfile-opa

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
FROM openpolicyagent/opa:0.70.0-istio-static@sha256:808342677946849bd359e519666a0b5097885961d2a8f6482e0c99b598e2a996
1+
FROM openpolicyagent/opa:1.4.2-envoy-1-static@sha256:073bbd180c52f8a148914a577f5030fda007630268a54087796f55cdab2f6732
22

33
COPY --chmod=644 ./config/opa-service/policy.rego /etc/policy.rego
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
package envoy.authz
22

33
import input.attributes.request.http as http_request
4+
import rego.v1
45

5-
default allow = false
6+
default allow := false
67

7-
allow = response {
8-
http_request.method == "GET"
9-
response := {
10-
"allowed": true,
11-
"headers": {"x-current-user": "OPA"}
12-
}
8+
allow := response if {
9+
http_request.method == "GET"
10+
response := {
11+
"allowed": true,
12+
"headers": {"x-current-user": "OPA"},
13+
}
1314
}

0 commit comments

Comments
 (0)