-
Type: Bug
-
Resolution: Fixed
-
Priority: Critical - P2
-
Affects Version/s: None
-
Component/s: None
-
None
-
Environment:OS: Linux (Ubuntu 22.04.1)
node.js / npm versions: Unknown
Additional info:
-
Developer Tools
-
Not Needed
-
Iteration Xiaosaurus
Problem Statement/Rationale
I cannot use workforce authentication on mongosh v2.2.1 (latest)
Steps to Reproduce
Attempt to use workforce authentication on mongosh v2.2.1
Expected Results
Successful connection. Example (mongosh v2.0.2)
azure-user@nds-e2e-oidc-vm:~$ mongosh --version 2.0.2 azure-user@nds-e2e-oidc-vm:~$ mongosh 'mongodb+srv://cluster0.6aqlu.mmscloudteam.com/admin?authMechanism=MONGODB-OIDC&authSource=%24external&ssl=true' --oidcTrustedEndpoint --oidcFlows=device-auth --quiet --eval 'db.hello()' Visit the following URL to complete authentication: https://mongodb-dev.okta.com/activate Enter the following code on that page: LRGZDWMZ Waiting...
Actual Results
Unsuccessful connection
azure-user@nds-e2e-oidc-vm:~$ mongosh --version 2.2.1 azure-user@nds-e2e-oidc-vm:~$ mongosh 'mongodb+srv://cluster0.6aqlu.mmscloudteam.com/admin?authMechanism=MONGODB-OIDC&authSource=%24external&ssl=true' --oidcTrustedEndpoint --oidcFlows=device-auth --quiet --eval 'db.hello()' Error: Unable to fetch issuer metadata for "https://mongodb-dev.okta.com/oauth2/ausqrxbcr53xakaRR357": (intermediate value).discover is not a function
Additional Notes
I suspect this is due to a library mongosh uses for OIDC. I'm not sure the details for my systems node installation, I basically just launched a new ubuntu VM and installed mongosh.
azure-user@nds-e2e-oidc-vm:~$ uname -svp Linux #16~22.04.1-Ubuntu SMP Fri Feb 16 15:42:02 UTC 2024 x86_64
- is depended on by
-
MONGOSH-1748 Release mongosh 2.2.2
- Closed