[CSHARP-1927] The SSL connection example does not work Created: 28/Feb/17 Updated: 15/Nov/19 Resolved: 15/Nov/19 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Documentation |
| Affects Version/s: | 2.4 |
| Fix Version/s: | 2.10.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Kevin Adistambha | Assignee: | Vincent Kam (Inactive) |
| Resolution: | Done | Votes: | 3 |
| Labels: | new-eng, neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
The C# driver docs has an example on how to connect using SSL in http://mongodb.github.io/mongo-csharp-driver/2.4/reference/driver/ssl/. The code in the page shows:
However I find the code doesn't work when trying to connect to a MongoDB server with requireSSL=true. With some help from andrew.ryder I arrived at a working code:
There seems to be a series of requirements that are not explicit. In light of our push toward a more secure MongoDB deployment, in my opinion the SSL example should be explained more with a working code. |
| Comments |
| Comment by Vincent Kam (Inactive) [ 15/Nov/19 ] |
|
Thank you nathan.contino for creating the PR to update our documentation!
|
| Comment by Githook User [ 15/Nov/19 ] |
|
Author: {'username': 'nathan-contino-mongo', 'email': 'nathan.contino@mongodb.com', 'name': 'nathan-contino-mongo'}Message: |
| Comment by Vincent Kam (Inactive) [ 13/Nov/19 ] |
|
See also: https://github.com/mongodb/mongo-csharp-driver/pull/390 |
| Comment by Vincent Kam (Inactive) [ 07/Oct/19 ] |
|
rosmith@assurecare.com It should be noted that the second snippet in the ticket should only be used in testing or for development, as the ServerCertificateValidationCallback as defined will accept ANY certificate, even if the certificate is invalid. |
| Comment by Robert Smith [ 24/Sep/19 ] |
|
Thanks Kevin for reporting this. This was the last piece of the puzzle for me getting this to work. I hope the documentation gets updated soon. |