Skip to content

Commit a396b1c

Browse files
committed
Merge branch 'master' into custom-roles
2 parents 2da335c + 5e913db commit a396b1c

14 files changed

+54
-81
lines changed

api/v1/mdb/mongodb_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1086,7 +1086,7 @@ type OIDCProviderConfig struct {
10861086

10871087
// Issuer value provided by your registered IdP application. Using this URI, MongoDB finds an OpenID Connect Provider
10881088
// Configuration Document, which should be available in the /.wellknown/open-id-configuration endpoint.
1089-
// For MongoDB 7.0, 7.3, and 8.0+, the combination of issuerURI and audience must be unique across OIDC provider configurations.
1089+
// For MongoDB 8.0+, the combination of issuerURI and audience must be unique across OIDC provider configurations.
10901090
// For other MongoDB versions, the issuerURI itself must be unique.
10911091
// +kubebuilder:validation:Required
10921092
IssuerURI string `json:"issuerURI"`

api/v1/mdb/mongodb_validation.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package mdb
22

33
import (
44
"errors"
5+
"strconv"
56
"strings"
67

78
"k8s.io/apimachinery/pkg/runtime"
@@ -150,18 +151,18 @@ func oidcProviderConfigUniqueIssuerURIValidation(configs []OIDCProviderConfig) f
150151
return v1.ValidationSuccess()
151152
}
152153

153-
// Check if version supports duplicate issuers (7.0, 7.3, or 8.0+)
154+
// Check if version supports duplicate issuers (8.0+)
154155
versionParts := strings.Split(strings.TrimSuffix(d.Version, "-ent"), ".")
155-
supportsMultipleIssuers := false
156-
if len(versionParts) >= 2 {
156+
supportsMultipleIssuerURIs := false
157+
if len(versionParts) >= 1 {
157158
major := versionParts[0]
158-
minor := versionParts[1]
159-
if major == "8" || (major == "7" && (minor == "0" || minor == "3")) {
160-
supportsMultipleIssuers = true
159+
majorVersion, err := strconv.Atoi(major)
160+
if err == nil && majorVersion >= 8 {
161+
supportsMultipleIssuerURIs = true
161162
}
162163
}
163164

164-
if supportsMultipleIssuers {
165+
if supportsMultipleIssuerURIs {
165166
// Track issuer+audience combinations
166167
issuerAudienceCombos := make(map[string]string)
167168
for _, config := range configs {

api/v1/mdb/mongodb_validation_test.go

Lines changed: 7 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,8 @@ func TestOIDCProviderConfigUniqueIssuerURIValidation(t *testing.T) {
506506
expectedResult v1.ValidationResult
507507
}{
508508
{
509-
name: "MongoDB 6.0 with duplicate issuer URIs - error",
510-
mongoVersion: "6.0.0",
509+
name: "MongoDB 7.0.11 with duplicate issuer URIs - error",
510+
mongoVersion: "7.0.11",
511511
configs: []OIDCProviderConfig{
512512
{
513513
ConfigurationName: "config1",
@@ -524,25 +524,8 @@ func TestOIDCProviderConfigUniqueIssuerURIValidation(t *testing.T) {
524524
"config1", "config2", "https://provider.com"),
525525
},
526526
{
527-
name: "MongoDB 7.0 with unique issuer+audience combinations",
528-
mongoVersion: "7.0.0",
529-
configs: []OIDCProviderConfig{
530-
{
531-
ConfigurationName: "config1",
532-
IssuerURI: "https://provider.com",
533-
Audience: "audience1",
534-
},
535-
{
536-
ConfigurationName: "config2",
537-
IssuerURI: "https://provider.com",
538-
Audience: "audience2",
539-
},
540-
},
541-
expectedResult: v1.ValidationSuccess(),
542-
},
543-
{
544-
name: "MongoDB 7.0 with duplicate issuer+audience combinations - warning",
545-
mongoVersion: "7.0.0",
527+
name: "MongoDB 8.0 with duplicate issuer+audience combinations - warning",
528+
mongoVersion: "8.0.0",
546529
configs: []OIDCProviderConfig{
547530
{
548531
ConfigurationName: "config1",
@@ -558,23 +541,6 @@ func TestOIDCProviderConfigUniqueIssuerURIValidation(t *testing.T) {
558541
expectedResult: v1.ValidationWarning("OIDC provider configs %q and %q have duplicate IssuerURI and Audience combination",
559542
"config1", "config2"),
560543
},
561-
{
562-
name: "MongoDB 7.3 with unique issuer+audience combinations",
563-
mongoVersion: "7.3.0",
564-
configs: []OIDCProviderConfig{
565-
{
566-
ConfigurationName: "config1",
567-
IssuerURI: "https://provider.com",
568-
Audience: "audience1",
569-
},
570-
{
571-
ConfigurationName: "config2",
572-
IssuerURI: "https://provider.com",
573-
Audience: "audience2",
574-
},
575-
},
576-
expectedResult: v1.ValidationSuccess(),
577-
},
578544
{
579545
name: "MongoDB 8.0 with unique issuer+audience combinations",
580546
mongoVersion: "8.0.0",
@@ -594,16 +560,16 @@ func TestOIDCProviderConfigUniqueIssuerURIValidation(t *testing.T) {
594560
},
595561
{
596562
name: "MongoDB enterprise version with -ent suffix",
597-
mongoVersion: "7.0.0-ent",
563+
mongoVersion: "7.0.11-ent",
598564
configs: []OIDCProviderConfig{
599565
{
600566
ConfigurationName: "config1",
601-
IssuerURI: "https://provider.com",
567+
IssuerURI: "https://provider-1.com",
602568
Audience: "audience1",
603569
},
604570
{
605571
ConfigurationName: "config2",
606-
IssuerURI: "https://provider.com",
572+
IssuerURI: "https://provider-2.com",
607573
Audience: "audience2",
608574
},
609575
},

config/crd/bases/mongodb.com_mongodb.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1573,7 +1573,7 @@ spec:
15731573
description: |-
15741574
Issuer value provided by your registered IdP application. Using this URI, MongoDB finds an OpenID Connect Provider
15751575
Configuration Document, which should be available in the /.wellknown/open-id-configuration endpoint.
1576-
For MongoDB 7.0, 7.3, and 8.0+, the combination of issuerURI and audience must be unique across OIDC provider configurations.
1576+
For MongoDB 8.0+, the combination of issuerURI and audience must be unique across OIDC provider configurations.
15771577
For other MongoDB versions, the issuerURI itself must be unique.
15781578
type: string
15791579
requestedScopes:

config/crd/bases/mongodb.com_mongodbmulticluster.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ spec:
833833
description: |-
834834
Issuer value provided by your registered IdP application. Using this URI, MongoDB finds an OpenID Connect Provider
835835
Configuration Document, which should be available in the /.wellknown/open-id-configuration endpoint.
836-
For MongoDB 7.0, 7.3, and 8.0+, the combination of issuerURI and audience must be unique across OIDC provider configurations.
836+
For MongoDB 8.0+, the combination of issuerURI and audience must be unique across OIDC provider configurations.
837837
For other MongoDB versions, the issuerURI itself must be unique.
838838
type: string
839839
requestedScopes:

config/crd/bases/mongodb.com_opsmanagers.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ spec:
895895
description: |-
896896
Issuer value provided by your registered IdP application. Using this URI, MongoDB finds an OpenID Connect Provider
897897
Configuration Document, which should be available in the /.wellknown/open-id-configuration endpoint.
898-
For MongoDB 7.0, 7.3, and 8.0+, the combination of issuerURI and audience must be unique across OIDC provider configurations.
898+
For MongoDB 8.0+, the combination of issuerURI and audience must be unique across OIDC provider configurations.
899899
For other MongoDB versions, the issuerURI itself must be unique.
900900
type: string
901901
requestedScopes:

config/manifests/bases/mongodb-kubernetes.clusterserviceversion.yaml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ metadata:
88
certified: "true"
99
containerImage: quay.io/mongodb/mongodb-kubernetes:1.1.0
1010
createdAt: ""
11-
description: The MongoDB Controllers for Kubernetes enable easy deploys of MongoDB
12-
into Kubernetes clusters, using our management, monitoring and backup platforms,
13-
Ops Manager and Cloud Manager.
11+
description: The MongoDB Controllers for Kubernetes enable easy deploys of
12+
MongoDB into Kubernetes clusters, using our management, monitoring and
13+
backup platforms, Ops Manager and Cloud Manager.
1414
features.operators.openshift.io/disconnected: "true"
1515
features.operators.openshift.io/fips-compliant: "false"
1616
features.operators.openshift.io/proxy-aware: "false"
@@ -51,7 +51,8 @@ spec:
5151
x-descriptors:
5252
- urn:alm:descriptor:com.tectonic.ui:text
5353
- urn:alm:descriptor:com.tectonic.ui:fieldGroup:ClusterConfiguration
54-
- description: In a Replica Set deployment type, specifies the amount of members.
54+
- description: In a Replica Set deployment type, specifies the amount of
55+
members.
5556
displayName: Members of a Replica Set
5657
path: members
5758
x-descriptors:
@@ -65,7 +66,8 @@ spec:
6566
- description: Project configuration for this deployment
6667
displayName: Ops Manager project configuration
6768
path: opsManager
68-
- description: Name of the ConfigMap with the configuration for this project
69+
- description: Name of the ConfigMap with the configuration for this
70+
project
6971
displayName: Ops Manager Project Configuration
7072
path: opsManager.configMapRef.name
7173
x-descriptors:
@@ -164,7 +166,8 @@ spec:
164166
x-descriptors:
165167
- urn:alm:descriptor:com.tectonic.ui:text
166168
- urn:alm:descriptor:com.tectonic.ui:fieldGroup:ClusterConfiguration
167-
- description: In a Replica Set deployment type, specifies the amount of members.
169+
- description: In a Replica Set deployment type, specifies the amount of
170+
members.
168171
displayName: Members of a Replica Set
169172
path: members
170173
x-descriptors:
@@ -178,7 +181,8 @@ spec:
178181
- description: Project configuration for this deployment
179182
displayName: Ops Manager project configuration
180183
path: opsManager
181-
- description: Name of the ConfigMap with the configuration for this project
184+
- description: Name of the ConfigMap with the configuration for this
185+
project
182186
displayName: Ops Manager Project Configuration
183187
path: opsManager.configMapRef.name
184188
x-descriptors:
@@ -190,8 +194,8 @@ spec:
190194
x-descriptors:
191195
- urn:alm:descriptor:com.tectonic.ui:booleanSwitch
192196
- urn:alm:descriptor:com.tectonic.ui:fieldGroup:ClusterConfiguration
193-
- description: Optional. Specify whether to duplicate service objects among
194-
different Kubernetes clusters.
197+
- description: Optional. Specify whether to duplicate service objects
198+
among different Kubernetes clusters.
195199
displayName: Duplicate Service Objects
196200
path: duplicateServiceObjects
197201
x-descriptors:
@@ -252,7 +256,8 @@ spec:
252256
path: passwordSecretKeyRef.name
253257
x-descriptors:
254258
- urn:alm:descriptor:io.kubernetes:Secret
255-
- displayName: Name of the MongoDB resource to which this user is associated.
259+
- displayName: Name of the MongoDB resource to which this user is
260+
associated.
256261
path: mongodbResourceRef.name
257262
x-descriptors:
258263
- urn:alm:descriptor:io.kubernetes:mongodb
@@ -308,8 +313,8 @@ spec:
308313
x-descriptors:
309314
- urn:alm:descriptor:io.kubernetes:Secret
310315
- urn:alm:descriptor:com.tectonic.ui:fieldGroup:OpsManagerConfiguration
311-
- displayName: Secret to enable TLS for Ops Manager allowing it to serve traffic
312-
over HTTPS.
316+
- displayName: Secret to enable TLS for Ops Manager allowing it to serve
317+
traffic over HTTPS.
313318
path: security.tls.secretRef.name
314319
x-descriptors:
315320
- urn:alm:descriptor:io.kubernetes:Secret
@@ -319,8 +324,8 @@ spec:
319324
x-descriptors:
320325
- urn:alm:descriptor:com.tectonic.ui:number
321326
- urn:alm:descriptor:com.tectonic.ui:fieldGroup:ApplicationDatabase
322-
- displayName: Secret containing the TLS certificate signed by known or custom
323-
CA.
327+
- displayName: Secret containing the TLS certificate signed by known or
328+
custom CA.
324329
path: applicationDatabase.security.tls.secretRef.name
325330
x-descriptors:
326331
- urn:alm:descriptor:io.kubernetes:Secret

docker/mongodb-kubernetes-tests/tests/authentication/sharded_cluster_scram_sha_and_x509.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def test_x509_user_reaches_updated_phase(x509_user: MongoDBUser):
154154
def test_x509_user_exists_in_automation_config(x509_user: MongoDBUser):
155155
ac = KubernetesTester.get_automation_config()
156156
users = ac["auth"]["usersWanted"]
157-
return x509_user["spec"]["username"] in (user["user"] for user in users)
157+
assert x509_user["spec"]["username"] in (user["user"] for user in users)
158158

159159

160160
@pytest.mark.e2e_sharded_cluster_scram_sha_and_x509

helm_chart/Chart.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
apiVersion: v2
22
name: mongodb-kubernetes
3-
description: MongoDB Controllers for Kubernetes translate the human knowledge of creating
4-
a MongoDB instance into a scalable, repeatable, and standardized method.
3+
description: MongoDB Controllers for Kubernetes translate the human knowledge of
4+
creating a MongoDB instance into a scalable, repeatable, and standardized
5+
method.
56
version: 1.1.0
67
kubeVersion: '>=1.16-0'
78
type: application

helm_chart/crds/mongodb.com_mongodb.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1573,7 +1573,7 @@ spec:
15731573
description: |-
15741574
Issuer value provided by your registered IdP application. Using this URI, MongoDB finds an OpenID Connect Provider
15751575
Configuration Document, which should be available in the /.wellknown/open-id-configuration endpoint.
1576-
For MongoDB 7.0, 7.3, and 8.0+, the combination of issuerURI and audience must be unique across OIDC provider configurations.
1576+
For MongoDB 8.0+, the combination of issuerURI and audience must be unique across OIDC provider configurations.
15771577
For other MongoDB versions, the issuerURI itself must be unique.
15781578
type: string
15791579
requestedScopes:

helm_chart/crds/mongodb.com_mongodbmulticluster.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ spec:
833833
description: |-
834834
Issuer value provided by your registered IdP application. Using this URI, MongoDB finds an OpenID Connect Provider
835835
Configuration Document, which should be available in the /.wellknown/open-id-configuration endpoint.
836-
For MongoDB 7.0, 7.3, and 8.0+, the combination of issuerURI and audience must be unique across OIDC provider configurations.
836+
For MongoDB 8.0+, the combination of issuerURI and audience must be unique across OIDC provider configurations.
837837
For other MongoDB versions, the issuerURI itself must be unique.
838838
type: string
839839
requestedScopes:

helm_chart/crds/mongodb.com_opsmanagers.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ spec:
895895
description: |-
896896
Issuer value provided by your registered IdP application. Using this URI, MongoDB finds an OpenID Connect Provider
897897
Configuration Document, which should be available in the /.wellknown/open-id-configuration endpoint.
898-
For MongoDB 7.0, 7.3, and 8.0+, the combination of issuerURI and audience must be unique across OIDC provider configurations.
898+
For MongoDB 8.0+, the combination of issuerURI and audience must be unique across OIDC provider configurations.
899899
For other MongoDB versions, the issuerURI itself must be unique.
900900
type: string
901901
requestedScopes:

public/crds.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,7 +1681,7 @@ spec:
16811681
description: |-
16821682
Issuer value provided by your registered IdP application. Using this URI, MongoDB finds an OpenID Connect Provider
16831683
Configuration Document, which should be available in the /.wellknown/open-id-configuration endpoint.
1684-
For MongoDB 7.0, 7.3, and 8.0+, the combination of issuerURI and audience must be unique across OIDC provider configurations.
1684+
For MongoDB 8.0+, the combination of issuerURI and audience must be unique across OIDC provider configurations.
16851685
For other MongoDB versions, the issuerURI itself must be unique.
16861686
type: string
16871687
requestedScopes:
@@ -4334,7 +4334,7 @@ spec:
43344334
description: |-
43354335
Issuer value provided by your registered IdP application. Using this URI, MongoDB finds an OpenID Connect Provider
43364336
Configuration Document, which should be available in the /.wellknown/open-id-configuration endpoint.
4337-
For MongoDB 7.0, 7.3, and 8.0+, the combination of issuerURI and audience must be unique across OIDC provider configurations.
4337+
For MongoDB 8.0+, the combination of issuerURI and audience must be unique across OIDC provider configurations.
43384338
For other MongoDB versions, the issuerURI itself must be unique.
43394339
type: string
43404340
requestedScopes:
@@ -5998,7 +5998,7 @@ spec:
59985998
description: |-
59995999
Issuer value provided by your registered IdP application. Using this URI, MongoDB finds an OpenID Connect Provider
60006000
Configuration Document, which should be available in the /.wellknown/open-id-configuration endpoint.
6001-
For MongoDB 7.0, 7.3, and 8.0+, the combination of issuerURI and audience must be unique across OIDC provider configurations.
6001+
For MongoDB 8.0+, the combination of issuerURI and audience must be unique across OIDC provider configurations.
60026002
For other MongoDB versions, the issuerURI itself must be unique.
60036003
type: string
60046004
requestedScopes:

requirements.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
requests==2.32.3
1+
requests==2.32.4
22
click==8.1.8
33
docker==7.1.0
44
Jinja2==3.1.6
5-
ruamel.yaml==0.18.11
5+
ruamel.yaml==0.18.14
66
dnspython>=2.6.1
77
MarkupSafe==3.0.2
88
semver==3.0.4
99
chardet==5.2.0
1010
jsonpatch==1.33
1111
kubernetes==30.1.0
1212
pymongo==4.13.0
13-
pytest==8.3.5
13+
pytest==8.4.0
1414
pytest-asyncio==0.26.0
1515
pycognito==2024.5.1
1616
PyYAML==6.0.2
@@ -31,15 +31,15 @@ isort==6.0.1
3131
shrub.py==3.10.0
3232
pytest-mock==3.14.1
3333
wrapt==1.17.2
34-
botocore==1.38.23
35-
boto3==1.38.23
34+
botocore==1.38.33
35+
boto3==1.38.33
3636

3737
# from kubeobject
3838
freezegun==1.5.2
3939
python-box==7.3.2
4040
autopep8==2.3.2
4141
flake8-isort==6.1.2
42-
mypy==1.15.0
42+
mypy==1.16.0
4343
types-freezegun==1.1.10
4444
types-PyYAML==6.0.12.20250516
4545
types-pytz==2025.2.0.20250516

0 commit comments

Comments
 (0)