[COMPASS-4940] Unable to connect to Atlas with SRV connection string and X509 certificate Created: 11/Jul/21  Updated: 29/Oct/23  Resolved: 14/Jul/21

Status: Closed
Project: Compass
Component/s: Atlas, Compass, Connectivity
Affects Version/s: 1.27.1
Fix Version/s: 1.28.1

Type: Bug Priority: Blocker - P1
Reporter: Ilan Cohen Assignee: Maurizio Casimirri
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2021-07-11 at 10.24.23.png    
Issue Links:
Duplicate
Documentation Changes: Not Needed
Sprint: Iteration Geneva

 Description   

Problem Statement/Rationale

Compass can not connect to an Atlas cluster with SRV connection string and X509 certificate.

Encountered in

Compass 1.27.1

MongoDB 4.4.6 (Atlas)

Steps to Reproduce

  1. Add a database user with Certificate authentication
  2. In Atlas, click on the connect button for the cluster
  3. Click connect using MongoDB Compass
  4. Copy the connection string and remove username and password
  5. Paste connection string into compass
    Example: mongodb+srv://TESTCLUSTER.abcde.mongodb.net/
  6. Click Fill in connection fields individually
  7. Fill in the remaining fields to connect with X509: Authentication, SSL, Certs
  8. Click Connect

Expected Results

Compass should connect to the cluster with the given X509 certificate

Actual Results

Compass outputs the following error:

[object Object] can only have authSource set to '$external'

Additional Notes

This can be worked around by adding

&authSource=$external

to the connection string before filling in the individual connection fields. 



 Comments   
Comment by Githook User [ 21/Jul/21 ]

Author:

{'name': 'Maurizio Casimirri', 'email': 'maurizio.cas@gmail.com', 'username': 'mcasimir'}

Message: fix: remove duplicated authSource from url COMPASS-4940 (#2342)
Branch: install-before-publish
https://github.com/mongodb-js/compass/commit/372fc6f52de6f6107cefae44eb8f65b9202042e2

Comment by Githook User [ 12/Jul/21 ]

Author:

{'name': 'Maurizio Casimirri', 'email': 'maurizio.cas@gmail.com', 'username': 'mcasimir'}

Message: fix: remove duplicated authSource from url COMPASS-4940 (#2342)
Branch: 1.28-releases
https://github.com/mongodb-js/compass/commit/372fc6f52de6f6107cefae44eb8f65b9202042e2

Comment by Githook User [ 12/Jul/21 ]

Author:

{'name': 'Maurizio Casimirri', 'email': 'maurizio.cas@gmail.com', 'username': 'mcasimir'}

Message: fix: remove duplicated authSource from url COMPASS-4940 (#2342)
Branch: main
https://github.com/mongodb-js/compass/commit/372fc6f52de6f6107cefae44eb8f65b9202042e2

Comment by Maurizio Casimirri [ 11/Jul/21 ]

Hi ilan.cohen, yeah the connection string seems to have duplicated authSource query params, we will include a fix in the next GA

Comment by Githook User [ 11/Jul/21 ]

Author:

{'name': 'mcasimir', 'email': 'maurizio.cas@gmail.com', 'username': 'mcasimir'}

Message: fix: remove duplicated authSource from url COMPASS-4940
Branch: COMPASS-4940
https://github.com/mongodb-js/compass/commit/facc8d900c20418b2b01aea05db4f77d1b6f7f0a

Comment by Ilan Cohen [ 11/Jul/21 ]

This HELP ticket describes the same issue

Generated at Wed Feb 07 22:37:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.