Skip to content

Commit eed9d02

Browse files
authored
PYTHON-3731 Disable MONGODB-OIDC Auth for 4.4 (#1230)
1 parent ec34378 commit eed9d02

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

.evergreen/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3204,7 +3204,7 @@ buildvariants:
32043204

32053205
- matrix_name: "oidc-auth-test"
32063206
matrix_spec:
3207-
platform: [ ubuntu-20.04 ]
3207+
platform: [ rhel84 ]
32083208
python-version: ["3.9"]
32093209
display_name: "MONGODB-OIDC Auth ${platform} ${python-version}"
32103210
tasks:

pymongo/auth.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,6 @@ def _authenticate_default(credentials, sock_info):
510510
"MONGODB-CR": _authenticate_mongo_cr,
511511
"MONGODB-X509": _authenticate_x509,
512512
"MONGODB-AWS": _authenticate_aws,
513-
"MONGODB-OIDC": _authenticate_oidc,
514513
"PLAIN": _authenticate_plain,
515514
"SCRAM-SHA-1": functools.partial(_authenticate_scram, mechanism="SCRAM-SHA-1"),
516515
"SCRAM-SHA-256": functools.partial(_authenticate_scram, mechanism="SCRAM-SHA-256"),

test/auth_aws/test_auth_oidc.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,16 @@
2828

2929
from bson import SON
3030
from pymongo import MongoClient
31+
from pymongo.auth import _AUTH_MAP, _authenticate_oidc
3132
from pymongo.auth_oidc import _CACHE as _oidc_cache
3233
from pymongo.cursor import CursorType
3334
from pymongo.errors import ConfigurationError, OperationFailure
3435
from pymongo.hello import HelloCompat
3536
from pymongo.operations import InsertOne
3637

38+
# Force MONGODB-OIDC to be enabled.
39+
_AUTH_MAP["MONGODB-OIDC"] = _authenticate_oidc # type:ignore
40+
3741

3842
class TestAuthOIDC(unittest.TestCase):
3943
uri: str

0 commit comments

Comments
 (0)