Skip to content

Commit 9421217

Browse files
amak3aleksandra-mak_zse
andauthored
Upgrading opa version (#3581)
Upgrading OPA version and OPA envoy plugin versions from 1.4.2 to 1.7.1. Important fix: - fix in OPA envoy plugin to be able to use JWT validation cache feature enabled in v1.1.0 OPA Other notable changes: - faster builtin-function evaluation - allowing keywords in Rego references OPA envoy plugin release notes: [v1.5.0-envoy-4](https://github.com/open-policy-agent/opa-envoy-plugin/releases/tag/v1.5.0-envoy-4) [v1.6.0-envoy-2](https://github.com/open-policy-agent/opa-envoy-plugin/releases/tag/v1.6.0-envoy-2) [v1.7.1-envoy](https://github.com/open-policy-agent/opa-envoy-plugin/releases/tag/v1.7.1-envoy) OPA release notes: [v1.5.0](https://github.com/open-policy-agent/opa/releases/tag/v1.5.0) [v1.6.0](https://github.com/open-policy-agent/opa/releases/tag/v1.6.0) [v.1.7.0](https://github.com/open-policy-agent/opa/releases/tag/v1.7.0) Signed-off-by: aleksandra-mak_zse <aleksandra.mak@zalando.de> Co-authored-by: aleksandra-mak_zse <aleksandra.mak@zalando.de>
1 parent e6d3f0c commit 9421217

3 files changed

Lines changed: 118 additions & 111 deletions

File tree

filters/openpolicyagent/openpolicyagent.go

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -474,17 +474,18 @@ func (registry *OpenPolicyAgentRegistry) newOpenPolicyAgentInstance(bundleName s
474474
}
475475

476476
type OpenPolicyAgentInstance struct {
477-
manager *plugins.Manager
478-
instanceConfig OpenPolicyAgentInstanceConfig
479-
opaConfig *config.Config
480-
bundleName string
481-
preparedQuery *rego.PreparedEvalQuery
482-
preparedQueryDoOnce *sync.Once
483-
preparedQueryErr error
484-
interQueryBuiltinCache iCache.InterQueryCache
485-
once sync.Once
486-
closing bool
487-
registry *OpenPolicyAgentRegistry
477+
manager *plugins.Manager
478+
instanceConfig OpenPolicyAgentInstanceConfig
479+
opaConfig *config.Config
480+
bundleName string
481+
preparedQuery *rego.PreparedEvalQuery
482+
preparedQueryDoOnce *sync.Once
483+
preparedQueryErr error
484+
interQueryBuiltinCache iCache.InterQueryCache
485+
interQueryBuiltinValueCache iCache.InterQueryValueCache
486+
once sync.Once
487+
closing bool
488+
registry *OpenPolicyAgentRegistry
488489

489490
maxBodyBytes int64
490491
bodyReadBufferSize int64
@@ -971,6 +972,11 @@ func (opa *OpenPolicyAgentInstance) InterQueryBuiltinCache() iCache.InterQueryCa
971972
return opa.interQueryBuiltinCache
972973
}
973974

975+
// InterQueryBuiltinValueCache is an implementation of the envoyauth.EvalContext interface
976+
func (opa *OpenPolicyAgentInstance) InterQueryBuiltinValueCache() iCache.InterQueryValueCache {
977+
return opa.interQueryBuiltinValueCache
978+
}
979+
974980
// Config is an implementation of the envoyauth.EvalContext interface
975981
func (opa *OpenPolicyAgentInstance) Config() *config.Config { return opa.opaConfig }
976982

go.mod

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ require (
2727
github.com/lightstep/lightstep-tracer-go v0.26.0
2828
github.com/miekg/dns v1.1.68
2929
github.com/oklog/ulid v1.3.1
30-
github.com/open-policy-agent/opa v1.4.2
31-
github.com/open-policy-agent/opa-envoy-plugin v1.4.2-envoy
30+
github.com/open-policy-agent/opa v1.7.1
31+
github.com/open-policy-agent/opa-envoy-plugin v1.7.1-envoy
3232
github.com/opentracing/basictracer-go v1.1.0
3333
github.com/opentracing/opentracing-go v1.2.0
3434
github.com/prometheus/client_golang v1.23.0
@@ -62,9 +62,8 @@ require (
6262
)
6363

6464
require (
65-
cloud.google.com/go/compute/metadata v0.6.0 // indirect
65+
cloud.google.com/go/compute/metadata v0.7.0 // indirect
6666
dario.cat/mergo v1.0.1 // indirect
67-
github.com/AdaLogics/go-fuzz-headers v0.0.0-20240806141605-e8a1dd7889d6 // indirect
6867
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
6968
github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect
7069
github.com/Microsoft/go-winio v0.6.2 // indirect
@@ -74,15 +73,17 @@ require (
7473
github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b // indirect
7574
github.com/bytecodealliance/wasmtime-go/v3 v3.0.2 // indirect
7675
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
77-
github.com/cncf/xds/go v0.0.0-20241223141626-cff3c89139a3 // indirect
78-
github.com/containerd/containerd v1.7.27 // indirect
76+
github.com/cenkalti/backoff/v5 v5.0.2 // indirect
77+
github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 // indirect
78+
github.com/containerd/containerd/v2 v2.1.3 // indirect
7979
github.com/containerd/errdefs v1.0.0 // indirect
8080
github.com/containerd/errdefs/pkg v0.3.0 // indirect
8181
github.com/containerd/log v0.1.0 // indirect
82-
github.com/containerd/platforms v0.2.1 // indirect
82+
github.com/containerd/platforms v1.0.0-rc.1 // indirect
83+
github.com/containerd/typeurl/v2 v2.2.3 // indirect
8384
github.com/cpuguy83/dockercfg v0.3.2 // indirect
8485
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
85-
github.com/dgraph-io/badger/v4 v4.7.0 // indirect
86+
github.com/dgraph-io/badger/v4 v4.8.0 // indirect
8687
github.com/dgraph-io/ristretto/v2 v2.2.0 // indirect
8788
github.com/dgryski/go-gk v0.0.0-20200319235926-a69029f61654 // indirect
8889
github.com/distribution/reference v0.6.0 // indirect
@@ -92,10 +93,10 @@ require (
9293
github.com/ebitengine/purego v0.8.4 // indirect
9394
github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect
9495
github.com/felixge/httpsnoop v1.0.4 // indirect
95-
github.com/fsnotify/fsnotify v1.8.0 // indirect
96+
github.com/fsnotify/fsnotify v1.9.0 // indirect
9697
github.com/go-ini/ini v1.67.0 // indirect
9798
github.com/go-jose/go-jose/v4 v4.0.5 // indirect
98-
github.com/go-logr/logr v1.4.2 // indirect
99+
github.com/go-logr/logr v1.4.3 // indirect
99100
github.com/go-logr/stdr v1.2.2 // indirect
100101
github.com/go-ole/go-ole v1.2.6 // indirect
101102
github.com/gobwas/glob v0.2.3 // indirect
@@ -104,8 +105,7 @@ require (
104105
github.com/google/btree v1.0.0 // indirect
105106
github.com/google/flatbuffers v25.2.10+incompatible // indirect
106107
github.com/google/pprof v0.0.0-20250630185457-6e76a2b096b5 // indirect
107-
github.com/gorilla/mux v1.8.1 // indirect
108-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.1 // indirect
108+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 // indirect
109109
github.com/hashicorp/errwrap v1.1.0 // indirect
110110
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
111111
github.com/hashicorp/go-metrics v0.5.4 // indirect
@@ -148,38 +148,40 @@ require (
148148
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect
149149
github.com/shirou/gopsutil/v4 v4.25.5 // indirect
150150
github.com/streadway/quantile v0.0.0-20220407130108-4246515d968d // indirect
151-
github.com/tchap/go-patricia/v2 v2.3.2 // indirect
151+
github.com/tchap/go-patricia/v2 v2.3.3 // indirect
152152
github.com/tidwall/match v1.1.1 // indirect
153153
github.com/tidwall/pretty v1.2.0 // indirect
154154
github.com/tklauser/go-sysconf v0.3.12 // indirect
155155
github.com/tklauser/numcpus v0.6.1 // indirect
156+
github.com/vektah/gqlparser/v2 v2.5.30 // indirect
156157
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
157158
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
158159
github.com/yashtewari/glob-intersection v0.2.0 // indirect
159160
github.com/yusufpapurcu/wmi v1.2.4 // indirect
160161
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
161-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect
162-
go.opentelemetry.io/otel v1.35.0 // indirect
163-
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 // indirect
164-
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.35.0 // indirect
165-
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.35.0 // indirect
166-
go.opentelemetry.io/otel/metric v1.35.0 // indirect
167-
go.opentelemetry.io/otel/sdk v1.35.0 // indirect
168-
go.opentelemetry.io/otel/trace v1.35.0 // indirect
169-
go.opentelemetry.io/proto/otlp v1.5.0 // indirect
162+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 // indirect
163+
go.opentelemetry.io/otel v1.37.0 // indirect
164+
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0 // indirect
165+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.37.0 // indirect
166+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.37.0 // indirect
167+
go.opentelemetry.io/otel/metric v1.37.0 // indirect
168+
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
169+
go.opentelemetry.io/otel/trace v1.37.0 // indirect
170+
go.opentelemetry.io/proto/otlp v1.7.0 // indirect
170171
go.uber.org/atomic v1.9.0 // indirect
171172
go.uber.org/automaxprocs v1.6.0 // indirect
172-
golang.org/x/mod v0.25.0 // indirect
173+
go.yaml.in/yaml/v2 v2.4.2 // indirect
174+
golang.org/x/mod v0.26.0 // indirect
173175
golang.org/x/sys v0.34.0 // indirect
174176
golang.org/x/text v0.27.0 // indirect
175-
golang.org/x/tools v0.34.0 // indirect
177+
golang.org/x/tools v0.35.0 // indirect
176178
gonum.org/v1/gonum v0.8.2 // indirect
177-
google.golang.org/genproto/googleapis/api v0.0.0-20250218202821-56aae31c358a // indirect
178-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a // indirect
179-
google.golang.org/grpc v1.71.1 // indirect
179+
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822 // indirect
180+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect
181+
google.golang.org/grpc v1.74.2 // indirect
180182
gopkg.in/yaml.v3 v3.0.1 // indirect
181-
oras.land/oras-go/v2 v2.5.0 // indirect
182-
sigs.k8s.io/yaml v1.4.0 // indirect
183+
oras.land/oras-go/v2 v2.6.0 // indirect
184+
sigs.k8s.io/yaml v1.6.0 // indirect
183185
)
184186

185187
go 1.24.4

0 commit comments

Comments
 (0)