PYTHON-3731 Disable MONGODB-OIDC Auth for 4.4 (#1230)

This commit is contained in:
Steven Silvester 2023-06-13 11:30:50 -05:00 committed by GitHub
parent ec3437849e
commit eed9d02a2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View File

@ -3204,7 +3204,7 @@ buildvariants:
- matrix_name: "oidc-auth-test"
matrix_spec:
platform: [ ubuntu-20.04 ]
platform: [ rhel84 ]
python-version: ["3.9"]
display_name: "MONGODB-OIDC Auth ${platform} ${python-version}"
tasks:

View File

@ -510,7 +510,6 @@ _AUTH_MAP: Mapping[str, Callable] = {
"MONGODB-CR": _authenticate_mongo_cr,
"MONGODB-X509": _authenticate_x509,
"MONGODB-AWS": _authenticate_aws,
"MONGODB-OIDC": _authenticate_oidc,
"PLAIN": _authenticate_plain,
"SCRAM-SHA-1": functools.partial(_authenticate_scram, mechanism="SCRAM-SHA-1"),
"SCRAM-SHA-256": functools.partial(_authenticate_scram, mechanism="SCRAM-SHA-256"),

View File

@ -28,12 +28,16 @@ from test.utils import EventListener
from bson import SON
from pymongo import MongoClient
from pymongo.auth import _AUTH_MAP, _authenticate_oidc
from pymongo.auth_oidc import _CACHE as _oidc_cache
from pymongo.cursor import CursorType
from pymongo.errors import ConfigurationError, OperationFailure
from pymongo.hello import HelloCompat
from pymongo.operations import InsertOne
# Force MONGODB-OIDC to be enabled.
_AUTH_MAP["MONGODB-OIDC"] = _authenticate_oidc # type:ignore
class TestAuthOIDC(unittest.TestCase):
uri: str