Skip to content

CLOUDP-314916: e2e OIDC multicluster tests #155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 120 commits into from
Jun 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
f0b6a96
CRD changes
MaciejKaras Apr 25, 2025
d344589
Authorization package refactor - part 1
MaciejKaras Apr 24, 2025
99479f1
Authorization package refactor - part 2
MaciejKaras Apr 24, 2025
7c23143
Added validation logic + tests
MaciejKaras Apr 25, 2025
8cba1c1
Add URL test validation
MaciejKaras Apr 27, 2025
2528892
Fixed MDB Multi code
MaciejKaras Apr 27, 2025
1eaf9ab
Merge branch 'feature/mk-authorization-refactor' into feature/mk-oidc…
MaciejKaras Apr 27, 2025
6d27458
Propagating CRD values
MaciejKaras Apr 17, 2025
81e6107
Moved OIDCProviderConfigs to Deployment.Auth where it belongs
MaciejKaras Apr 25, 2025
024fa63
Fixed migrating to mongodb-kubernetes repository
MaciejKaras Apr 27, 2025
7a53fd7
Fixed unit tests + CRD generation
MaciejKaras Apr 27, 2025
97a5c99
Add unit tests
MaciejKaras Apr 27, 2025
6dd4976
Temporal fix for AC
MaciejKaras Apr 27, 2025
8b34222
Fix kubebuilder validation rules
MaciejKaras Apr 29, 2025
1cbe97a
Fixes for util.ParseURL
MaciejKaras Apr 30, 2025
0ce0874
Proper OIDC AC merging
MaciejKaras Apr 29, 2025
e4cfb11
Unit test fixes
MaciejKaras Apr 30, 2025
1667045
Fixed issue with disabling OIDC
MaciejKaras Apr 30, 2025
e882a8c
Resolve review comments
MaciejKaras Apr 30, 2025
8f5ff0a
Added getMechanismByName() func and removed global variables
MaciejKaras Apr 30, 2025
e533976
Review fixes
MaciejKaras May 5, 2025
279886f
Merge branch 'master' into feature/mk-oidc-crd-validations
MaciejKaras May 5, 2025
a8306a7
Add one more validation test
MaciejKaras May 5, 2025
866d6ae
Merge branch 'master' into feature/mk-authorization-refactor
MaciejKaras May 5, 2025
09e4628
Merge branch 'feature/mk-oidc-crd-validations' into feature/mk-oidc-c…
MaciejKaras May 5, 2025
23de25e
Merge branch 'feature/mk-authorization-refactor' into feature/mk-oidc…
MaciejKaras May 5, 2025
bcc1136
Fix bug
lucian-tosa May 9, 2025
2c08662
Merge remote-tracking branch 'origin/master' into feature/mk-oidc-crd…
lucian-tosa May 9, 2025
68750a4
Fix linter
lucian-tosa May 9, 2025
e7d3d06
Merge branch 'master' into feature/mk-oidc-crd-propagation
lucian-tosa May 9, 2025
2b306f5
remove refs
anandsyncs May 9, 2025
e4743bf
add more validations
anandsyncs May 18, 2025
d6e6ce7
lint fix
anandsyncs May 18, 2025
fe5cdef
Merge branch 'master' into anandsingh/oidc-e2e-tests
anandsyncs May 18, 2025
db52705
lint fix
anandsyncs May 18, 2025
2fb5a96
Merge remote-tracking branch 'origin/anandsingh/oidc-e2e-tests' into …
anandsyncs May 18, 2025
efacc00
make sure env vars are included
anandsyncs May 19, 2025
715c627
Merge branch 'master' into anandsingh/oidc-e2e-tests
anandsyncs May 19, 2025
764d3d5
Merge branch 'master' into feature/mk-oidc-crd-propagation
anandsyncs May 19, 2025
21647a0
Merge branch 'feature/mk-oidc-crd-propagation' into anandsingh/oidc-e…
anandsyncs May 19, 2025
63927a0
upgrade pymongo
anandsyncs May 19, 2025
bec3f6b
Merge remote-tracking branch 'origin/anandsingh/oidc-e2e-tests' into …
anandsyncs May 19, 2025
e6b16f4
lint fix
anandsyncs May 19, 2025
1b82b29
env vars tracer
anandsyncs May 20, 2025
ce6eb85
Merge branch 'master' into anandsingh/oidc-e2e-tests
anandsyncs May 20, 2025
9d2a304
env vars tracer
anandsyncs May 20, 2025
0b86f84
Merge remote-tracking branch 'origin/anandsingh/oidc-e2e-tests' into …
anandsyncs May 20, 2025
cb7cd70
fix lint
anandsyncs May 20, 2025
8da5102
env vars tracer
anandsyncs May 20, 2025
890fb13
env vars tracer
anandsyncs May 20, 2025
8b396d6
change version in the config
anandsyncs May 20, 2025
a5e357b
run separate e2e tests for different oidc flavors
anandsyncs May 20, 2025
b4db2e6
lint-fix
anandsyncs May 20, 2025
db45441
add sharded cluster tests to evergreen run
anandsyncs May 21, 2025
1bce820
Merge branch 'master' into feature/mk-oidc-crd-propagation
anandsyncs May 22, 2025
f7ec0f1
implement the authentication_mechanism interface correctly for oidc
anandsyncs May 22, 2025
c1f54a5
lint-fix
anandsyncs May 22, 2025
f271051
Merge branch 'master' into feature/mk-oidc-crd-propagation
anandsyncs May 22, 2025
390998c
Merge branch 'feature/mk-oidc-crd-propagation' into anandsingh/oidc-e…
anandsyncs May 22, 2025
3eed7fa
Merge branch 'master' into anandsingh/oidc-e2e-tests
anandsyncs May 22, 2025
bca4aa2
fix duplicate issuer uri problem
anandsyncs May 22, 2025
8dc9bd5
Merge remote-tracking branch 'origin/anandsingh/oidc-e2e-tests' into …
anandsyncs May 22, 2025
6ec6905
Merge branch 'anandsingh/oidc-e2e-tests' into anandsingh/e2e-oidc-mul…
anandsyncs May 22, 2025
92078b7
multi cluster test
anandsyncs May 22, 2025
cd30227
fix lint
anandsyncs May 22, 2025
17c4933
run same tests for single cluster and multicluster
anandsyncs May 22, 2025
d5f406a
cleanup
anandsyncs May 22, 2025
cfa628e
resolve conflicts
anandsyncs May 22, 2025
4593b6f
Merge branch 'feature/mk-oidc-crd-propagation' into anandsingh/oidc-e…
anandsyncs May 22, 2025
e6ed367
update external auth validation
anandsyncs May 22, 2025
8d8bcdc
Merge branch 'feature/mk-oidc-crd-propagation' into anandsingh/oidc-e…
anandsyncs May 22, 2025
2d8da2a
remove sharded cluster workforce test
anandsyncs May 23, 2025
6ffe3f4
fix clean up error
anandsyncs May 23, 2025
1190494
Merge branch 'anandsingh/oidc-e2e-tests' of github.com:mongodb/mongod…
anandsyncs May 23, 2025
a9a2985
Merge branch 'anandsingh/oidc-e2e-tests' into anandsingh/e2e-oidc-mul…
anandsyncs May 23, 2025
727979c
remove sharded cluster workforce test
anandsyncs May 23, 2025
8dbc7ae
Merge branch 'anandsingh/oidc-e2e-tests' into anandsingh/e2e-oidc-mul…
anandsyncs May 23, 2025
47da976
clean up tests
anandsyncs May 23, 2025
0d8fd6e
Webhook validation tests
lucian-tosa May 23, 2025
0f1b385
assert cluster running state before asserting automation config
anandsyncs May 23, 2025
158b6de
multi-cluster tracer
anandsyncs May 25, 2025
0deca63
fix typo
anandsyncs May 25, 2025
37efc12
add service names
anandsyncs May 25, 2025
c91e652
add test for multi cluster user
anandsyncs May 25, 2025
a892769
fix typo
anandsyncs May 25, 2025
789f21b
Merge branch 'master' into anandsingh/e2e-oidc-multicluster
anandsyncs May 25, 2025
356010d
Merge branch 'anandsingh/oidc-e2e-tests' into anandsingh/e2e-oidc-mul…
anandsyncs May 25, 2025
ac13987
Merge remote-tracking branch 'origin/anandsingh/e2e-oidc-multicluster…
anandsyncs May 25, 2025
2d621b3
Merge branch 'feature/mk-oidc-crd-propagation' into anandsingh/oidc-e…
anandsyncs May 26, 2025
39c6702
Merge branch 'master' into anandsingh/oidc-e2e-tests
anandsyncs May 26, 2025
eab5a79
Merge branch 'anandsingh/oidc-e2e-tests' into anandsingh/e2e-oidc-mul…
anandsyncs May 26, 2025
5ab81c7
lint fix
anandsyncs May 26, 2025
2e2b6c6
Merge remote-tracking branch 'origin/anandsingh/e2e-oidc-multicluster…
anandsyncs May 26, 2025
86f0be0
lint fix
anandsyncs May 26, 2025
582b95f
Merge branch 'master' into anandsingh/e2e-oidc-multicluster
anandsyncs May 26, 2025
19f161b
Merge branch 'master' into feature/mk-oidc-crd-propagation
anandsyncs May 26, 2025
ca75756
change oidc multi user name
anandsyncs May 26, 2025
26e24a0
remove default value for GroupsClaim
anandsyncs May 26, 2025
7257b4e
remove default value for GroupsClaim
anandsyncs May 26, 2025
ed2748d
Merge branch 'feature/mk-oidc-crd-propagation' into anandsingh/oidc-e…
anandsyncs May 26, 2025
1be8af8
Merge branch 'master' into anandsingh/oidc-e2e-tests
anandsyncs May 26, 2025
ca42f0b
Merge branch 'anandsingh/oidc-e2e-tests' into anandsingh/e2e-oidc-mul…
anandsyncs May 26, 2025
30bb749
remove default value for GroupsClaim from tests
anandsyncs May 26, 2025
5df3e5c
Merge branch 'master' into feature/mk-oidc-crd-propagation
anandsyncs May 26, 2025
9d56078
fix test
anandsyncs May 26, 2025
0b03de4
Merge branch 'feature/mk-oidc-crd-propagation' into anandsingh/oidc-e…
anandsyncs May 26, 2025
00adfc7
remove incorrect field
anandsyncs May 27, 2025
95c58de
Merge remote-tracking branch 'origin/anandsingh/oidc-e2e-tests' into …
anandsyncs May 27, 2025
c4246d8
Merge branch 'anandsingh/oidc-e2e-tests' into anandsingh/e2e-oidc-mul…
anandsyncs May 27, 2025
a29f737
add explanation for manual aws setup
anandsyncs May 27, 2025
09409f1
lint fix
anandsyncs May 27, 2025
965f50d
Merge branch 'anandsingh/oidc-e2e-tests' into anandsingh/e2e-oidc-mul…
anandsyncs May 27, 2025
feedaba
resolve merge conflicts
anandsyncs Jun 3, 2025
e2d5eeb
remove extraneous change
anandsyncs Jun 3, 2025
cceeb15
pre-commit
MaciejKaras Jun 3, 2025
5388b70
Merge branch 'master' into anandsingh/e2e-oidc-multicluster
MaciejKaras Jun 3, 2025
66cdb82
Apply suggestions from Copilot
MaciejKaras Jun 3, 2025
44db089
Merge branch 'master' into anandsingh/e2e-oidc-multicluster
anandsyncs Jun 5, 2025
de2ad6a
add comment for skip multicluster
anandsyncs Jun 5, 2025
2104dc3
lint fix
anandsyncs Jun 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .evergreen-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1266,6 +1266,16 @@ tasks:
commands:
- func: e2e_test

- name: e2e_multi_cluster_oidc_m2m_group
tags: [ "patch-run" ]
commands:
- func: e2e_test

- name: e2e_multi_cluster_oidc_m2m_user
tags: [ "patch-run" ]
commands:
- func: e2e_test

- name: e2e_search_community_basic
tags: ["patch-run"]
commands:
Expand Down
4 changes: 4 additions & 0 deletions .evergreen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,10 @@ task_groups:
- e2e_tls_x509_configure_all_options_sc
- e2e_tls_x509_sc
- e2e_meko_mck_upgrade
- e2e_sharded_cluster_oidc_m2m_group
- e2e_sharded_cluster_oidc_m2m_user
- e2e_multi_cluster_oidc_m2m_group
- e2e_multi_cluster_oidc_m2m_user

<<: *teardown_group

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@
from kubetester.automation_config_tester import AutomationConfigTester
from kubetester.kubetester import KubernetesTester, ensure_ent_version
from kubetester.kubetester import fixture as load_fixture
from kubetester.kubetester import is_multi_cluster, skip_if_multi_cluster
from kubetester.mongodb import MongoDB
from kubetester.mongotester import ShardedClusterTester
from kubetester.phase import Phase
from pytest import fixture
from tests.shardedcluster.conftest import (
enable_multi_cluster_deployment,
get_mongos_service_names,
)

MDB_RESOURCE = "oidc-sharded-cluster-replica-set"

Expand All @@ -26,17 +31,28 @@ def sharded_cluster(namespace: str, custom_mdb_version: str) -> MongoDB:

resource.set_oidc_provider_configs(oidc_provider_configs)

if is_multi_cluster():
enable_multi_cluster_deployment(
resource=resource,
shard_members_array=[1, 1, 1],
mongos_members_array=[1, 1, None],
configsrv_members_array=[1, 1, 1],
)

return resource.update()


@pytest.mark.e2e_sharded_cluster_oidc_m2m_group
class TestCreateOIDCShardedCluster(KubernetesTester):

def test_create_sharded_cluster(self, sharded_cluster: MongoDB):
sharded_cluster.assert_reaches_phase(Phase.Running, timeout=600)
sharded_cluster.assert_reaches_phase(Phase.Running, timeout=800)

def test_assert_connectivity(self, sharded_cluster: MongoDB):
tester = ShardedClusterTester(MDB_RESOURCE, 2)
service_names = None
if is_multi_cluster():
service_names = get_mongos_service_names(sharded_cluster)
tester = sharded_cluster.tester(service_names=service_names)
tester.assert_oidc_authentication()

def test_ops_manager_state_updated_correctly(self, sharded_cluster: MongoDB):
Expand Down Expand Up @@ -75,6 +91,8 @@ def test_ops_manager_state_updated_correctly(self, sharded_cluster: MongoDB):
tester.assert_oidc_configuration(expected_oidc_configs)


# Skipping the test for multi-cluster setups as we want to focus on testing only connectivity for OIDC in multi-cluster setups.
@skip_if_multi_cluster()
@pytest.mark.e2e_sharded_cluster_oidc_m2m_group
class TestAddNewOIDCProviderAndRole(KubernetesTester):
def test_add_oidc_provider_and_role(self, sharded_cluster: MongoDB):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@
from kubetester.automation_config_tester import AutomationConfigTester
from kubetester.kubetester import KubernetesTester, ensure_ent_version
from kubetester.kubetester import fixture as load_fixture
from kubetester.kubetester import is_multi_cluster
from kubetester.mongodb import MongoDB
from kubetester.mongodb_user import MongoDBUser
from kubetester.mongotester import ShardedClusterTester
from kubetester.phase import Phase
from pytest import fixture
from tests.shardedcluster.conftest import (
enable_multi_cluster_deployment,
get_mongos_service_names,
)

MDB_RESOURCE = "oidc-sharded-cluster-replica-set"

Expand All @@ -25,6 +30,14 @@ def sharded_cluster(namespace: str, custom_mdb_version: str) -> MongoDB:

resource.set_oidc_provider_configs(oidc_provider_configs)

if is_multi_cluster():
enable_multi_cluster_deployment(
resource=resource,
shard_members_array=[1, 1, 1],
mongos_members_array=[1, 1, None],
configsrv_members_array=[1, 1, 1],
)

if try_load(resource):
return resource

Expand All @@ -44,13 +57,16 @@ def oidc_user(namespace) -> MongoDBUser:
@pytest.mark.e2e_sharded_cluster_oidc_m2m_user
class TestCreateOIDCShardedCluster(KubernetesTester):
def test_create_sharded_cluster(self, sharded_cluster: MongoDB):
sharded_cluster.assert_reaches_phase(Phase.Running, timeout=600)
sharded_cluster.assert_reaches_phase(Phase.Running, timeout=800)

def test_create_user(self, oidc_user: MongoDBUser):
oidc_user.assert_reaches_phase(Phase.Updated, timeout=400)

def test_assert_connectivity(self, sharded_cluster: MongoDB):
tester = ShardedClusterTester(MDB_RESOURCE, 2)
service_names = None
if is_multi_cluster():
service_names = get_mongos_service_names(sharded_cluster)
tester = sharded_cluster.tester(service_names=service_names)
tester.assert_oidc_authentication()

def test_ops_manager_state_updated_correctly(self, sharded_cluster: MongoDB):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
apiVersion: mongodb.com/v1
kind: MongoDBMultiCluster
metadata:
name: oidc-multi-replica-set
spec:
version: 7.0.5-ent
type: ReplicaSet
duplicateServiceObjects: false
credentials: my-credentials
opsManager:
configMapRef:
name: my-project
clusterSpecList:
- clusterName: kind-e2e-cluster-1
members: 1
- clusterName: kind-e2e-cluster-2
members: 1
- clusterName: kind-e2e-cluster-3
members: 2
security:
authentication:
agents:
mode: SCRAM
enabled: true
modes:
- SCRAM
- OIDC
oidcProviderConfigs:
- audience: "<filled-in-test>"
clientId: "<filled-in-test>"
issuerURI: "<filled-in-test>"
requestedScopes: [ ]
userClaim: "sub"
groupsClaim: "cognito:groups"
authorizationMethod: "WorkloadIdentityFederation"
authorizationType: "GroupMembership"
configurationName: "OIDC-test"
roles:
- role: "OIDC-test/test"
db: "admin"
roles:
- role: "readWriteAnyDatabase"
db: "admin"
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
apiVersion: mongodb.com/v1
kind: MongoDBMultiCluster
metadata:
name: oidc-multi-replica-set
spec:
version: 7.0.5-ent
type: ReplicaSet
duplicateServiceObjects: false
credentials: my-credentials
opsManager:
configMapRef:
name: my-project
clusterSpecList:
- clusterName: kind-e2e-cluster-1
members: 1
- clusterName: kind-e2e-cluster-2
members: 1
- clusterName: kind-e2e-cluster-3
members: 2
security:
authentication:
agents:
mode: SCRAM
enabled: true
modes:
- SCRAM
- OIDC
oidcProviderConfigs:
- audience: "<filled-in-test>"
clientId: "<filled-in-test>"
issuerURI: "<filled-in-test>"
requestedScopes: [ ]
userClaim: "sub"
authorizationMethod: "WorkloadIdentityFederation"
authorizationType: "UserID"
configurationName: "OIDC-test-user"
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
apiVersion: mongodb.com/v1
kind: MongoDBUser
metadata:
name: oidc-user-1
spec:
username: "<filled-in-test>"
db: "$external"
mongodbResourceRef:
name: oidc-multi-replica-set
roles:
- db: "admin"
name: "readWriteAnyDatabase"
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import kubernetes
import kubetester.oidc as oidc
import pytest
from kubetester import try_load
from kubetester.automation_config_tester import AutomationConfigTester
from kubetester.kubetester import KubernetesTester, ensure_ent_version
from kubetester.kubetester import fixture as yaml_fixture
from kubetester.mongodb import MongoDB, Phase
from kubetester.mongodb_multi import MongoDBMulti, MultiClusterClient
from kubetester.mongotester import ReplicaSetTester
from kubetester.operator import Operator
from pytest import fixture

MDB_RESOURCE = "oidc-multi-replica-set"


@fixture(scope="module")
def mongodb_multi(
central_cluster_client: kubernetes.client.ApiClient,
namespace: str,
member_cluster_names,
custom_mdb_version: str,
) -> MongoDBMulti:
resource = MongoDBMulti.from_yaml(yaml_fixture("oidc/mongodb-multi-m2m-group.yaml"), MDB_RESOURCE, namespace)
if try_load(resource):
return resource

oidc_provider_configs = resource.get_oidc_provider_configs()

oidc_provider_configs[0]["clientId"] = oidc.get_cognito_workload_client_id()
oidc_provider_configs[0]["audience"] = oidc.get_cognito_workload_client_id()
oidc_provider_configs[0]["issuerURI"] = oidc.get_cognito_workload_url()

resource.set_oidc_provider_configs(oidc_provider_configs)

resource.api = kubernetes.client.CustomObjectsApi(central_cluster_client)

return resource.update()


@pytest.mark.e2e_multi_cluster_oidc_m2m_group
class TestOIDCMultiCluster(KubernetesTester):
def test_deploy_operator(self, multi_cluster_operator: Operator):
multi_cluster_operator.assert_is_running()

def test_create_oidc_replica_set(self, mongodb_multi: MongoDBMulti):
mongodb_multi.assert_reaches_phase(Phase.Running, timeout=800)

def test_assert_connectivity(self, mongodb_multi: MongoDBMulti):
tester = mongodb_multi.tester()
tester.assert_oidc_authentication()

def test_ops_manager_state_updated_correctly(self, mongodb_multi: MongoDBMulti):
tester = mongodb_multi.get_automation_config_tester()
tester.assert_authentication_mechanism_enabled("MONGODB-OIDC", active_auth_mechanism=False)
tester.assert_authentication_enabled(2)
tester.assert_expected_users(0)
tester.assert_authoritative_set(True)
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import kubernetes
import kubetester.oidc as oidc
import pytest
from kubetester import try_load
from kubetester.automation_config_tester import AutomationConfigTester
from kubetester.kubetester import KubernetesTester, ensure_ent_version
from kubetester.kubetester import fixture as yaml_fixture
from kubetester.mongodb import MongoDB, Phase
from kubetester.mongodb_multi import MongoDBMulti
from kubetester.mongodb_user import MongoDBUser
from kubetester.mongotester import ReplicaSetTester
from kubetester.operator import Operator
from pytest import fixture

MDB_RESOURCE = "oidc-multi-replica-set"


@fixture(scope="module")
def mongodb_multi(
central_cluster_client: kubernetes.client.ApiClient,
namespace: str,
member_cluster_names,
custom_mdb_version: str,
) -> MongoDBMulti:
resource = MongoDBMulti.from_yaml(yaml_fixture("oidc/mongodb-multi-m2m-user.yaml"), MDB_RESOURCE, namespace)
if try_load(resource):
return resource

oidc_provider_configs = resource.get_oidc_provider_configs()

oidc_provider_configs[0]["clientId"] = oidc.get_cognito_workload_client_id()
oidc_provider_configs[0]["audience"] = oidc.get_cognito_workload_client_id()
oidc_provider_configs[0]["issuerURI"] = oidc.get_cognito_workload_url()

resource.set_oidc_provider_configs(oidc_provider_configs)

resource.api = kubernetes.client.CustomObjectsApi(central_cluster_client)

return resource.update()


@fixture(scope="module")
def oidc_user(namespace) -> MongoDBUser:
resource = MongoDBUser.from_yaml(yaml_fixture("oidc/oidc-user-multi.yaml"), namespace=namespace)

resource["spec"]["username"] = f"OIDC-test-user/{oidc.get_cognito_workload_user_id()}"
resource["spec"]["mongodbResourceRef"]["name"] = MDB_RESOURCE

return resource.update()


@pytest.mark.e2e_multi_cluster_oidc_m2m_user
class TestOIDCMultiCluster(KubernetesTester):
def test_deploy_operator(self, multi_cluster_operator: Operator):
multi_cluster_operator.assert_is_running()

def test_create_oidc_replica_set(self, mongodb_multi: MongoDBMulti):
mongodb_multi.assert_reaches_phase(Phase.Running, timeout=800)

def test_create_user(self, oidc_user: MongoDBUser):
oidc_user.assert_reaches_phase(Phase.Updated, timeout=800)

def test_assert_connectivity(self, mongodb_multi: MongoDBMulti):
tester = mongodb_multi.tester()
tester.assert_oidc_authentication()

def test_ops_manager_state_updated_correctly(self, mongodb_multi: MongoDBMulti):
tester = mongodb_multi.get_automation_config_tester()
tester.assert_authentication_mechanism_enabled("MONGODB-OIDC", active_auth_mechanism=False)
tester.assert_authentication_enabled(2)
tester.assert_expected_users(1)
tester.assert_authoritative_set(True)
1 change: 0 additions & 1 deletion docs/mongodbcommunity/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ You cannot disable SCRAM authentication.
| `spec.users.roles.role.db` | string | Database that the role applies to. | Yes |
| `spec.users.connectionStringSecretAnnotations` | object | Annotations of the secret object created by the operator which exposes the connection strings for the user. | No |


```yaml
---
apiVersion: mongodbcommunity.mongodb.com/v1
Expand Down