[CSHARP-3066] Improve MongoX509Credential API Created: 17/Apr/20  Updated: 28/Oct/23  Resolved: 08/May/20

Status: Closed
Project: C# Driver
Component/s: Security
Affects Version/s: None
Fix Version/s: 2.11.0

Type: New Feature Priority: Minor - P4
Reporter: Vincent Kam (Inactive) Assignee: Mikalai Mazurenka (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The easiest way to create a MongoX509Credential involves passing a null parameter to the username, to avoid having to extract the username from the X509 certificate, a somewhat error prone process.
 A sample username is: `CN=myName,OU=myOrgUnit,O=myOrg,L=myLocality,ST=myState,C=myCountry" (See the username format here: https://docs.mongodb.com/manual/tutorial/configure-x509-client-authentication/#add-x-509-certificate-subject-as-a-user).

See the suggested method here, which involves passing in a null: https://mongodb.github.io/mongo-csharp-driver/2.11/reference/driver/authentication/

It'd be nice to have a method that simply doesn't require a username parameter.



 Comments   
Comment by Githook User [ 08/May/20 ]

Author:

{'name': 'Mikalai Mazurenka', 'email': 'mikalai.mazurenka@mongodb.com', 'username': 'MikalaiMazurenka'}

Message: CSHARP-3066: Improve MongoX509Credential API
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/9ac07a06c33920465df89f3993f66b1edb14f2c5

Generated at Wed Feb 07 21:44:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.