Skip to content

Commit 6d477c3

Browse files
committed
Propagate OpenShift TLS security profile to Authorino
Read the cluster's APIServer CR (apiserver.config.openshift.io/cluster) and propagate its TLS security profile to the Authorino CR on both the Listener and OIDCServer TLS configurations. On non-OpenShift clusters, falls back to Intermediate profile defaults. - Navigate the topology graph from Kuadrant CR to find the APIServer CR instead of filtering all objects; CR name defaults to "cluster" and can be overridden via APISERVER_CR_NAME env var - Map OpenShift VersionTLS12 format to 1.2 short form to match the updated Authorino CLI flag format - Add integration test script (hack/test-tls-profile.sh) covering 9 scenarios with both Authorino CR spec and deployment args verification Signed-off-by: Phil Brookes <pbrookes@redhat.com> rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED
1 parent a3f17aa commit 6d477c3

11 files changed

Lines changed: 530 additions & 183 deletions

File tree

bundle/manifests/kuadrant-operator.clusterserviceversion.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ metadata:
225225
categories: Integration & Delivery
226226
console.openshift.io/plugins: '["kuadrant-console-plugin"]'
227227
containerImage: quay.io/kuadrant/kuadrant-operator:latest
228-
createdAt: "2026-06-22T15:16:38Z"
228+
createdAt: "2026-07-10T12:37:52Z"
229229
description: A Kubernetes Operator to manage the lifecycle of the Kuadrant system
230230
operators.operatorframework.io/builder: operator-sdk-v1.33.0
231231
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4
@@ -472,6 +472,7 @@ spec:
472472
- apiGroups:
473473
- config.openshift.io
474474
resources:
475+
- apiservers
475476
- clusterversions
476477
verbs:
477478
- get

charts/kuadrant-operator/templates/manifests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14316,6 +14316,7 @@ rules:
1431614316
- apiGroups:
1431714317
- config.openshift.io
1431814318
resources:
14319+
- apiservers
1431914320
- clusterversions
1432014321
verbs:
1432114322
- get

cmd/extensions/oidc-policy/internal/controller/oidcpolicy_reconciler_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,9 @@ func TestBuildTargetCookieExpression_Examples(t *testing.T) {
333333

334334
for _, ex := range examples {
335335
t.Run(ex.scenario, func(t *testing.T) {
336-
// The CEL expression uses a ternary: request.url_path + (has(request.query) ? "?" + request.query : "")
336+
// The CEL expression uses a ternary: request.url_path + (has(request.query) && request.query != "" ? "?" + request.query : "")
337337
// This should construct the full path with query when query is present
338-
if !strings.Contains(expression, `request.url_path + (has(request.query) ? "?" + request.query : "")`) {
338+
if !strings.Contains(expression, `request.url_path + (has(request.query) && request.query != "" ? "?" + request.query : "")`) {
339339
t.Errorf("Expression should handle scenario: %s\nExpected to preserve: %s", ex.scenario, ex.expected)
340340
}
341341
})

config/rbac/role.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ rules:
8282
- apiGroups:
8383
- config.openshift.io
8484
resources:
85+
- apiservers
8586
- clusterversions
8687
verbs:
8788
- get

go.mod

Lines changed: 48 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ require (
1010
github.com/go-logr/logr v1.4.3
1111
github.com/go-logr/zapr v1.3.0
1212
github.com/golang/protobuf v1.5.4
13-
github.com/google/cel-go v0.23.2
13+
github.com/google/cel-go v0.26.0
1414
github.com/google/go-cmp v0.7.0
1515
github.com/kuadrant/authorino v0.25.0
16-
github.com/kuadrant/authorino-operator v0.21.0
16+
github.com/kuadrant/authorino-operator v0.26.0
1717
github.com/kuadrant/dns-operator v0.0.0-20251125201831-f74008dc171c
1818
github.com/kuadrant/limitador-operator v0.15.0
1919
github.com/kuadrant/policy-machinery v0.9.0
2020
github.com/martinlindhe/base36 v1.1.1
21-
github.com/onsi/ginkgo/v2 v2.22.0
22-
github.com/onsi/gomega v1.36.1
21+
github.com/onsi/ginkgo/v2 v2.28.1
22+
github.com/onsi/gomega v1.39.1
2323
github.com/openshift/api v0.0.0-20240926211938-f89ab92f1597
2424
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.76.2
25-
github.com/prometheus/client_golang v1.23.0
25+
github.com/prometheus/client_golang v1.23.2
2626
github.com/prometheus/client_model v0.6.2
2727
github.com/samber/lo v1.47.0
2828
go.opentelemetry.io/contrib/bridges/otelzap v0.13.0
@@ -40,85 +40,95 @@ require (
4040
go.opentelemetry.io/otel/sdk/log v0.19.0
4141
go.opentelemetry.io/otel/sdk/metric v1.43.0
4242
go.opentelemetry.io/otel/trace v1.43.0
43-
go.uber.org/zap v1.27.0
43+
go.uber.org/zap v1.27.1
4444
google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9
4545
google.golang.org/genproto/googleapis/rpc v0.0.0-20260401024825-9d38bb4040a9
4646
google.golang.org/grpc v1.80.0
4747
google.golang.org/protobuf v1.36.11
4848
gotest.tools v2.2.0+incompatible
4949
istio.io/api v1.22.3-0.20240703105953-437a88321a16
5050
istio.io/client-go v1.22.3-0.20240703110620-5f69a1e4c030
51-
k8s.io/api v0.33.3
52-
k8s.io/apiextensions-apiserver v0.33.0
53-
k8s.io/apimachinery v0.33.3
54-
k8s.io/client-go v0.33.3
55-
k8s.io/klog/v2 v2.130.1
56-
k8s.io/utils v0.0.0-20250321185631-1f6e0b77f77e
57-
sigs.k8s.io/controller-runtime v0.21.0
51+
k8s.io/api v0.35.3
52+
k8s.io/apiextensions-apiserver v0.35.3
53+
k8s.io/apimachinery v0.35.3
54+
k8s.io/client-go v0.35.3
55+
k8s.io/klog/v2 v2.140.0
56+
k8s.io/utils v0.0.0-20260319190234-28399d86e0b5
57+
sigs.k8s.io/controller-runtime v0.23.3
5858
sigs.k8s.io/external-dns v0.14.0
5959
sigs.k8s.io/gateway-api v1.2.1
60-
sigs.k8s.io/yaml v1.4.0
60+
sigs.k8s.io/yaml v1.6.0
6161
)
6262

6363
require (
6464
cel.dev/expr v0.25.1 // indirect
6565
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
6666
github.com/beorn7/perks v1.0.1 // indirect
67-
github.com/blang/semver/v4 v4.0.0 // indirect
6867
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
6968
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
7069
github.com/cespare/xxhash/v2 v2.3.0 // indirect
7170
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
7271
github.com/emicklei/dot v1.8.0 // indirect
73-
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
72+
github.com/emicklei/go-restful/v3 v3.13.0 // indirect
7473
github.com/evanphx/json-patch v5.9.0+incompatible // indirect
7574
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
76-
github.com/fsnotify/fsnotify v1.8.0 // indirect
77-
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
75+
github.com/fsnotify/fsnotify v1.9.0 // indirect
76+
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
7877
github.com/go-logr/stdr v1.2.2 // indirect
79-
github.com/go-openapi/jsonpointer v0.21.0 // indirect
80-
github.com/go-openapi/jsonreference v0.21.0 // indirect
81-
github.com/go-openapi/swag v0.23.0 // indirect
78+
github.com/go-openapi/jsonpointer v0.22.5 // indirect
79+
github.com/go-openapi/jsonreference v0.21.5 // indirect
80+
github.com/go-openapi/swag v0.25.5 // indirect
81+
github.com/go-openapi/swag/cmdutils v0.25.5 // indirect
82+
github.com/go-openapi/swag/conv v0.25.5 // indirect
83+
github.com/go-openapi/swag/fileutils v0.25.5 // indirect
84+
github.com/go-openapi/swag/jsonname v0.25.5 // indirect
85+
github.com/go-openapi/swag/jsonutils v0.25.5 // indirect
86+
github.com/go-openapi/swag/loading v0.25.5 // indirect
87+
github.com/go-openapi/swag/mangling v0.25.5 // indirect
88+
github.com/go-openapi/swag/netutils v0.25.5 // indirect
89+
github.com/go-openapi/swag/stringutils v0.25.5 // indirect
90+
github.com/go-openapi/swag/typeutils v0.25.5 // indirect
91+
github.com/go-openapi/swag/yamlutils v0.25.5 // indirect
8292
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
83-
github.com/gogo/protobuf v1.3.2 // indirect
8493
github.com/google/btree v1.1.3 // indirect
85-
github.com/google/gnostic-models v0.6.9 // indirect
86-
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db // indirect
94+
github.com/google/gnostic-models v0.7.1 // indirect
95+
github.com/google/pprof v0.0.0-20260302011040-a15ffb7f9dcc // indirect
8796
github.com/google/uuid v1.6.0 // indirect
8897
github.com/grpc-ecosystem/grpc-gateway/v2 v2.28.0 // indirect
89-
github.com/josharian/intern v1.0.0 // indirect
9098
github.com/json-iterator/go v1.1.12 // indirect
91-
github.com/mailru/easyjson v0.7.7 // indirect
9299
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
93-
github.com/modern-go/reflect2 v1.0.2 // indirect
100+
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
94101
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
95102
github.com/pkg/errors v0.9.1 // indirect
96-
github.com/prometheus/common v0.65.0 // indirect
97-
github.com/prometheus/procfs v0.17.0 // indirect
103+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
104+
github.com/prometheus/common v0.67.5 // indirect
105+
github.com/prometheus/procfs v0.20.1 // indirect
98106
github.com/sirupsen/logrus v1.9.3 // indirect
99-
github.com/spf13/pflag v1.0.7 // indirect
107+
github.com/spf13/pflag v1.0.10 // indirect
100108
github.com/stoewer/go-strcase v1.3.0 // indirect
101109
github.com/telepresenceio/watchable v0.0.0-20220726211108-9bb86f92afa7 // indirect
102110
github.com/x448/float16 v0.8.4 // indirect
103111
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
104112
go.opentelemetry.io/otel/metric v1.43.0 // indirect
105113
go.opentelemetry.io/proto/otlp v1.10.0 // indirect
106114
go.uber.org/multierr v1.11.0 // indirect
115+
go.yaml.in/yaml/v2 v2.4.4 // indirect
116+
go.yaml.in/yaml/v3 v3.0.4 // indirect
107117
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e // indirect
118+
golang.org/x/mod v0.35.0 // indirect
108119
golang.org/x/net v0.55.0 // indirect
109-
golang.org/x/oauth2 v0.35.0 // indirect
120+
golang.org/x/oauth2 v0.36.0 // indirect
110121
golang.org/x/sync v0.20.0 // indirect
111122
golang.org/x/sys v0.45.0 // indirect
112123
golang.org/x/term v0.43.0 // indirect
113124
golang.org/x/text v0.37.0 // indirect
114-
golang.org/x/time v0.11.0 // indirect
125+
golang.org/x/time v0.15.0 // indirect
115126
golang.org/x/tools v0.44.0 // indirect
116-
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
117-
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
127+
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
128+
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
118129
gopkg.in/inf.v0 v0.9.1 // indirect
119-
gopkg.in/yaml.v3 v3.0.1 // indirect
120-
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect
121-
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
130+
k8s.io/kube-openapi v0.0.0-20260319004828-5883c5ee87b9 // indirect
131+
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
122132
sigs.k8s.io/randfill v1.0.0 // indirect
123-
sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect
133+
sigs.k8s.io/structured-merge-diff/v6 v6.3.2 // indirect
124134
)

0 commit comments

Comments
 (0)